objective stringlengths 12 424 | command_name stringclasses 93
values | command stringlengths 15 298 | description stringclasses 94
values | syntax stringclasses 94
values | flags stringclasses 47
values | question stringlengths 13 282 | chain_of_thought null |
|---|---|---|---|---|---|---|---|
Get output from running 'irb' command from the first pod of the deployment mydeployment, using the first container by default | exec | kubectl exec deploy/mydeployment -- irb | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Execute an 'irb' command inside the first pod of the deployment 'mydeployment' and get the output. | null |
Update image of all containers of daemonset app-v2 to 'alpine:3.14' | image | kubectl set image daemonset app-v2 *=alpine:3.14 | Update existing container image(s) of resources.
Possible resources include (case insensitive):
pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) | kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Update the image of all containers in the 'app-v2' daemonset to 'alpine:3.14' | null |
Create a copy of auth-service-pod adding a debug container and changing container images | debug | kubectl debug auth-service-pod -it --copy-to=debug-image-1 --image=debian --set-image=web=nginx:latest,proxy=nginx:1.21 | Debug cluster resources using interactive debugging containers.
'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified.
The action taken by 'debug' varies depending on what resource is specified. Supported acti... | kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name to use for debug container. "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "If true, suppress informational messages. "
"flag": "--stdin", "short": "-i", "default": "false", "usage": "Keep stdin open on the container(s) in t... | Create a debug container in auth-service-pod with updated container images | null |
Get output from running the 'yum install -y aws-cli' command from pod payment-gateway-pod, using the first container by default | exec | kubectl exec payment-gateway-pod -- yum install -y aws-cli | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Execute a command inside the payment-gateway-pod container to install the aws-cli package. | null |
Output modified deployment in YAML, and does not alter the object on the server | env | kubectl set env deployment/database-deployment DEBUG=true -o yaml | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Output the modified deployment in YAML format without making changes to the object on the server | null |
Add a taint with key 'dedicated' on nodes having label service=auth | taint | kubectl taint node -l service=auth dedicated=k8s-node-1:PreferNoSchedule | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint with key 'dedicated' and value 'k8s-node-1:PreferNoSchedule' on nodes having label 'service=auth' | null |
List deployments in YAML output format, in the "v1.1.0" version of the "internal-apps" API group | get | kubectl get deployments.v1.1.0.internal-apps -o yaml | Display one or many resources.
Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces.
Uninitia... | kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files iden... | List deployments in YAML format, using the "v1.1.0" version of the "internal-apps" API group. | null |
Listen on port 8081 locally, forwarding to 8081 in the pod | port-forward | kubectl port-forward pod/cdn-service-pod 8081:8081 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Listen on port 8081 locally and forward traffic to port 8081 in the 'cdn-service-pod' pod. | null | |
List the environment variables defined on a deployments 'api-server-deployment' | env | kubectl set env deployment/api-server-deployment --list | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | View the list of environment variables defined on the 'api-server-deployment' deployment. | null |
Copy /tmp/foo_dir from a remote pod to /tmp/bar_dir locally | cp | kubectl cp kubeapps/ingress-controller-pod-8:/tmp/foo_dir /tmp/bar_dir | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the directory /tmp/foo_dir from the remote pod named ingress-controller-pod-8 in the kubeapps namespace to the local directory /tmp/bar_dir. | null |
Listen on port 3000 on localhost and selected IP, forwarding to 3000 in the pod | port-forward | kubectl port-forward --address localhost,10.19.21.23 pod/proxy-server-pod 3000:3000 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Forward port 3000 from the pod "proxy-server-pod" to ports 3000 on localhost and IP 10.19.21.23 | null | |
Set deployment authentication-service-deployment's service account to tekton | serviceaccount | kubectl set serviceaccount deployment authentication-service-deployment tekton | Update the service account of pod template resources.
Possible resources (case insensitive) can be:
replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset | kubectl set serviceaccount (-f FILENAME | TYPE NAME) SERVICE_ACCOUNT | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Update the service account of the deployment named 'authentication-service-deployment' to 'tekton' | null |
Display only the most recent 31 lines of output in pod frontend-pod | logs | kubectl logs --tail=31 frontend-pod | Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional. | kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER] | "flag": "--container", "short": "-c", "default": "", "usage": "Print the logs of this container "
"flag": "--follow", "short": "-f", "default": "false", "usage": "Specify if the logs should be streamed. "
"flag": "--previous", "short": "-p", "default": "false", "usage": "If true, print the logs for the previous instanc... | Display the last 31 lines of logs for the 'frontend-pod' pod | null |
Create a single ingress called 'rontend-ingress' that directs requests to website.com/bar to svc # svc1:8888 with a tls secret "my-cert" | ingress | kubectl create ingress rontend-ingress --rule="website.com/bar=svc1:8888,tls=my-cert" | Create an ingress with the specified name. | kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create an ingress named 'rontend-ingress' that directs incoming requests for 'website.com/bar' to the service 'svc1' running on port 8888, and use the TLS certificate 'my-cert' for secure communication. | null |
Return snapshot logs from container frontend-deployment-1 of a deployment named e-commerce-pod | logs | kubectl logs deployment/frontend-deployment -c e-commerce-pod-1 | Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional. | kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER] | "flag": "--container", "short": "-c", "default": "", "usage": "Print the logs of this container "
"flag": "--follow", "short": "-f", "default": "false", "usage": "Specify if the logs should be streamed. "
"flag": "--previous", "short": "-p", "default": "false", "usage": "If true, print the logs for the previous instanc... | Retrieve the snapshot logs from the container "e-commerce-pod-1" of the deployment "frontend-deployment-1". | null |
Listen on port 3000 on localhost and selected IP, forwarding to 8000 in the pod | port-forward | kubectl port-forward --address localhost,10.19.21.23 pod/api-service-pod 3000:8000 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Forward traffic from port 3000 on localhost and IP 10.19.21.23 to port 8000 in the pod named "api-service-pod" | null | |
Create a copy of payment-gateway-pod adding a debug container and changing container images | debug | kubectl debug payment-gateway-pod -it --copy-to=dgb-img --image=debian --set-image=mailer=mailer:latest,worker=my-custom-worker:1.2.3 | Debug cluster resources using interactive debugging containers.
'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified.
The action taken by 'debug' varies depending on what resource is specified. Supported acti... | kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name to use for debug container. "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "If true, suppress informational messages. "
"flag": "--stdin", "short": "-i", "default": "false", "usage": "Keep stdin open on the container(s) in t... | Create a debug container in the payment-gateway-pod and change container images. | null |
Create a cluster role named "custom_role" with ResourceName specified | clusterrole | kubectl create clusterrole custom_role --verb=delete --resource=services --resource-name=api-server --resource-name=app-worker-1 | Create a cluster role. | kubectl create clusterrole NAME --verb=verb --resource=resource.group [--resource-name=resourcename] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a cluster role named "custom_role" with the ability to delete services and specific resource names "api-server" and "app-worker-1" | null |
Start a centos pod and let the container expose port 6379 | run | kubectl run hazelcast --image=centos --port=6379 | Create and run a particular image in a pod. | kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to replace the resource. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process a kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--labels", "short": "-l", "default": "", "usage": "Comma separate... | Create a new pod named 'hazelcast' with the centos image and expose port 6379. | null |
Update pod 'backend' with the annotation 'owner' and the value 'alice smith' # If the same annotation is set multiple times, only the last value will be applied | annotate | kubectl annotate pods backend owner='alice smith' | Update the annotations on one or more resources.
All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations... | kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If true, check the specified action in all namespaces. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to update the annotation "
"flag": "--kustomize", "short": "-k",... | Update the annotation 'owner' of a pod named 'backend' with the value 'alice smith' | null |
Create a copy of analytics-pod adding a debug container and changing container images | debug | kubectl debug analytics-pod -it --copy-to=debug-image-api --image=debian --set-image=mailer=mailer:latest,api=api:v2 | Debug cluster resources using interactive debugging containers.
'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified.
The action taken by 'debug' varies depending on what resource is specified. Supported acti... | kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name to use for debug container. "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "If true, suppress informational messages. "
"flag": "--stdin", "short": "-i", "default": "false", "usage": "Keep stdin open on the container(s) in t... | Create a debug container of the analytics-pod, and change container images | null |
Create a new config map named db-config with specified keys instead of file basenames on disk | configmap | kubectl create configmap db-config --from-file=settings=/path/to/profiles/file1.txt --from-file=key2=/path/to/parameters/file2.txt | Create a config map based on a file, directory, or specified literal value.
A single config map may package one or more key/value pairs.
When creating a config map based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you m... | kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new config map named 'db-config' using the specified keys and file paths | null |
Update image of all containers of daemonset nginx to 'ruby:3.0.2' | image | kubectl set image daemonset nginx *=ruby:3.0.2 | Update existing container image(s) of resources.
Possible resources include (case insensitive):
pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) | kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Update the image of all containers in the daemonset named 'nginx' to 'ruby:3.0.2' | null |
Import specific keys from a config map | env | kubectl set env --keys=LOG_LEVEL --from=configmap/app-config-dev deployment/log-aggregator-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import specific keys from a config map to a deployment | null |
Copy /tmp/foo_dir local file to /etc/kubernetes in a remote pod in namespace | cp | kubectl cp /tmp/foo_dir kube-node-lease/admin-dashboard-pod-16:/etc/kubernetes | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the local file /tmp/foo_dir to the remote pod admin-dashboard-pod-16 in the kube-node-lease namespace and place it in the /etc/kubernetes directory. | null |
Create a new secret named email-credentials-secret from an env file | secret generic | kubectl create secret generic email-credentials-secret --from-env-file=path/to/profiles.env | Create a secret based on a file, directory, or specified literal value.
A single secret may package one or more key/value pairs.
When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chos... | kubectl create generic NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new secret named email-credentials-secret from an environment file located at path/to/profiles.env | null |
Get output from running the 'node' command in code-explorer from pod monitoring-pod | exec | kubectl exec monitoring-pod -c code-explorer -- node | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Get the output from running the 'node' command in the 'code-explorer' container of the 'monitoring-pod' pod. | null |
Update pod 'vpn' by removing a label named 'bar' if it exists # Does not require the --overwrite flag | label | kubectl label pods vpn env- | Update the labels on a resource. | kubectl label [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If true, check the specified action in all namespaces. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to update the labels "
"flag": "--kustomize", "short": "-k", "de... | Remove the label 'env' from the 'vpn' pod | null |
Update deployment 'frontend-deployment' with a new environment variable | env | kubectl set env deployment/frontend-deployment DB_PASSWORD=secretpassword | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Add a new environment variable 'DB_PASSWORD' with the value 'secretpassword' to the 'frontend-deployment' deployment | null |
Create a service for an node deployment, which serves on port 80 and connects to the containers on port 8000 | expose | kubectl expose deployment node --port=8443 --target-port=808300 | Expose a resource as a new Kubernetes service.
Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible ... | kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to expose a service "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--labels", "s... | Expose a deployment named "node" as a service, listening on port 8443 and forwarding traffic to the containers on port 808300. | null |
Check to see if I can get the job named "image-processing-job" in namespace "default" | can-i | kubectl auth can-i list jobs.batch/image-processing-job -n default | Check whether an action is allowed.
VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubernetes resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL that starts with "/". NAME is the name of a particular Kubernetes resource. | kubectl auth can-i VERB [TYPE | TYPE/NAME | NONRESOURCEURL] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If true, check the specified action in all namespaces. "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "If true, suppress output and just return the exit code. " | Determine if the current user has permission to list the "image-processing-job" job in the "default" namespace. | null |
Set some of the local shell environment into a deployment config on the server | env | env | grep RAILS_ | kubectl set env -e - deployment/user-management-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Set the environment variables that start with "RAILS_" in your local shell environment into the "user-management-deployment" on the server. | null |
Set custom TLS server name to use for validation for the kube-cluster-1 cluster entry | set-cluster | kubectl config set-cluster kube-cluster-1 --tls-server-name=star-cluster | Set a cluster entry in kubeconfig.
Specifying a name that already exists will merge new fields on top of existing values for those fields. | kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/to/certificate/authority] [--insecure-skip-tls-verify=true] [--tls-server-name=example.com] | Set the custom TLS server name to "star-cluster" for the kube-cluster-1 cluster entry | null | |
Update pod 'monitoring' with the annotation 'SLA' and the value '99.9% uptime' # If the same annotation is set multiple times, only the last value will be applied | annotate | kubectl annotate pods monitoring SLA='99.9% uptime' | Update the annotations on one or more resources.
All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations... | kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If true, check the specified action in all namespaces. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to update the annotation "
"flag": "--kustomize", "short": "-k",... | Update the annotation 'SLA' of pod 'monitoring' to '99.9% uptime' | null |
Create a new config map named db-config with specified keys instead of file basenames on disk | configmap | kubectl create configmap db-config --from-file=settings=/path/to/properties/file1.txt --from-file=key2=/path/to/parameters/file2.txt | Create a config map based on a file, directory, or specified literal value.
A single config map may package one or more key/value pairs.
When creating a config map based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you m... | kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new config map named db-config using the specified keys instead of file basenames on disk | null |
Import specific keys from a config map | env | kubectl set env --keys=external_api_url --from=configmap/app-name-config deployment/proxy-service-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import specific keys from a config map into a deployment's environment variables | null |
Import specific keys from a config map | env | kubectl set env --keys=DEBUG_MODE --from=configmap/app-config deployment/scheduler-app-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import the DEBUG_MODE key from the app-config config map and set it as an environment variable for the scheduler-app-deployment deployment. | null |
Set a deployments alpine container cpu limits to "50m" and memory to "1Gi" | resources | kubectl set resources deployment alpine -c=nginx --limits=cpu=50m,memory=1Gi | Specify compute resource requirements (CPU, memory) for any resource that defines a pod template. If a pod is successfully scheduled, it is guaranteed the amount of resource requested, but may burst up to its specified limits.
For each compute resource, if a limit is specified and a request is omitted, the request wil... | kubectl set resources (-f FILENAME | TYPE NAME) ([--limits=LIMITS & --requests=REQUESTS] | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to ... | Set cpu and memory limits for a container in a deployment | null |
Create a new ClusterIP service named security-service-clusterip | service clusterip | kubectl create service clusterip security-service-clusterip --tcp=8181:8888 | Create a ClusterIP service with the specified name. | kubectl create service clusterip NAME [--tcp=<port>:<targetPort>] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | create a ClusterIP service named security-service-clusterip that maps port 8181 on the service to port 8888 on the pods. | null |
Import specific keys from a config map | env | kubectl set env --keys=API_KEY --from=configmap/db-config deployment/load-balancer-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import specific keys from a config map into an environment variable for a deployment | null |
Get output from running 'jenkins-plugin-cli' command from the first pod of the service payment-service, using the first container by default | exec | kubectl exec svc/payment-service -- jenkins-plugin-cli | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Get the output from running the 'jenkins-plugin-cli' command in the first container of the first pod of the 'payment-service' service. | null |
List deployments in YAML output format, in the "v3.0.0" version of the "web-apps" API group | get | kubectl get deployments.v3.0.0.web-apps -o yaml | Display one or many resources.
Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces.
Uninitia... | kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files iden... | List deployments in YAML output format in the specified version of the API group. | null |
Listen on ports 8081 and 6000 locally, forwarding data to/from ports 8080 and 6000 in the pod | port-forward | kubectl port-forward pod/backend-pod 8081 8080 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Listen on port 8081 locally and forward data to/from port 8080 in the backend-pod. | null | |
Set the user field on the client-1-context context entry without touching other values | set-context | kubectl config set-context client-1-context --user=cluster-admin | Set a context entry in kubeconfig.
Specifying a name that already exists will merge new fields on top of existing values for those fields. | kubectl config set-context [NAME | --current] [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace] | Update the user field to "cluster-admin" for the "client-1-context" context entry in the Kubernetes configuration. | null | |
Create a pod disruption budget named ingress-controller-pdb that will select all pods with the app=rails label # and require at least 9 of them being available at any point in time | poddisruptionbudget | kubectl create poddisruptionbudget ingress-controller-pdb --selector=app=rails --min-available=9 | Create a pod disruption budget with the specified name, selector, and desired minimum available pods. | kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a Pod Disruption Budget named ingress-controller-pdb that selects all pods with the app=rails label and ensures that at least 9 of them are available at any given time. | null |
Add a taint with key 'environment' on nodes having label component=proxy | taint | kubectl taint node -l component=proxy environment=kube-master-9:PreferNoSchedule | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint with key 'environment' on nodes having label component=proxy | null |
List one or more resources by their type and names | get | kubectl get rc/web service/auth-service-rc pods/api-service-pod | Display one or many resources.
Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces.
Uninitia... | kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files iden... | List the replication controller with the name "web", the service with the name "auth-service-rc", and the pod with the name "api-service-pod" | null |
Get output from running the 'mysqld' command in cosmic-container from pod auth-service-pod | exec | kubectl exec auth-service-pod -c cosmic-container -- mysqld | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Run the 'mysqld' command in the cosmic-container from the pod auth-service-pod | null |
Get output from running the 'go' command in mycontainer from pod database-pod | exec | kubectl exec database-pod -c mycontainer -- go | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Execute the 'go' command inside the container named 'mycontainer' of the 'database-pod' pod and retrieve the output. | null |
Embed certificate authority data for the cloud-cluster cluster entry | set-cluster | kubectl config set-cluster cloud-cluster --embed-certs --certificate-authority=~/.kube/cluster-beta/kubernetes.ca.crt | Set a cluster entry in kubeconfig.
Specifying a name that already exists will merge new fields on top of existing values for those fields. | kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/to/certificate/authority] [--insecure-skip-tls-verify=true] [--tls-server-name=example.com] | Embed the certificate authority data for the "cloud-cluster" cluster entry | null | |
Create a single ingress called 'public-service-ingress' that directs requests to foo.com/example to svc # svc1:8010 with a tls secret "my-cert" | ingress | kubectl create ingress public-service-ingress --rule="foo.com/example=svc1:8010,tls=my-cert" | Create an ingress with the specified name. | kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create an ingress named 'public-service-ingress' that directs requests for foo.com/example to the service 'svc1' on port 8010, and use the TLS secret named 'my-cert' | null |
Partially update a node using a strategic merge patch, specifying the patch as JSON | patch | kubectl patch node gpu-node-12 -p '{"spec":{"someField":"newValue"}' | Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch.
JSON and YAML formats are accepted. | kubectl patch (-f FILENAME | TYPE NAME) [-p PATCH|--patch-file FILE] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to update "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", "short": "-o... | Partially update the gpu-node-12 node by specifying the patch as JSON. Set the value of "someField" to "newValue". | null |
Get output from running the 'jenkins-plugin-cli' command in quantum-quark from pod auth-service-pod | exec | kubectl exec auth-service-pod -c quantum-quark -- jenkins-plugin-cli | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Run the 'jenkins-plugin-cli' command in the quantum-quark container of the auth-service-pod pod and print the output | null |
Return snapshot logs from container analytics-platform-deployment-1 of a deployment named log-aggregator-pod | logs | kubectl logs deployment/analytics-platform-deployment -c log-aggregator-pod-1 | Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional. | kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER] | "flag": "--container", "short": "-c", "default": "", "usage": "Print the logs of this container "
"flag": "--follow", "short": "-f", "default": "false", "usage": "Specify if the logs should be streamed. "
"flag": "--previous", "short": "-p", "default": "false", "usage": "If true, print the logs for the previous instanc... | Return the snapshot logs from the container named log-aggregator-pod-1 of the analytics-platform-deployment deployment. | null |
Create a deployment named nats that runs the amazonlinux image and expose port 7000 | deployment | kubectl create deployment nats --image=amazonlinux --port=7000 | Create a deployment with the specified name. | kubectl create deployment NAME --image=image -- [COMMAND] [args...] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--replicas", "short": "-r", "default": "1", "usage": "Number of replicas to create. Default is 1. " | Create a deployment named 'nats' using the 'amazonlinux' image and expose port 7000 | null |
Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace | cp | kubectl cp /tmp/foo kube-dns/message-broker-pod-15:/tmp/bar | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the local file /tmp/foo to the remote pod kube-dns/message-broker-pod-15 in the /tmp/bar directory. | null |
Set deployment proxy-service-deployment's service account to my-service-account | serviceaccount | kubectl set serviceaccount deployment proxy-service-deployment my-service-account | Update the service account of pod template resources.
Possible resources (case insensitive) can be:
replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset | kubectl set serviceaccount (-f FILENAME | TYPE NAME) SERVICE_ACCOUNT | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Set the service account of the deployment "proxy-service-deployment" to "my-service-account" | null |
Switch to raw terminal mode; sends stdin to 'bash' in time-machine from pod frontend-pod # and sends stdout/stderr from 'bash' back to the client | attach | kubectl attach frontend-pod -c time-machine -i -t | Attach to a process that is already running inside an existing container. | kubectl attach (POD | TYPE/NAME) -c CONTAINER | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "Only print o... | Switch to raw terminal mode and connect to the frontend-pod container named time-machine in order to interact with 'bash'. | null |
Listen on ports 8000 and 6000 locally, forwarding data to/from ports 8081 and 6000 in the pod | port-forward | kubectl port-forward pod/proxy-server-pod 8000 8081 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Forward local port 8000 to port 8081 in the pod named "proxy-server-pod" | null | |
Get output from running the 'python' command in astro-container from pod log-aggregator-pod | exec | kubectl exec log-aggregator-pod -c astro-container -- python | Execute a command in a container. | kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to ex... | Execute the 'python' command in the 'astro-container' inside the 'log-aggregator-pod' pod and retrieve the output. | null |
Listen on port 8888 on all addresses, forwarding to 8080 in the pod | port-forward | kubectl port-forward --address 0.0.0.0 pod/proxy-server-pod 8888:8080 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Forward traffic from port 8888 on all addresses to port 8080 in the 'proxy-server-pod' pod | null | |
Create a service for an wordpress deployment, which serves on port 80 and connects to the containers on port 8000 | expose | kubectl expose deployment wordpress --port=9000 --target-port=909000 | Expose a resource as a new Kubernetes service.
Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible ... | kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to expose a service "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--labels", "s... | Create a service for a WordPress deployment, exposing it on port 9000 and forwarding traffic to the containers on port 909000. | null |
Output modified deployment in YAML, and does not alter the object on the server | env | kubectl set env deployment/load-balancer-deployment CACHE_SIZE=64MB -o yaml | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Output the modified deployment in YAML format without applying the changes to the actual deployment object on the server. | null |
Set the cluster field in the my-context context to moon-cluster | set | kubectl config set contexts.team-beta-context.cluster moon-cluster | Set an individual value in a kubeconfig file.
PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.
PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless... | kubectl config set PROPERTY_NAME PROPERTY_VALUE | Set the cluster field of the my-context context to moon-cluster | null | |
Switch to raw terminal mode; sends stdin to 'bash' in nano-bot from pod monitoring-pod # and sends stdout/stderr from 'bash' back to the client | attach | kubectl attach monitoring-pod -c nano-bot -i -t | Attach to a process that is already running inside an existing container. | kubectl attach (POD | TYPE/NAME) -c CONTAINER | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "Only print o... | Interact with a pod's terminal in real-time | null |
Create a new ExternalName service named external-database-service | service externalname | kubectl create service externalname external-database-service --external-name education-edu.edu | Create an ExternalName service with the specified name.
ExternalName service references to an external DNS address instead of only pods, which will allow application authors to reference services that exist off platform, on other clusters, or locally. | kubectl create service externalname NAME --external-name external.name [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new ExternalName service named 'external-database-service' with the external name 'education-edu.edu' | null |
Listen on port 8000 on localhost and selected IP, forwarding to 8080 in the pod | port-forward | kubectl port-forward --address localhost,10.19.21.23 pod/log-aggregator-pod 8000:8080 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Listen on port 8000 on localhost and IP address 10.19.21.23, and forward the traffic to port 8080 in the pod 'log-aggregator-pod' | null | |
Add a taint with key 'disktype' on nodes having label region=eu-west-2 | taint | kubectl taint node -l region=eu-west-2 disktype=k8s-node-1:PreferNoSchedule | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint with key 'disktype' on nodes having label region=eu-west-2 | null |
Switch to raw terminal mode; sends stdin to 'bash' in time-machine from pod email-service-pod # and sends stdout/stderr from 'bash' back to the client | attach | kubectl attach email-service-pod -c time-machine -i -t | Attach to a process that is already running inside an existing container. | kubectl attach (POD | TYPE/NAME) -c CONTAINER | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "Only print o... | Attach to a specific container in a pod in interactive mode | null |
Listen on ports 8888 and 6000 locally, forwarding data to/from ports 9090 and 6000 in a pod selected by the deployment | port-forward | kubectl port-forward deployment/web-app-deployment 8888 9090 | Forward one or more local ports to a pod.
Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted.
If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun ... | kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] | Forward local port 8888 to port 9090 in the web-app-deployment pod selected by the deployment. | null | |
Update image of all containers of daemonset namespace-2 to 'ruby:3.0.2' | image | kubectl set image daemonset namespace-2 *=ruby:3.0.2 | Update existing container image(s) of resources.
Possible resources include (case insensitive):
pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) | kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Update the image of all containers in the daemonset 'namespace-2' to 'ruby:3.0.2' | null |
Delete pods and services with same names "gateway" and "backend" | delete | kubectl delete pod,service gateway backend | Delete resources by file names, stdin, resources and names, or by resources and label selector.
JSON and YAML formats are accepted. Only one type of argument may be specified: file names, resources and names, or resources and label selector.
Some resources, such as pods, support graceful deletion. These resources defin... | kubectl delete ([-f FILENAME] | [-k DIRECTORY] | TYPE [(NAME | -l label | --all)]) | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "containing the resource to delete. "
"fla... | Delete the pods and services with names "gateway" and "backend" | null |
Import specific keys from a config map | env | kubectl set env --keys=secret_key --from=configmap/db-config deployment/gateway-deployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import specific keys from a config map into a deployment. | null |
Create a deployment named prometheus that runs the redis image | deployment | kubectl create deployment prometheus --image=redis | Create a deployment with the specified name. | kubectl create deployment NAME --image=image -- [COMMAND] [args...] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--replicas", "short": "-r", "default": "1", "usage": "Number of replicas to create. Default is 1. " | Create a deployment named 'prometheus' using the 'redis' image | null |
Copy /tmp/foo local file to /etc/kubernetes in a remote pod in namespace | cp | kubectl cp /tmp/foo monitoring/image-resizer-pod-20:/etc/kubernetes | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the local file /tmp/foo to the remote pod named 'image-resizer-pod-20' in the 'monitoring' namespace, and place it in the /etc/kubernetes directory. | null |
Delete the saas-admin user | delete-user | kubectl config delete-user saas-admin | Delete the specified user from the kubeconfig. | kubectl config delete-user NAME | Delete the specified user from the Kubernetes configuration | null | |
Create a single ingress called 'myapp-ingress' that directs requests to foo.com/module to svc # svc1:3000 with a tls secret "my-cert" | ingress | kubectl create ingress myapp-ingress --rule="foo.com/module=svc1:3000,tls=my-cert" | Create an ingress with the specified name. | kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create an ingress resource called 'myapp-ingress' that directs requests from foo.com/module to the 'svc1' service on port 3000, using the 'my-cert' TLS secret. | null |
Update all deployments' and rc's nginx container's image to 'mongo:5.0.2' | image | kubectl set image deployments,rc mongo=mongo:5.0.2 --all | Update existing container image(s) of resources.
Possible resources include (case insensitive):
pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) | kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to get from a server. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", ... | Update all deployments and replication controllers (rc) with a container named 'mongo' to use the image 'mongo:5.0.2' | null |
Copy /tmp/foo_dir local file to :/tmp/bar in a remote pod in namespace | cp | kubectl cp /tmp/foo_dir argocd/metrics-exporter-pod-10::/tmp/bar | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the local file /tmp/foo_dir to the /tmp/bar directory of the metrics-exporter-pod-10 pod in the argocd namespace. | null |
Create a single ingress called 'external-ingress' that directs requests to testing.com/bar to svc # svc1:8010 with a tls secret "my-cert" | ingress | kubectl create ingress external-ingress --rule="testing.com/bar=svc1:8010,tls=my-cert" | Create an ingress with the specified name. | kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a single ingress called 'external-ingress' that directs requests to 'testing.com/bar' to service 'svc1:8010' with a TLS secret named "my-cert" | null |
List a single replication controller with specified NAME in ps output format | get | kubectl get replicationcontroller vpn-service-rc | Display one or many resources.
Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces.
Uninitia... | kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files iden... | List the 'vpn-service-rc' replication controller in the ps output format. | null |
List one or more resources by their type and names | get | kubectl get rc/web service/database-rc pods/proxy-server-pod | Display one or many resources.
Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces.
Uninitia... | kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns|custom-columns-file|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] | "flag": "--all-namespaces", "short": "-A", "default": "false", "usage": "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. "
"flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files iden... | List the specified resources by their type and names. | null |
Create a cron job with a command | cronjob | kubectl create cronjob log-rotation --image=wordpress --schedule="*/1 * * * *" -- mysql --version | Create a cron job with the specified name. | kubectl create cronjob NAME --image=image --schedule='0/5 * * * ?' -- [COMMAND] [args...] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a cron job named 'log-rotation' using the 'wordpress' image, with a schedule of running every minute, and executing the command 'mysql --version' | null |
Update a container's image; spec.containers[*].name is required because it's a merge key | patch | kubectl patch pod media-stream-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' | Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch.
JSON and YAML formats are accepted. | kubectl patch (-f FILENAME | TYPE NAME) [-p PATCH|--patch-file FILE] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to update "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--output", "short": "-o... | Update the image of a container in a pod by patching the pod's spec | null |
Add a taint with key 'workload' on nodes having label project=project-alpha | taint | kubectl taint node -l project=project-alpha workload=storage-node-13:PreferNoSchedule | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint with key 'workload' on nodes having label project=project-alpha | null |
Create a service for a replicated php using replica set, which serves on port 80 and connects to the containers on port 8000 | expose | kubectl expose rs php --port=3001 --target-port=500000 | Expose a resource as a new Kubernetes service.
Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible ... | kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "Filename, directory, or URL to files identifying the resource to expose a service "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process the kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--labels", "s... | Create a service for the replicated php using the replica set | null |
Start a postgres pod and set labels "app=postgres" and "env=prod" in the container | run | kubectl run hazelcast --image=postgres --labels="app=postgres,env=prod" | Create and run a particular image in a pod. | kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...] | "flag": "--filename", "short": "-f", "default": "[]", "usage": "to use to replace the resource. "
"flag": "--kustomize", "short": "-k", "default": "", "usage": "Process a kustomization directory. This flag can't be used together with -f or -R. "
"flag": "--labels", "short": "-l", "default": "", "usage": "Comma separate... | Create a pod with the postgres image and set labels "app=postgres" and "env=prod" in the container | null |
Update node 'k8s-node-1' with a taint with key 'hardware' and value 'gpu' and effect 'NoExecute' # If a taint with that key and effect already exists, its value is replaced as specified | taint | kubectl taint nodes k8s-node-1 hardware=gpu:NoExecute | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint to node 'k8s-node-1' with key 'hardware', value 'gpu', and effect 'NoExecute' | null |
Create a copy of mypod adding a debug container and changing container images | debug | kubectl debug mypod -it --copy-to=dgb-img --image=debian --set-image=mailer=mailer:latest,logger=logging-app:debug | Debug cluster resources using interactive debugging containers.
'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified.
The action taken by 'debug' varies depending on what resource is specified. Supported acti... | kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ] | "flag": "--container", "short": "-c", "default": "", "usage": "Container name to use for debug container. "
"flag": "--quiet", "short": "-q", "default": "false", "usage": "If true, suppress informational messages. "
"flag": "--stdin", "short": "-i", "default": "false", "usage": "Keep stdin open on the container(s) in t... | Create a copy of the mypod pod with a debug container and changing the container images of mailer to mailer:latest and logger to logging-app:debug | null |
Copy :/tmp/foo local file to /etc/kubernetes in a remote pod in a specific container | cp | kubectl cp :/tmp/foo api-server-pod-3:/etc/kubernetes -c web-app-container | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the file named "foo" from the "/tmp" directory in the local machine to the "/etc/kubernetes" directory in the "api-server-pod-3" pod, specifically in the "web-app-container" container. | null |
Create a new secret named gcp-service-account-secret with keys for each file in folder bar | secret generic | kubectl create secret generic gcp-service-account-secret --from-file=path/to/settings | Create a secret based on a file, directory, or specified literal value.
A single secret may package one or more key/value pairs.
When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chos... | kubectl create generic NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new secret named gcp-service-account-secret in the default namespace using the files in the path/to/settings folder. | null |
Create a deployment named drupal that runs the mcr.microsoft.com/dotnet/core/runtime image and expose port 9000 | deployment | kubectl create deployment drupal --image=mcr.microsoft.com/dotnet/core/runtime --port=9000 | Create a deployment with the specified name. | kubectl create deployment NAME --image=image -- [COMMAND] [args...] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--replicas", "short": "-r", "default": "1", "usage": "Number of replicas to create. Default is 1. " | Create a deployment named "drupal" that runs the "mcr.microsoft.com/dotnet/core/runtime" image and exposes port 9000 | null |
Create a pod disruption budget named elastic-search-pdb that will select all pods with the role=worker label # and require minimum one of them being available at any point in time | poddisruptionbudget | kubectl create poddisruptionbudget elastic-search-pdb --selector=role=worker --min-available=1 | Create a pod disruption budget with the specified name, selector, and desired minimum available pods. | kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a pod disruption budget named 'elastic-search-pdb' that selects all pods with the 'role=worker' label and requires a minimum of one of them to be available at any point in time. | null |
Create a new ClusterIP service named cache-service-clusterip | service clusterip | kubectl create service clusterip cache-service-clusterip --tcp=3001:3000 | Create a ClusterIP service with the specified name. | kubectl create service clusterip NAME [--tcp=<port>:<targetPort>] [--dry-run=server|client|none] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create a new ClusterIP service named cache-service-clusterip and forward traffic from port 3001 to port 3000 | null |
Update deployment 'email-server-deployment' with a new environment variable | env | kubectl set env deployment/email-server-deployment SMTP_PASSWORD=your-password | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Update the 'email-server-deployment' deployment by setting the 'SMTP_PASSWORD' environment variable to 'your-password' | null |
Add a taint with key 'hardware' on nodes having label customer=acme-corp | taint | kubectl taint node -l customer=acme-corp hardware=app-node-6:PreferNoSchedule | Update the taints on one or more nodes. | kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. "
"flag": "--selector", "short": "-l", "default": "", "usage": "Selector (label query) to filter on, supports '=', '==', and '!='.... | Add a taint with the key 'hardware' on nodes that have the label 'customer=acme-corp'. | null |
Copy /var/run/secrets/kubernetes.io/serviceaccount/ from a remote pod to /tmp/bar locally | cp | kubectl cp kube-node-lease/ingress-controller-pod-8:/var/run/secrets/kubernetes.io/serviceaccount/ /tmp/bar | Copy files and directories to and from containers. | kubectl cp <file-spec-src> <file-spec-dest> | "flag": "--container", "short": "-c", "default": "", "usage": "Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation for selecting the container to be attached or the first container in the pod will be chosen " | Copy the /var/run/secrets/kubernetes.io/serviceaccount/ directory from a remote pod named ingress-controller-pod-8 in the kube-node-lease namespace to the /tmp/bar directory on your local machine | null |
Import specific keys from a config map | env | kubectl set env --keys=redis_host --from=configmap/app-config deployment/mydeployment | Update environment variables on a pod template.
List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable ... | kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N | "flag": "--containers", "short": "-c", "default": "*", "usage": "The names of containers in the selected pod templates to change - may use wildcards "
"flag": "--env", "short": "-e", "default": "[]", "usage": "Specify a key-value pair for an environment variable to set into each container. "
"flag": "--filename", "shor... | Import the redis_host key from the app-config config map to the mydeployment deployment. | null |
Create a single ingress called 'app-ingress' that directs requests to testing.com/input to svc # svc1:6379 with a tls secret "my-cert" | ingress | kubectl create ingress app-ingress --rule="testing.com/input=svc1:6379,tls=my-cert" | Create an ingress with the specified name. | kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] | "flag": "--output", "short": "-o", "default": "", "usage": "Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file. " | Create an ingress called 'app-ingress' with a rule that directs requests from testing.com/input to svc1:6379 | null |
Set the cluster field in the my-context context to staging-cluster | set | kubectl config set contexts.dev-context.cluster staging-cluster | Set an individual value in a kubeconfig file.
PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots.
PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless... | kubectl config set PROPERTY_NAME PROPERTY_VALUE | Set the cluster field in the dev-context context to staging-cluster | null |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 12