[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-572353-105":3,"detail-sidebar-cat-1-en-105":81,"doc-detail-572353-en":127},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","kubernetes-cheatsheet-essential-commands-for-container-orchestration-and-cluster-management","Kubernetes Cheatsheet - essential commands for container orchestration and cluster management","","Kubernetes Cheatsheet compiles essential kubectl commands and practical best practices for container orchestration and cluster management. The reference covers installation and setup, including verifying kubectl and configuring cluster contexts and namespaces. It then details pod management workflows (run, create from YAML, logs, exec, delete), deployment and replica set creation, scaling, and rolling updates with rollbacks. It further explains service and networking commands for exposing apps, discovery, port-forwarding, and ingress management, plus configuration options using ConfigMaps and Secrets.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/kubernetes-cheatsheet-essential-commands-for-container-orchestration-and-cluster-management/572353/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/kubernetes-cheatsheet-essential-commands-for-container-orchestration-and-cluster-management/572353.png","ImageObject",442,249,{"name":42,"@type":43},"Jake","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How do you install kubectl on macOS, Linux, and Windows?","Question",{"text":63,"@type":64},"Use Homebrew on macOS, download the official binary and chmod on Linux, and install kubernetes-cli via Chocolatey on Windows.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which kubectl commands help manage pods and view their status?",{"text":68,"@type":64},"Use kubectl run and kubectl create to create pods, kubectl get pods for listing, kubectl describe pod for details, kubectl logs to view logs, and kubectl exec to run commands inside containers.",{"name":70,"@type":61,"acceptedAnswer":71},"How do you scale and rollout updates for a deployment?",{"text":72,"@type":64},"Scale replicas with kubectl scale deployment, and manage updates with kubectl rollout status, kubectl rollout history, and kubectl rollout undo (including reverting to a specific revision).","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},572353,1792338011,{"code":4,"msg":82,"data":83},"success",[84,88,93,98,103,108,113,118,123],{"id":85,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":86,"slug":87},11,90,"presentations",{"id":89,"doc_module":22,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},12,"Resumes",80,"resumes",{"id":94,"doc_module":22,"doc_module_name":25,"category_name":95,"show_sort_weight":96,"slug":97},14,"Invoices",70,"invoices",{"id":99,"doc_module":22,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},15,"Posters",60,"posters",{"id":104,"doc_module":22,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},16,"Social Media",50,"social-media",{"id":109,"doc_module":22,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},17,"Forms",40,"forms",{"id":114,"doc_module":22,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},18,"Letters",30,"letters",{"id":119,"doc_module":22,"doc_module_name":25,"category_name":120,"show_sort_weight":121,"slug":122},21,"Paper Templates",5,"papers-templates",{"id":124,"doc_module":22,"doc_module_name":25,"category_name":125,"show_sort_weight":4,"slug":126},158,"General","general-158",{"code":4,"msg":82,"data":128},{"doc_id":79,"user_id":129,"nickname":42,"user_avatar":130,"doc_module":22,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":22,"language":136,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":12,"update_tm":140,"read_time":4},962084928904,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","[labex.io](labex.io)  \nKubernetes Cheatsheet  \nEssential commands for container orchestration and cluster management  \nThis cheatsheet provides a comprehensive reference to fundamental Kubernetes (K8s) operations, kubectl commands, and best practices, ideal for both beginners and experienced developers managing containerized applications.  \nBasic Commands  \nEssential kubectl operations  \nPod Management  \nCreate and manage pods  \nDeployments  \nApplication deployment & scaling  \nServices & Networking  \nExpose and connect applications  \nConfiguration  \nConfigMaps and Secrets  \nInstallation & Setup  \nInstall kubectl  \nInstall the Kubernetes command-line tool.  \n\\# macOS with Homebrew brew install kubectl  \n\\# Linux (official binary)  \ncurl-LO \"[https://dl.k8s.io/release/$](https://dl.k8s.io/release/$)(curl-L-s [https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kube](https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kube)ctl\"  \nchmod +x kubectl  \nsudo mv kubectl /usr/local/bin/  \n\\# Windows with Chocolatey choco install kubernetes-cli  \nVerify Installation  \nCheck kubectl version and cluster connection.  \n\\# Check kubectl version kubectl version--client  \n\\# Check both client and server versions kubectl version  \n\\# Get cluster information kubectl cluster-info  \nConfigure kubectl  \nSet up cluster access and context.  \n\\# View current config kubectl config view  \n\\# List all contexts kubectl config get-contexts  \n\\# Switch to a context  \nkubectl config use-context my-cluster  \n\\# Set default namespace  \nkubectl config set-context--current--namespace=mynamespace  \nMinikube Setup  \nQuick local Kubernetes cluster for development.  \n\\# Start Minikube minikube start  \n\\# Check status minikube status  \n\\# Access dashboard minikube dashboard  \n\\# Stop cluster minikube stop  \nBasic Commands & Cluster Info  \nFundamental operations to understand and interact with your Kubernetes cluster.  \n01 02 03  \nPod Management  \nCreate & Run Pods: `kubectl run` / `kubectl create`  \nLaunch containers and manage their lifecycle.  \n\\# Run a simple pod  \nkubectl run nginx--image=nginx  \n\\# Create pod from YAML file kubectl create-f pod.yaml  \n\\# Run pod with command  \nkubectl run busybox--image=busybox--echo \"Hello World\"  \n\\# Create job  \nkubectl create job hello--image=busybox:1 .28--echo\"Hello World\"  \nView Pod Information: `kubectl get pods`  \nList and inspect running pods.  \n\\# List all pods in default namespace kubectl get pods  \n\\# List pods with more details kubectl get pods-o wide  \n\\# List pods in all namespaces kubectl get pods--all-namespaces  \n\\# Watch pod status changes kubectl get pods--watch  \nPod Details: `kubectl describe pod`  \nGet comprehensive information about specific pods.  \n\\# Describe a specific pod kubectl describe pod  \n\\# Describe pod in specific namespace kubectl describe pod -n  \n\\# Get pod logs kubectl logs  \n\\# Follow logs in real-time kubectl logs-f  \nPod Operations: `kubectl exec` / `kubectl delete`  \nExecute commands in pods and manage pod lifecycle.  \n\\# Execute command in pod kubectl exec-it -- /bin/bash  \n\\# Execute command in specific container kubectl exec-it -c --sh  \n\\# Delete a pod kubectl delete pod  \n\\# Force delete a pod  \nkubectl delete pod --grace-period=0--force  \nDeployments & ReplicaSets  \nCreate Deployments: `kubectl create deployment`  \nDeploy and manage applications declaratively.  \n\\# Create deployment  \nkubectl create deployment nginx--image=nginx  \n\\# Create deployment with replicas  \nkubectl create deployment webapp--image=nginx--replicas=3  \n\\# Create from YAML file kubectl apply-f deployment.yaml  \n\\# Expose deployment as service  \nkubectl expose deployment nginx--port=80--type=LoadBalancer  \nManage Deployments: `kubectl get deployments`  \nView and control deployment status and configuration.  \n\\# List deployments kubectl get deployments  \n\\# Describe deployment kubectl describe deployment  \n\\# Edit deployment kubectl edit deployment  \n\\# Delete deployment kubectl delete deployment  \nScalin","cbCairJwL6QFpXOi","https://ap.wps.com/l/cbCairJwL6QFpXOi","pdf",134170,"English","# Basic Commands\n## Installation & Setup\n## Configure kubectl\n## Minikube Setup\n# Pod Management\n## Create & Run Pods\n## Pod Information and Logs\n## Pod Operations\n# Deployments & ReplicaSets\n## Create Deployments\n## Manage Deployments\n## Scaling and Rolling Updates\n# Services & Networking\n## Expose Services\n## Service Discovery\n## Port Forwarding\n## Ingress Management","[{\"question\":\"How do you install kubectl on macOS, Linux, and Windows?\",\"answer\":\"Use Homebrew on macOS, download the official binary and chmod on Linux, and install kubernetes-cli via Chocolatey on Windows.\"},{\"question\":\"Which kubectl commands help manage pods and view their status?\",\"answer\":\"Use kubectl run and kubectl create to create pods, kubectl get pods for listing, kubectl describe pod for details, kubectl logs to view logs, and kubectl exec to run commands inside containers.\"},{\"question\":\"How do you scale and rollout updates for a deployment?\",\"answer\":\"Scale replicas with kubectl scale deployment, and manage updates with kubectl rollout status, kubectl rollout history, and kubectl rollout undo (including reverting to a specific revision).\"}]","Kubernetes Cheatsheet - essential commands for container orchestration and cluster management | PDF",1791926892]