⌘K
kubectl
all
Run commands against Kubernetes clusters. Some subcommands such as `run` have their own usage documentation.
More info →Options (1)
-o, --outputbooleanList information about a resource with more details
Example:
kubectl get {{pods|service|deployment|ingress|...}} {{[-o|--output]}} wideExamples (8)
List information about a resource with more details
kubectl get pods|service|deployment|ingress|... [-o|--output] wideUpdate specified pod with the label `unhealthy` and the value `true`
kubectl label pods name unhealthy=trueList all resources with different types
kubectl get allDisplay resource (CPU/Memory/Storage) usage of nodes or pods
kubectl top pods|nodesPrint the address of the master and cluster services
kubectl cluster-infoDisplay an explanation of a specific field
kubectl explain pods.spec.containersPrint the logs for a container in a pod or specified resource
kubectl logs pod_nameRun command in an existing pod
kubectl exec pod_name -- ls /made by @shridhargupta | data from tldr-pages