$ kubectl get no
$ kubectl get no -o yaml
$ kubectl describe no
$ kubectl get no -o yaml
$ kubectl get node --selector=[label_name]
$ kubectl get nodes -o jsonpat h='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
$ kubectl top node [node_name]
Pods
$ kubectl get po
$ kubectl get po -o wide
$ kubectl describe po
$ kubectl get po --show-labels
$ kubectl get po -lapp=nginx
$ kubectl get po -o yaml
$ kubectl get pod [pod_name]-o yaml --export
$ kubectl get pod [pod_name]-o yaml --export> nameoffile.yaml
$ kubectl get pods --field-selector status.phase=Running
Namespaces
$ kubectl get ns
$ kubectl get ns -o yaml
$ kubectl describe ns
Deployments
$ kubectl get deploy
$ kubectl describe deploy
$ kubectl get deploy -o wide
$ kubectl get deploy -o yaml
Services
$ kubectl get svc
$ kubectl describe svc
$ kubectl get svc -o wide
$ kubectl get svc -o yaml
$ kubectl get svc --show-labels
DaemonSets
$ kubectl get ds
$ kubectl get ds --all-namespaces
$ kubectl describe ds [daemonset_name]-n[namespace_name]
$ kubectl get ds [ds_name]-n[ns_name]-o yaml
Events
$ kubectl get events
$ kubectl get events -n kube-system
$ kubectl get events -w
$ kubectl config
$ kubectl cluster-info
$ kubectl get componentstatuses
$ kubectl get cs
Ce site web utilise des cookies. En utilisant le site Web, vous acceptez le stockage de cookies sur votre ordinateur. Vous reconnaissez également que vous avez lu et compris notre politique de confidentialité. Si vous n'êtes pas d'accord, quittez le site.En savoir plus