How to delete a deployment in Minikube?


by mohammad , in category: General Help , a month ago

How to delete a deployment in Minikube?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by wayne.swaniawski , a month ago


To delete a deployment in Minikube, you can use the kubectl delete command. Here is the step-by-step process:

  1. Open a terminal or a command prompt.
  2. Make sure you have the Minikube cluster running. If not, start it using the minikube start command.
  3. Set the context to the Minikube cluster by running the following command: kubectl config use-context minikube
  4. List all the deployments in the cluster by running: kubectl get deployments This command will display all the deployments along with their names.
  5. Identify the deployment you want to delete and note down its name.
  6. Use the kubectl delete deployment command followed by the deployment name to delete it. For example, if the deployment name is 'myapp-deployment', run the following command: kubectl delete deployment myapp-deployment This command will delete the specified deployment.
  7. You can verify if the deployment has been deleted by running kubectl get deployments again. The deployment you just deleted should not be listed.

That's it! The deployment has been successfully deleted from your Minikube cluster.