{"id":3857,"date":"2023-09-22T04:16:52","date_gmt":"2023-09-21T22:46:52","guid":{"rendered":"https:\/\/www.itsupportwale.com\/blog\/?p=3857"},"modified":"2024-07-28T01:33:32","modified_gmt":"2024-07-27T20:03:32","slug":"the-ultimate-kubectl-cheat-sheet-you-ever-need","status":"publish","type":"post","link":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/","title":{"rendered":"The Ultimate Kubectl Cheat Sheet You Ever Need"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d810a478ebc\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d810a478ebc\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Installation\" >Installation<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Kubectl_Cheat_Sheet\" >Kubectl Cheat Sheet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Version_Check\" >Version Check<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Cluster_Info\" >Cluster Info<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Context\" >Context<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Namespace_Management\" >Namespace Management<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Pod_Management\" >Pod Management<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#List_Pods\" >List Pods<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Pod_Describe\" >Pod Describe<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Logs\" >Logs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Exec_into_a_Pod\" >Exec into a Pod<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Deployment_Management\" >Deployment Management<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#List_Deployments\" >List Deployments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Scale_Deployment\" >Scale Deployment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Rollout_Status\" >Rollout Status<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Rollback_Deployment\" >Rollback Deployment<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Service_Management\" >Service Management<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#List_Services\" >List Services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Expose_a_Deployment\" >Expose a Deployment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Delete_a_Service\" >Delete a Service<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Configuration_and_Secrets\" >Configuration and Secrets<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#ConfigMap_Management\" >ConfigMap Management<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Node_Management\" >Node Management<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#List_Nodes\" >List Nodes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Node_Describe\" >Node Describe<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Node_Drain\" >Node Drain<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Kubernetes has rapidly become the de facto standard for container orchestration, powering modern, scalable, and reliable applications. Managing Kubernetes clusters and workloads effectively is crucial, and one of the most essential tools in a Kubernetes administrator&#8217;s arsenal is <code>kubectl<\/code>. In this article, we will go over the Kubectl Cheat Sheet you ever need.<\/p>\n\n\n\n<p>This command-line tool allows you to interact with your Kubernetes clusters, and having a solid understanding of its commands is vital. In this tech blog, we&#8217;ll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful <code>kubectl<\/code> commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installation\"><\/span>Installation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before you start using<code> kubectl<\/code>, ensure it is installed. You can download it from the <a href=\"https:\/\/kubernetes.io\/docs\/reference\/kubectl\/\" target=\"_blank\" rel=\"noopener\" title=\"\">official Kubernetes website<\/a> or use a package manager like <code><a href=\"https:\/\/brew.sh\/\" target=\"_blank\" rel=\"noopener\" title=\"\">brew<\/a><\/code> or <code>apt<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Kubectl_Cheat_Sheet\"><\/span>Kubectl Cheat Sheet<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Version_Check\"><\/span>Version Check<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Displays the client and server Kubernetes version.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl version<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"381\" src=\"https:\/\/oracle.itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/kubectl-version.jpg\" alt=\"kubectl-version\" class=\"wp-image-3866\" srcset=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/kubectl-version.jpg 729w, https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/kubectl-version-300x157.jpg 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cluster_Info\"><\/span>Cluster Info<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Shows information about the Kubernetes cluster.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl cluster-info<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Context\"><\/span>Context<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lists available contexts and sets the current context.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl config get-contexts\n   kubectl config use-context &lt;context-name&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Namespace_Management\"><\/span>Namespace Management<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List, create, and delete namespaces.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl get namespaces\n   kubectl create namespace &lt;namespace-name&gt;\n   kubectl delete namespace &lt;namespace-name&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pod_Management\"><\/span>Pod Management<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"List_Pods\"><\/span>List Pods<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl get pods\n   kubectl get pods -n &lt;namespace&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pod_Describe\"><\/span>Pod Describe<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl describe pod &lt;pod-name&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Logs\"><\/span>Logs<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View pod logs, and optionally follow the logs in real time.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl logs &lt;pod-name&gt;\n   kubectl logs -f &lt;pod-name&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Exec_into_a_Pod\"><\/span>Exec into a Pod<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Opens a shell inside a pod.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl exec -it &lt;pod-name&gt; -- \/bin\/sh<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Deployment_Management\"><\/span>Deployment Management<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"List_Deployments\"><\/span>List Deployments<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>   kubectl get deployments\n   kubectl get deployments -n &lt;namespace&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Scale_Deployment\"><\/span>Scale Deployment<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl scale deployment &lt;deployment-name&gt; --replicas=&lt;replica-count&gt;<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rollout_Status\"><\/span>Rollout Status<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl rollout status deployment\/&lt;deployment-name&gt;<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Rollback_Deployment\"><\/span>Rollback Deployment<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl rollout undo deployment\/&lt;deployment-name&gt;<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Service_Management\"><\/span>Service Management<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"List_Services\"><\/span>List Services<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl get services kubectl get services -n &lt;namespace&gt;<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Expose_a_Deployment\"><\/span>Expose a Deployment<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl expose deployment &lt;deployment-name&gt; --port=&lt;port&gt; --type=&lt;service-type&gt;<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Delete_a_Service\"><\/span>Delete a Service<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl delete service &lt;service-name&gt;<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuration_and_Secrets\"><\/span>Configuration and Secrets<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ConfigMap_Management\"><\/span>ConfigMap Management<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl create configmap &lt;configmap-name&gt; --from-file=&lt;path-to-file&gt;kubectl get configmap &lt;configmap-name&gt;<\/code><\/code><\/pre>\n\n\n\n<p>Secret Management<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl create secret generic &lt;secret-name&gt; --from-literal=&lt;key&gt;=&lt;value&gt;kubectl get secret &lt;secret-name&gt;<\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Node_Management\"><\/span>Node Management<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"List_Nodes\"><\/span>List Nodes<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl get nodes<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Node_Describe\"><\/span>Node Describe<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl describe node &lt;node-name&gt;<\/code><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Node_Drain\"><\/span>Node Drain<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code><code>kubectl drain &lt;node-name&gt;<\/code><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Read More: <a href=\"https:\/\/oracle.itsupportwale.com\/blog\/how-to-install-and-configure-metallb-on-self-managed-kubernetes\/\" title=\"\">How to install and configure MetalLB on self-managed Kubernetes<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Mastering <code>kubectl<\/code> commands is a crucial skill for anyone working with Kubernetes. This cheat sheet provides a solid foundation for managing Kubernetes clusters, pods, deployments, services, and more.<\/p>\n\n\n\n<p>Remember that this is just the tip of the iceberg, and Kubernetes offers a vast ecosystem of features and resources to explore. Continue to learn and experiment to become proficient in Kubernetes administration.<\/p>\n\n\n\n<p>Whether you&#8217;re a seasoned Kubernetes pro or just getting started, this <code>kubectl<\/code> cheat sheet should prove invaluable in your day-to-day operations.<\/p>\n\n\n\n<p>It&#8217;s a handy reference to help streamline your Kubernetes management tasks and ensure the smooth operation of your containerized applications. Happy Kubernetes tinkering!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Kubernetes has rapidly become the de facto standard for container orchestration, powering modern, scalable, and reliable applications. Managing Kubernetes clusters and workloads effectively is crucial, and one of the most essential tools in a Kubernetes administrator&#8217;s arsenal is kubectl. In this article, we will go over the Kubectl Cheat Sheet you ever need. This &#8230; <a title=\"The Ultimate Kubectl Cheat Sheet You Ever Need\" class=\"read-more\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\" aria-label=\"Read more  on The Ultimate Kubectl Cheat Sheet You Ever Need\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":3865,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[609,607,649,640],"tags":[650,651,627,644,652],"class_list":["post-3857","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containerization","category-devops","category-kubectl","category-kubernetes","tag-kubectl","tag-kubectl-commands","tag-kubernetes","tag-kubernetes-tutorial","tag-kubetl-cheat-sheet"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale<\/title>\n<meta name=\"description\" content=\"we&#039;ll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale\" \/>\n<meta property=\"og:description\" content=\"we&#039;ll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\" \/>\n<meta property=\"og:site_name\" content=\"ITSupportWale\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-21T22:46:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-27T20:03:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Techie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Techie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\"},\"author\":{\"name\":\"Techie\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\"},\"headline\":\"The Ultimate Kubectl Cheat Sheet You Ever Need\",\"datePublished\":\"2023-09-21T22:46:52+00:00\",\"dateModified\":\"2024-07-27T20:03:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\"},\"wordCount\":347,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg\",\"keywords\":[\"kubectl\",\"kubectl commands\",\"kubernetes\",\"kubernetes tutorial\",\"kubetl cheat sheet\"],\"articleSection\":[\"containerization\",\"DevOps\",\"kubectl\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\",\"name\":\"The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale\",\"isPartOf\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg\",\"datePublished\":\"2023-09-21T22:46:52+00:00\",\"dateModified\":\"2024-07-27T20:03:32+00:00\",\"description\":\"we'll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands\",\"breadcrumb\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg\",\"width\":1024,\"height\":683,\"caption\":\"the-ultimate-kubectl-cheat-sheet-you-ever-need\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itsupportwale.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Ultimate Kubectl Cheat Sheet You Ever Need\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#website\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"name\":\"ITSupportWale\",\"description\":\"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides\",\"publisher\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#organization\",\"name\":\"itsupportwale\",\"url\":\"https:\/\/itsupportwale.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"contentUrl\":\"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png\",\"width\":1119,\"height\":144,\"caption\":\"itsupportwale\"},\"image\":{\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Itsupportwale-298547177495978\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d\",\"name\":\"Techie\",\"sameAs\":[\"https:\/\/itsupportwale.com\",\"iswblogadmin\"],\"url\":\"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale","description":"we'll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/","og_locale":"en_US","og_type":"article","og_title":"The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale","og_description":"we'll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands","og_url":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/","og_site_name":"ITSupportWale","article_publisher":"https:\/\/www.facebook.com\/Itsupportwale-298547177495978","article_published_time":"2023-09-21T22:46:52+00:00","article_modified_time":"2024-07-27T20:03:32+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg","type":"image\/jpeg"}],"author":"Techie","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Techie","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#article","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/"},"author":{"name":"Techie","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d"},"headline":"The Ultimate Kubectl Cheat Sheet You Ever Need","datePublished":"2023-09-21T22:46:52+00:00","dateModified":"2024-07-27T20:03:32+00:00","mainEntityOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/"},"wordCount":347,"commentCount":0,"publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage"},"thumbnailUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg","keywords":["kubectl","kubectl commands","kubernetes","kubernetes tutorial","kubetl cheat sheet"],"articleSection":["containerization","DevOps","kubectl","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/","url":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/","name":"The Ultimate Kubectl Cheat Sheet You Ever Need - ITSupportWale","isPartOf":{"@id":"https:\/\/itsupportwale.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage"},"thumbnailUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg","datePublished":"2023-09-21T22:46:52+00:00","dateModified":"2024-07-27T20:03:32+00:00","description":"we'll provide you with a comprehensive Kubectl Cheat Sheet, covering some of the most common and useful kubectl commands","breadcrumb":{"@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#primaryimage","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/the-ultimate-kubectl-cheat-sheet-you-ever-need.jpg","width":1024,"height":683,"caption":"the-ultimate-kubectl-cheat-sheet-you-ever-need"},{"@type":"BreadcrumbList","@id":"https:\/\/itsupportwale.com\/blog\/the-ultimate-kubectl-cheat-sheet-you-ever-need\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsupportwale.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The Ultimate Kubectl Cheat Sheet You Ever Need"}]},{"@type":"WebSite","@id":"https:\/\/itsupportwale.com\/blog\/#website","url":"https:\/\/itsupportwale.com\/blog\/","name":"ITSupportWale","description":"Tips, Tricks, Fixed-Errors, Tutorials &amp; Guides","publisher":{"@id":"https:\/\/itsupportwale.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsupportwale.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itsupportwale.com\/blog\/#organization","name":"itsupportwale","url":"https:\/\/itsupportwale.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","contentUrl":"https:\/\/itsupportwale.com\/blog\/wp-content\/uploads\/2023\/09\/cropped-Logo-trans-without-slogan.png","width":1119,"height":144,"caption":"itsupportwale"},"image":{"@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Itsupportwale-298547177495978"]},{"@type":"Person","@id":"https:\/\/itsupportwale.com\/blog\/#\/schema\/person\/8c5a2b3d36396e0a8fd91ec8242fd46d","name":"Techie","sameAs":["https:\/\/itsupportwale.com","iswblogadmin"],"url":"https:\/\/itsupportwale.com\/blog\/author\/iswblogadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/3857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/comments?post=3857"}],"version-history":[{"count":0,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/posts\/3857\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media\/3865"}],"wp:attachment":[{"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/media?parent=3857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/categories?post=3857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsupportwale.com\/blog\/wp-json\/wp\/v2\/tags?post=3857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}