{"id":4807,"date":"2022-04-04T23:27:10","date_gmt":"2022-04-04T15:27:10","guid":{"rendered":"https:\/\/www.jameseduard.com\/?p=4807"},"modified":"2022-04-04T23:27:10","modified_gmt":"2022-04-04T15:27:10","slug":"kubectl-command-cheat-sheet","status":"publish","type":"post","link":"https:\/\/www.jameseduard.com\/?p=4807","title":{"rendered":"Kubectl Command Cheat Sheet"},"content":{"rendered":"\n\n\n<p class=\"wp-block-paragraph\">In this article i will discuss Kubernetes command cheat sheet. Kubectl is a set of commands for controlling\u00a0Kubernetes clusters.\u00a0Using Kubectl allows you to create, inspect, update, and delete Kubernetes objects. This cheat sheet will serve as a quick reference to make commands on many common Kubernetes components and resources.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cluster Management<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Display endpoint information about the master and services in the cluster<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl cluster-info<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the Kubernetes version running on the client and server<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl version<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get the configuration of the cluster<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl config view<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List the API resources that are available<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl api-resources<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List the API versions that are available<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl api-versions<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List everything<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get all --all-namespaces<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Daemonsets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = ds<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more daemonsets<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get daemonset<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit and update the definition of one or more daemonset<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl edit daemonset &lt;daemonset_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a daemonset<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete daemonset &lt;daemonset_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new daemonset<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create daemonset &lt;daemonset_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Manage the rollout of a daemonset<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl rollout daemonset<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of daemonsets within a namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe ds &lt;daemonset_name> -n &lt;namespace_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Deployments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = deploy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more deployments<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get deployment<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of one or more deployments<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe deployment &lt;deployment_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit and update the definition of one or more deployment on the server<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl edit deployment &lt;deployment_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create one a new deployment<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create deployment &lt;deployment_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete deployments<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete deployment &lt;deployment_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">See the rollout status of a deployment<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl rollout status deployment &lt;deployment_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Events<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = ev<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List recent events for all resources in the system<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get events<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List Warnings only<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get events --field-selector type=Warning<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List events but exclude Pod events<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get events --field-selector involvedObject.kind!=Pod<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pull events for a single node with a specific name<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get events --field-selector involvedObject.kind=Node, involvedObject.name=&lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Filter out normal events from a list of events<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get events --field-selector type!=Normal<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Logs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Print the logs for a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Print the logs for the last hour for a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs --since=1h &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get the most recent 20 lines of logs<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs --tail=20 &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get logs from a service and optionally select which container<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs -f &lt;service_name> [-c &lt;$container>]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Print the logs for a pod and follow new logs<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs -f &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Print the logs for a container in a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs -c &lt;container_name> &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output the logs for a pod into a file named \u2018pod.log\u2019<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs &lt;pod_name> pod.log<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">View the logs for a previously failed pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl logs --previous &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For logs we also recommend using a tool developed by Johan Haleby called Kubetail. This is a bash script that will allow you to get logs from multiple pods simultaneously. You can learn more about it at its&nbsp;<a href=\"https:\/\/github.com\/johanhaleby\/kubetail\">Github repository.<\/a>&nbsp;Here are some sample commands using Kubetail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Get logs for all pods named with pod_prefix<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubetail &lt;pod_prefix><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Include the most recent 5 minutes of logs<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubetail &lt;pod_prefix> -s 5m<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Manifest Files&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Another option for modifying objects is through Manifest Files. We highly recommend using this method. It is done by using yaml files with all the necessary options for objects configured. We have our yaml files stored in a git repository, so we can track changes and streamline changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apply a configuration to an object by filename or stdin. Overrides the existing configuration.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl apply -f manifest_file.yaml<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create objects<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create -f manifest_file.yaml<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create objects in all manifest files in a directory<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create -f .\/dir<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create objects from a URL<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create -f \u2018url\u2019<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete an object<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete -f manifest_file.yaml<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Namespaces<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = ns<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create namespace &lt;name&gt;<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create namespace &lt;namespace_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more namespaces<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get namespace &lt;namespace_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of one or more namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe namespace &lt;namespace_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete namespace &lt;namespace_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit and update the definition of a namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl edit namespace &lt;namespace_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display Resource (CPU\/Memory\/Storage) usage for a namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl top namespace &lt;namespace_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Nodes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = no<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Update the taints on one or more nodes<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl taint node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more nodes<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get node<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a node or multiple nodes<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display Resource usage (CPU\/Memory\/Storage) for nodes<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl top node<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Resource allocation per node<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe nodes | grep Allocated -A 5<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pods running on a node<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get pods -o wide | grep &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Annotate a node<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl annotate node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Mark a node as unschedulable<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl cordon node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Mark node as schedulable<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl uncordon node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Drain a node in preparation for maintenance<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl drain node &lt;node_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add or update the labels of one or more nodes<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl label node<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Pods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = po<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more pods<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get pod<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete pod &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of a pods<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe pod &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create pod &lt;pod_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Execute a command against a container in a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl exec &lt;pod_name> -c &lt;container_name> &lt;command><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get interactive shell on a a single-container pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl exec -it &lt;pod_name> \/bin\/sh<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display Resource usage (CPU\/Memory\/Storage) for pods<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl top pod<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add or update the annotations of a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl annotate pod &lt;pod_name> &lt;annotation><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add or update the label of a pod<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl label pod &lt;pod_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Replication Controllers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = rc<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List the replication controllers<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get rc<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List the replication controllers by namespace<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get rc --namespace=\u201d&lt;namespace_name>\u201d<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">ReplicaSets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = rs<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List ReplicaSets<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get replicasets<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of one or more ReplicaSets<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe replicasets &lt;replicaset_name><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Scale a ReplicaSet<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl scale --replicas=[x] <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Secrets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a secret<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create secret<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List secrets<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get secrets<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List details about secrets<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe secrets<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a secret<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete secret &lt;secret_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Services<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = svc<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List one or more services<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get services<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of a service<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe services<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expose a replication controller, service, deployment or pod as a new Kubernetes service<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl expose deployment [deployment_name]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit and update the definition of one or more services<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl edit services<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Service Accounts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = sa<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List service accounts<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get serviceaccounts<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Display the detailed state of one or more service accounts<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl describe serviceaccounts<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace a service account<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl replace serviceaccount<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete a service account<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete serviceaccount &lt;service_account_name><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">StatefulSet<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode = sts<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">List StatefulSet<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get statefulset<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete StatefulSet only (not pods)<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl delete statefulset\/[stateful_set_name] --cascade=false<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Common Options<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Kubectl you can specify optional flags with commands. Here are some of the most common and useful ones.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-o Output format. For example if you wanted to list all of the pods in ps output format with more information.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get pods -o wide <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-n Shorthand for &#8211;namespace. For example, if you\u2019d like to list all the Pods in a specific Namespace you would do this command:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get pods --namespace=[namespace_name]<\/pre>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl get pods -n=[namespace_name]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-f Filename, directory, or URL to files to use to create a resource. For example when creating a pod using data in a file named newpod.json.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">kubectl create -f .\/newpod.json<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">-l Selector to filter on, supports \u2018=\u2019, \u2018==\u2019, and \u2018!=\u2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Help for kubectl<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-h<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article i will discuss Kubernetes command cheat sheet. Kubectl is a set of commands for controlling\u00a0Kubernetes clusters.\u00a0Using Kubectl allows you to create, inspect, update, and delete Kubernetes objects. This cheat sheet will serve as a quick reference to make commands on many common Kubernetes components and resources. Cluster Management Display endpoint information about<\/p>\n","protected":false},"author":1,"featured_media":4809,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52,55],"tags":[879,880,56],"class_list":["post-4807","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-kubernetes","tag-cli","tag-kubectl","tag-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4807"}],"version-history":[{"count":0,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=\/wp\/v2\/posts\/4807\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameseduard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}