Difference between revisions of "Kubectl delete"
Jump to navigation
Jump to search
(Created page with "k -n my-namespace delete pod/mypod --grace-period=0 --force") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | ``` | |
+ | kubectl delete pod <PODNAME> --grace-period=0 --force --namespace <NAMESPACE> | ||
+ | kubectl -n my-namespace delete pod/mypod --grace-period=0 --force | ||
+ | ``` | ||
+ | |||
+ | # namespaces stuck in terminating statue | ||
+ | ``` | ||
+ | kubectl get namespace zabbix-dev -o json > tmp.json | ||
+ | ``` | ||
+ | |||
+ | vi tmp.json | ||
+ | ``` | ||
+ | remove kubernetes from finalizer line so it looks like | ||
+ | "spec": { | ||
+ | "finalizers": [ | ||
+ | ] | ||
+ | }, | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | kubectl replace --raw "/api/v1/namespaces/zabbix-dev/finalize" -f tmp.json | ||
+ | ``` |
Latest revision as of 20:59, 27 September 2022
kubectl delete pod <PODNAME> --grace-period=0 --force --namespace <NAMESPACE> kubectl -n my-namespace delete pod/mypod --grace-period=0 --force
namespaces stuck in terminating statue
kubectl get namespace zabbix-dev -o json > tmp.json
vi tmp.json
remove kubernetes from finalizer line so it looks like "spec": { "finalizers": [ ] },
kubectl replace --raw "/api/v1/namespaces/zabbix-dev/finalize" -f tmp.json