list
list redundant rs
remove useless replicasets
$ 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 10 months ago