kubectl delete deployment code example

Example 1: kubectl delete all pods

kubectl delete --all pods

Example 2: kubectl delete pods

kubectl delete pod podname

Example 3: how to delete deployments in kubernetes

kubectl delete deployment yourDeploymentName

Example 4: how to delete services in kubernetes

kubectl delete services yourServiceNameHere

Example 5: kubectl restart deployment

kubectl rollout restart deployment yourDeploymentName

Example 6: delete a deployment in kubernetes

$ kubectl delete deploy/<deployment_name>