ASSOCIATE-CLOUD-ENGINEER · Question #346
You created a Kubernetes deployment by running kubectl 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…
The correct answer is A. kubectl delete deployment nginx. This command correctly deletes the deployment. Pods are managed by kubernetes workloads (deployments). When a pod is deleted, the deployment detects the pod is unavailable and brings up another pod to maintain the replica count. The only way to delete the workload is by…
Question
Options
- Akubectl delete deployment nginx
- Bkubectl delete deployment=nginx
- Ckubectl delete pod nginx-84748895c4-k6bzl -no-restart 2
- Dkubectl delete inginx
How the community answered
(33 responses)- A94% (31)
- C3% (1)
- D3% (1)
Explanation
This command correctly deletes the deployment. Pods are managed by kubernetes workloads (deployments). When a pod is deleted, the deployment detects the pod is unavailable and brings up another pod to maintain the replica count. The only way to delete the workload is by deleting the deployment itself using the kubectl delete deployment command. $ kubectl delete deployment nginx deployment.apps nginx deleted
Topics
Community Discussion
No community discussion yet for this question.