Kubernetes Commands
Links: 110 Kubernetes Index
Listing things¶
kubectl get nodekubectl get node -o wide: more infokubectl get node -o yaml: a lot of info in yaml format, we can also get it in json format.
We can use jq to get specific information from the nodes
- We can list all available resource types by running
kubectl get kubectl get all: get all the services
Describing things¶
kubectl describe type/namekubectl explain type: to view the definition of a resource type
Running commands¶
kubectl exec busybox nslookup kubernetes.default: run commands in containerskubectl exec -it busybox /bin/sh: getting into the pods
Last updated: 2022-09-05