List of questions
Related questions
Question 213 - Associate Cloud Engineer discussion
You created a Kubernetes deployment by runningkubectl run nginx image=nginx replicas=1. After a few days, you decided you no longer want this deployment. You identified the pod and deleted it by running kubectl delete pod. You noticed the pod got recreated.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-84748895c4-nqqmt 1/1 Running 0 9m41s
$ kubectl delete pod nginx-84748895c4-nqqmt
pod nginx-84748895c4-nqqmt deleted
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-84748895c4-k6bzl 1/1 Running 0 25s
What should you do to delete the deployment and avoid pod getting recreated?
A.
kubectl delete deployment nginx
B.
kubectl delete --deployment=nginx
C.
kubectl delete pod nginx-84748895c4-k6bzl --no-restart 2
D.
kubectl delete inginx
Your answer:
0 comments
Sorted by
Leave a comment first