This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
k8s [2019/06/28 09:29]
jdx [Get resources]
k8s [2020/05/02 09:34] (current)
Line 1: Line 1:
 ====== Kubernetes commands ====== ====== Kubernetes commands ======
-===== Show all resources ​=====+===== Kubectl CheatSheet ​=====
 <​code>​ <​code>​
-kubectl ​get all --all-namespaces +kubectl --help
-===== Get resources ===== +kubectl get all 
-<​code>​ +kubectl get all -A 
-kubectl get nodes +kubectl get all -n mynamespace 
-kubectl get pods + 
-kubectl get deployments +kubectl get nodes -o wide 
-kubectl get services+ 
 +kubectl apply -f myfile.yml 
 +kubectl delete -f myfile.yml 
 +kubectl get po [-o wide] [-w] 
 +kubectl get svc [-o wide] [-w] 
 +kubectl get deploy [-o wide] [-w]
 kubectl get ns kubectl get ns
 +kubectl get secret
 +kubectl get configmap
 kubectl delete service,​deployment NAME kubectl delete service,​deployment NAME
 </​code>​ </​code>​
  • k8s.1561714189.txt.gz
  • Last modified: 2020/05/02 09:33
  • (external edit)