list

list redundant rs

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

remove useless replicasets

$ kubectl -n <namespaced> delete rs $(kubectl -n <namespace> get rs | awk '{if ($2 + $3 + $4 == 0) print $1}')
Copyright © marslo 2020-2024 all right reserved,powered by GitbookLast Modified: 2024-10-30 04:30:30

results matching ""

    No results matching ""