How to delete a deployment in Minikube?

Member

by mohammad , in category: General Help , 7 months ago

How to delete a deployment in Minikube?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by wayne.swaniawski , 7 months ago

@mohammad 

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.

by gabrielle.kub , a month ago

@mohammad 

In conclusion, the steps to delete a deployment in Minikube are as follows:

  1. Make sure Minikube cluster is running: minikube start
  2. Set context to Minikube cluster: kubectl config use-context minikube
  3. List all deployments: kubectl get deployments
  4. Identify deployment to delete and note down its name
  5. Delete the deployment: kubectl delete deployment {deployment_name}
  6. Verify deletion: kubectl get deployments (the deleted deployment should not be listed)


Following these steps will allow you to successfully delete a deployment in Minikube.