Skip to content
thesarfo

Reference

Kubernetes: kubectl CLI Cheatsheet

Common kubectl commands for inspecting and managing Kubernetes resources.

views 0
CommandDescription
for … doRuns a for command multiple times as specified.
kubectl applyApplies a configuration to a resource.
kubectl config get-clustersDisplays clusters defined in the kubeconfig.
kubectl config get-contextsDisplays the current context.
kubectl createCreates a resource.
kubectl deleteDeletes resources.
kubectl describeShows details of a resource or group of resources.
kubectl exposeExposes a resource to the internet as a Kubernetes service.
kubectl getDisplays resources.
kubectl get podsLists all the Pods.
kubectl get pods -o wideLists all the Pods with details.
kubectl get deploymentsLists the deployments created.
kubectl get servicesLists the services created.
kubectl proxyCreates a proxy server between a localhost and the Kubernetes API server.
kubectl runCreates and runs a particular image in a pod.
kubectl versionPrints the client and server version information.