kubectl
Find more information at:
KUBECONFIG | |
Path to the kubectl configuration (“kubeconfig”) file. Default: “$HOME/.kube/config” | |
KUBECTL_COMMAND_HEADERS | |
When set to false, turns off extra HTTP headers detailing invoked kubectl command (Kubernetes version v1.22 or later) | |
KUBECTL_EXPLAIN_OPENAPIV3 | |
Toggles whether calls to use the new OpenAPIv3 data source available. OpenAPIV3 is enabled by default since Kubernetes 1.24. | |
KUBECTL_ENABLE_CMD_SHADOW | |
When set to true, external plugins can be used as subcommands for builtin commands if subcommand does not exist. In alpha stage, this feature can only be used for create command(e.g. kubectl create networkpolicy). |
- - Update the annotations on a resource
- kubectl api-resources - Print the supported API resources on the server
- - Print the supported API versions on the server, in the form of “group/version”
- kubectl apply - Apply a configuration to a resource by filename or stdin
- - Attach to a running container
- kubectl auth - Inspect authorization
- - Auto-scale a Deployment, ReplicaSet, or ReplicationController
- kubectl certificate - Modify certificate resources.
- - Display cluster info
- kubectl completion - Output shell completion code for the specified shell (bash or zsh)
- - Modify kubeconfig files
- kubectl cp - Copy files and directories to and from containers.
- - Create a resource from a file or from stdin.
- kubectl debug - Create debugging sessions for troubleshooting workloads and nodes
- - Delete resources by filenames, stdin, resources and names, or by resources and label selector
- kubectl describe - Show details of a specific resource or group of resources
- - Diff live version against would-be applied version
- kubectl drain - Drain node in preparation for maintenance
- - Edit a resource on the server
- kubectl events - List events
- - Execute a command in a container
- kubectl explain - Documentation of resources
- - Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
- kubectl get - Display one or many resources
- - Build a kustomization target from a directory or a remote url.
- kubectl label - Update the labels on a resource
- - Print the list of flags inherited by all commands
- kubectl patch - Update field(s) of a resource
- - Provides utilities for interacting with plugins.
- kubectl port-forward - Forward one or more local ports to a pod
- - Run a proxy to the Kubernetes API server
- kubectl replace - Replace a resource by filename or stdin
- - Manage the rollout of a resource
- kubectl run - Run a particular image on the cluster
- - Set a new size for a Deployment, ReplicaSet or Replication Controller
- kubectl set - Set specific features on objects
- - Update the taints on one or more nodes
- kubectl top - Display Resource (CPU/Memory/Storage) usage.
- - Mark node as schedulable
- kubectl version - Print the client and server version information
- - Experimental: Wait for a specific condition on one or many resources.