replicasets

list

list redundant rs

$ kubectl -n <namespace> get rs | awk '{if ($2 + $3 + $4 == 0) print $1}'

$ kubectl -n <namespaced> delete rs $(kubectl -n <namespace> get rs | awk '{if ($2 + $3 + $4 == 0) print $1}')

Last updated