소스 검색

kubectl: add page (#1954)

Fabio Serragnoli 7 년 전
부모
커밋
3cb40d53bc
1개의 변경된 파일31개의 추가작업 그리고 0개의 파일을 삭제
  1. 31 0
      pages/common/kubectl.md

+ 31 - 0
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`