From 3cb40d53bcccd8779866a2f259720a9a4913a032 Mon Sep 17 00:00:00 2001 From: Fabio Serragnoli Date: Tue, 30 Jan 2018 15:51:25 +0000 Subject: [PATCH] kubectl: add page (#1954) --- pages/common/kubectl.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pages/common/kubectl.md diff --git a/pages/common/kubectl.md b/pages/common/kubectl.md new file mode 100644 index 0000000000..3599fee471 --- /dev/null +++ b/pages/common/kubectl.md @@ -0,0 +1,31 @@ +# kubectl + +> Command line interface for running commands against Kubernetes clusters. + +- List all pods in all namespaces: + +`kubectl get pods --all-namespaces` + +- List all pods with more information (such as node name): + +`kubectl get pods -o wide` + +- Update specified pod with the label 'unhealthy' and the value 'true': + +`kubectl label pods {{name}} unhealthy=true` + +- List all resources with different types: + +`kubectl get all` + +- Show metrics for all nodes: + +`kubectl top node` + +- Show metrics for all pods in the default namespace: + +`kubectl top pod` + +- Print the address of the master and cluster services: + +`kubectl cluster-info`