How to Use Kubectl Delete Deployment in Kubernetes
<p>In this short article, we will discuss how to use the <code>kubectl delete deployment</code> command in Kubernetes (K8S), explaining how to use it in a step-by-step format with examples.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/0*CK2rU1i7GTA5On2x" style="height:394px; width:700px" /></p>
<p>Photo by <a href="https://unsplash.com/@melocokr?utm_source=medium&utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Sam Pak</a> on <a href="https://unsplash.com/?utm_source=medium&utm_medium=referral" rel="noopener ugc nofollow" target="_blank">Unsplash</a></p>
<h2>How to use kubectl delete deployment command</h2>
<ol>
<li>Open a terminal or command prompt and connect to your K8S cluster.</li>
<li>View a list of deployments with the <code>kubectl get deployments</code> command. Use the <code>-n <namespace></code> flag to specify the namespace of the deployment.</li>
<li>Delete the deployment with the <code>kubectl delete deployment <deployment name> -n <namespace name>.</code> For example, if you had a deployment named <code>blog-deployment</code> in the <code>blog</code> namespace, you would run <code>kubectl delete deployment blog-deployment -n blog</code> .</li>
</ol>
<p><a href="https://jackwesleyroper.medium.com/how-to-use-kubectl-delete-deployment-in-kubernetes-fe81ba30f355"><strong>Visit Now</strong></a></p>