To delete all old ReplicaSets in Kubernetes, you can use the following one-liner:
kubectl get rs -A -o wide | tail -n +2 | awk '{if ($3 + $4 + $5 == 0) print "kubectl delete rs -n "$1, $2 }' | sh
To delete all old ReplicaSets in Kubernetes, you can use the following one-liner:
kubectl get rs -A -o wide | tail -n +2 | awk '{if ($3 + $4 + $5 == 0) print "kubectl delete rs -n "$1, $2 }' | sh
It is not always convenient to manage the cluster from the console; a web dashboard is sometimes much more convenient. In this post we will learn how to set up automatic certificate renewal with cert-manager, expose the Kubernetes Dashboard to a public Ingress over a secure connection, and configure simple basic authentication as an addition security layer.