Reputation: 117
I want to delete single pod of kubernetes permanently but it will recreate that pod
i have tried many commands but it doesn't help me.
1. kubectl delete pod <pod-name>
2nd
kubectl get deployments
kubectl delete deployments <deployments- name>
kubectl get rs --all-namespaces
kubectl delete rs your_app_name
but None of that works
Upvotes: 1
Views: 2804
Reputation: 15480
my replica count is 0
...it will successfully delete the pod but then after it will restart
Try:
apiVersion: v1
kind: Pod
metadata:
name: ...
spec:
restartPolicy: Never # <-- add this
containers:
- name: ...
If the pod still restart, post output of kubectl describe pod <pod name> --namespace <name>
to your question.
Upvotes: 3