View the current kubeconfig file
Get the password for the e2e user
Display the first user in the kubeconfig
Get a list of users in the kubeconfig
Display the list of contexts in the kubeconfig
Display the current context in the kubeconfig
Set the default context to my-cluster-name
Set a cluster entry in the kubeconfig
Configure the URL to a proxy server in the kubeconfig
Add a new user to the kubeconfig with basic auth
Permanently save the namespace for all subsequent kubectl commands
Set a context with a specific username and namespace
Delete user foo from the kubeconfig
Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the current namespace
Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container
Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace my-namespace
Copy /tmp/foo from a remote pod to /tmp/bar locally
Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace my-namespace
Copy /tmp/foo from a remote pod to /tmp/bar locally
Create resource(s)
Create from multiple files
Create resource(s) in all manifest files in dir
Create resource(s) from url (Note: this is an example domain and does not contain a valid manifest)
Create a new pod
Create a new namespace named my-namespace
Start a single instance of nginx
Create a Job which prints 'Hello World'
Create a CronJob that prints 'Hello World' every minute
Get the documentation for pod manifests
Delete a pod using the type and name specified in pod.json
Delete a pod
Delete a pod with no grace period
Delete pods and services with same names "baz" and "foo"
Delete pods and services with label name=myLabel
Delete all pods and services in namespace my-ns
Delete all pods matching the awk pattern1 or pattern2
Edit the service named docker-registry
Use an alternative editor to edit the service named docker-registry
Dump Pod logs for a Deployment (single-container case)
Dump Pod logs for a Deployment (multi-container case)
Listen on local port 5000 and forward to port 5000 on Service backend
Listen on local port 5000 and forward to Service target port with name
Listen on local port 5000 and forward to port 6000 on a Pod created by
Run command in first Pod and first container in Deployment (single- or multi-container cases)
Mark my-node as unschedulable
Drain my-node in preparation for maintenance
Mark my-node as schedulable
Show metrics for a given node
Display addresses of the master and services
Dump current cluster state to stdout
Dump current cluster state to /path/to/cluster-state
View existing taints on which exist on current nodes.
If a taint with that key and effect already exists, its value is replaced as specified.
Dump pod logs (stdout)
Dump pod logs, with label name=myLabel (stdout)
Dump pod logs (stdout) for a previous instantiation of a container
Dump pod container logs (stdout, multi-container case)
Dump pod container logs, with label name=myLabel (stdout)
Dump pod container logs (stdout, multi-container case) for a previous instantiation of a container
Stream pod logs (stdout)
Stream pod container logs (stdout, multi-container case)
Stream all pods logs with label name=myLabel (stdout)
Run pod as interactive shell
Start a single instance of nginx pod in the namespace of mynamespace
Generate spec for running pod nginx and write it into a file called pod.yaml
Attach to Running Container
Listen on port 5000 on the local machine and forward to port 6000 on my-pod
Run command in existing pod (1 container case)
Interactive shell access to a running pod (1 container case)
Run command in existing pod (multi-container case)
Show metrics for a given pod and its containers
Show metrics for a given pod and sort it by 'cpu' or 'memory'
Partially update a node
Update a container's image; spec.containers[*].name is required because it's a merge key
Update a container's image using a json patch with positional arrays
Disable a deployment livenessProbe using a json patch with positional arrays
Add a new element to a positional array
Update a deployment's replica count by patching its scale subresource
List all available resources in the cluster
List all namespaced resources
List all non-namespaced resources
List all resources with simple output (only the resource name)
List all resources with expanded (aka 'wide') output
List all resources that support the 'list' and 'get' request verbs
List all resources in the 'extensions' API group
Scale a replicaset named 'foo' to 3
Scale a resource specified in "foo.yaml" to 3
If the deployment named mysql's current size is 2, scale mysql to 3
Scale multiple replication controllers
Rolling update "www" containers of "frontend" deployment, updating the image
Check the history of deployments including the revision
Rollback to the previous deployment
Rollback to a specific revision
Watch rolling update status of "frontend" deployment until completion
Rolling restart of the "frontend" deployment
Replace a pod based on the JSON passed into stdin
Force replace, delete and then re-create the resource. Will cause a service outage.
Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000
Update a single-container pod's image version (tag) to v4
Add a Label
Remove a label
Overwrite an existing value
Add an annotation
Remove annotation
Auto scale a deployment "foo"
List all services in the namespace
List all pods in all namespaces
List all namespaces
List all pods in the current namespace, with more details
List a particular deployment
List all pods in the namespace
Get a pod's YAML
Describe nodes with verbose output
Describe pods with verbose output
List Services Sorted by Name
List pods Sorted by Restart Count
List PersistentVolumes sorted by capacity
Get the version label of all pods with label app=cassandra
Retrieve the value of a key with dots, e.g. 'ca.crt'
Retrieve a base64 encoded value with dashes instead of underscores.
Get all worker nodes (use a selector to exclude results that have a label named 'node-role.kubernetes.io/control-plane')
Get all running pods in the namespace
Get ExternalIPs of all nodes
Show labels for all pods (or any other Kubernetes object that supports labelling)
Check which nodes are ready
Check which nodes are ready with custom-columns
Output decoded secrets without external tools
List all Secrets currently in use by a pod
List all containerIDs of initContainer of all pods
List Events sorted by timestamp
List all warning events
Compares the current state of the cluster against the state that the cluster would be in if the manifest was applied.
Produce a period-delimited tree of all keys returned for nodes
Produce a period-delimited tree of all keys returned for pods, etc
Produce ENV for all pods, assuming you have a default container for the pods, default namespace and the `env` command is supported
Get a deployment's status subresource