alpha | These commands correspond to alpha features that are not enabled in Kubernetes clusters by default |
annotate | Update the annotations on one or more resources |
api-resources | Print the supported API resources on the server |
api-versions | Print the supported API versions on the server, in the form of "group/version" |
apply | Apply a configuration to a resource by filename or stdin. The resource name must be specified. This resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config' |
attach | Attach to a process that is already running inside an existing container |
auth | Inspect authorization |
autoscale | Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster |
certificate | Modify certificate resources |
cluster-info | Display addresses of the master and services with label kubernetes.io/cluster-service=true To further debug and diagnose cluster problems, use 'kubectl cluster-info dump' |
completion | Output shell completion code for the specified shell (bash or zsh). The shell code must be evaluated to provide interactive completion of kubectl commands. This can be done by sourcing it from the .bash_profile |
config | Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" |
convert | Convert config files between different API versions. Both YAML and JSON formats are accepted |
cordon | Mark node as unschedulable |
cp | Copy files and directories to and from containers |
create | Create a resource from a file or from stdin |
delete | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
describe | Show details of a specific resource or group of resources |
diff | Diff configurations specified by filename or stdin between the current online configuration, and the configuration as it would be if applied |
drain | Drain node in preparation for maintenance |
edit | Edit a resource from the default editor |
exec | Execute a command in a container |
explain | List the fields for supported resources |
expose | Expose a resource as a new Kubernetes service |
get | Display one or many resources |
kustomize | Print a set of API resources generated from instructions in a kustomization.yaml file |
label | Update the labels on a resource |
logs | Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional |
patch | Update field(s) of a resource using strategic merge patch, a JSON merge patch, or a JSON patch |
plugin | Provides utilities for interacting with plugins |
port-forward | Forward one or more local ports to a pod. This command requires the node to have 'socat' installed |
proxy | Creates a proxy server or application-level gateway between localhost and the Kubernetes API Server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote kubernetes API Server port, except for the path matching the static content path |
replace | Replace a resource by filename or stdin |
rollout | Manage the rollout of a resource |
run | Create and run a particular image in a pod |
scale | Set a new size for a Deployment, ReplicaSet, Replication Controller, or StatefulSet |
set | Configure application resources |
taint | Update the taints on one or more nodes |
top | Display Resource (CPU/Memory/Storage) usage |
uncordon | Mark node as schedulable |
version | Print the client and server version information for the current context |
wait | Experimental: Wait for a specific condition on one or many resources |