kubernetes reference nolist true contenttype tool reference title kubectl create weight 30 autogenerated true

Answer:
---
title: kubectl create
content_type: tool-reference
weight: 30
auto_generated: true
no_list: true
---

##

Create a resource from a file or from stdin.

 JSON and YAML formats are accepted.

```
kubectl create -f FILENAME
```

##

```
  # Create a pod using the data in pod.json
  kubectl create -f ./pod.json

  # Create a pod based on the JSON passed into stdin
  cat pod.json | kubectl create -f -

  # Edit the data in registry.yaml in JSON then create the resource using the edited data
  kubectl create -f registry.yaml --edit -o json
```

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--allow-missing-template-keys     Default: true

If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.

--dry-run string[="unchanged"]     Default: "none"

Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.

--edit

Edit the API resource before creating

--field-manager string     Default: "kubectl-create"

Name of the manager used to track field ownership.

-f, --filename strings

Filename, directory, or URL to files to use to create the resource

-h, --help

help for create

-k, --kustomize string

Process the kustomization directory. This flag can't be used together with -f or -R.

-o, --output string

Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).

--raw string

Raw URI to POST to the server.  Uses the transport specified by the kubeconfig file.

-R, --recursive

Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.

--save-config

If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.

-l, --selector string

Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.

--show-managed-fields

If true, keep the managedFields when printing objects in JSON or YAML format.

--template string

Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

--validate string[="strict"]     Default: "strict"

Must be one of: strict (or true), warn, ignore (or false).
"true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.
"warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise.
"false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.

--windows-line-endings

Only relevant if --edit=true. Defaults to the line ending native to your platform.

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--as string

Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group strings

Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid string

UID to impersonate for the operation.

--cache-dir string     Default: "$HOME/.kube/cache"

Default cache directory

--certificate-authority string

Path to a cert file for the certificate authority

--client-certificate string

Path to a client certificate file for TLS

--client-key string

Path to a client key file for TLS

--cluster string

The name of the kubeconfig cluster to use

--context string

The name of the kubeconfig context to use

--default-not-ready-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.

--default-unreachable-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig string

Path to the kubeconfig file to use for CLI requests.

--match-server-version

Require server version to match client version

-n, --namespace string

If present, the namespace scope for this CLI request

--password string

Password for basic authentication to the API server

--profile string     Default: "none"

Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output string     Default: "profile.pprof"

Name of the file to write the profile to

--request-timeout string     Default: "0"

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server string

The address and port of the Kubernetes API server

--storage-driver-buffer-duration duration     Default: 1m0s

Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction

--storage-driver-db string     Default: "cadvisor"

database name

--storage-driver-host string     Default: "localhost:8086"

database host:port

--storage-driver-password string     Default: "root"

database password

--storage-driver-secure

use secure connection with database

--storage-driver-table string     Default: "stats"

table name

--storage-driver-user string     Default: "root"

database username

--tls-server-name string

Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token string

Bearer token for authentication to the API server

--user string

The name of the kubeconfig user to use

--username string

Username for basic authentication to the API server

--version version[=true]

--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

--warnings-as-errors

Treat warnings received from the server as errors and exit with a non-zero exit code

##

* [kubectl](../kubectl/)	 - kubectl controls the Kubernetes cluster manager
* [kubectl create clusterrole](kubectl_create_clusterrole/)	 - Create a cluster role
* [kubectl create clusterrolebinding](kubectl_create_clusterrolebinding/)	 - Create a cluster role binding for a particular cluster role
* [kubectl create configmap](kubectl_create_configmap/)	 - Create a config map from a local file, directory or literal value
* [kubectl create cronjob](kubectl_create_cronjob/)	 - Create a cron job with the specified name
* [kubectl create deployment](kubectl_create_deployment/)	 - Create a deployment with the specified name
* [kubectl create ingress](kubectl_create_ingress/)	 - Create an ingress with the specified name
* [kubectl create job](kubectl_create_job/)	 - Create a job with the specified name
* [kubectl create namespace](kubectl_create_namespace/)	 - Create a namespace with the specified name
* [kubectl create poddisruptionbudget](kubectl_create_poddisruptionbudget/)	 - Create a pod disruption budget with the specified name
* [kubectl create priorityclass](kubectl_create_priorityclass/)	 - Create a priority class with the specified name
* [kubectl create quota](kubectl_create_quota/)	 - Create a quota with the specified name
* [kubectl create role](kubectl_create_role/)	 - Create a role with single rule
* [kubectl create rolebinding](kubectl_create_rolebinding/)	 - Create a role binding for a particular role or cluster role
* [kubectl create secret](kubectl_create_secret/)	 - Create a secret using a specified subcommand
* [kubectl create service](kubectl_create_service/)	 - Create a service using a specified subcommand
* [kubectl create serviceaccount](kubectl_create_serviceaccount/)	 - Create a service account with the specified name
* [kubectl create token](kubectl_create_token/)	 - Request a service account token

title  kubectl create content type  tool reference weight  30 auto generated  true no list  true            The file is auto generated from the Go source code of the component using a generic  generator  https   github com kubernetes sigs reference docs    To learn how to generate the reference documentation  please read  Contributing to the reference documentation   docs contribute generate ref docs    To update the reference content  please follow the  Contributing upstream   docs contribute generate ref docs contribute upstream   guide  You can file document formatting bugs against the  reference docs  https   github com kubernetes sigs reference docs   project              Create a resource from a file or from stdin    JSON and YAML formats are accepted       kubectl create  f FILENAME                   Create a pod using the data in pod json   kubectl create  f   pod json        Create a pod based on the JSON passed into stdin   cat pod json   kubectl create  f          Edit the data in registry yaml in JSON then create the resource using the edited data   kubectl create  f registry yaml   edit  o json               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    allow missing template keys nbsp  nbsp  nbsp  nbsp  nbsp Default  true  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  ignore any errors in templates when a field or map key is missing in the template  Only applies to golang and jsonpath output formats   p   td    tr    tr   td colspan  2    dry run string   unchanged   nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Must be  quot none quot    quot server quot   or  quot client quot   If client strategy  only print the object that would be sent  without sending it  If server strategy  submit server side request without persisting the resource   p   td    tr    tr   td colspan  2    edit  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Edit the API resource before creating  p   td    tr    tr   td colspan  2    field manager string nbsp  nbsp  nbsp  nbsp  nbsp Default   kubectl create   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the manager used to track field ownership   p   td    tr    tr   td colspan  2   f    filename strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Filename  directory  or URL to files to use to create the resource  p   td    tr    tr   td colspan  2   h    help  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p help for create  p   td    tr    tr   td colspan  2   k    kustomize string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Process the kustomization directory  This flag can t be used together with  f or  R   p   td    tr    tr   td colspan  2   o    output string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Output format  One of   json  yaml  name  go template  go template file  template  templatefile  jsonpath  jsonpath as json  jsonpath file    p   td    tr    tr   td colspan  2    raw string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Raw URI to POST to the server   Uses the transport specified by the kubeconfig file   p   td    tr    tr   td colspan  2   R    recursive  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Process the directory used in  f    filename recursively  Useful when you want to manage related manifests organized within the same directory   p   td    tr    tr   td colspan  2    save config  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the configuration of current object will be saved in its annotation  Otherwise  the annotation will be unchanged  This flag is useful when you want to perform kubectl apply on this object in the future   p   td    tr    tr   td colspan  2   l    selector string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Selector  label query  to filter on  supports            and       e g   l key1 value1 key2 value2   Matching objects must satisfy all of the specified label constraints   p   td    tr    tr   td colspan  2    show managed fields  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the managedFields when printing objects in JSON or YAML format   p   td    tr    tr   td colspan  2    template string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Template string or path to template file to use when  o go template   o go template file  The template format is golang templates  http   golang org pkg text template  pkg overview    p   td    tr    tr   td colspan  2    validate string   strict   nbsp  nbsp  nbsp  nbsp  nbsp Default   strict   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Must be one of  strict  or true   warn  ignore  or false   br   quot true quot  or  quot strict quot  will use a schema to validate the input and fail the request if invalid  It will perform server side validation if ServerSideFieldValidation is enabled on the api server  but will fall back to less reliable client side validation if not  br   quot warn quot  will warn about unknown or duplicate fields without blocking the request if server side field validation is enabled on the API server  and behave as  quot ignore quot  otherwise  br   quot false quot  or  quot ignore quot  will not perform any schema validation  silently dropping any unknown or duplicate fields   p   td    tr    tr   td colspan  2    windows line endings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Only relevant if   edit true  Defaults to the line ending native to your platform   p   td    tr     tbody    table              table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    as string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username to impersonate for the operation  User could be a regular user or a service account in a namespace   p   td    tr    tr   td colspan  2    as group strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Group to impersonate for the operation  this flag can be repeated to specify multiple groups   p   td    tr    tr   td colspan  2    as uid string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p UID to impersonate for the operation   p   td    tr    tr   td colspan  2    cache dir string nbsp  nbsp  nbsp  nbsp  nbsp Default    HOME  kube cache   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Default cache directory  p   td    tr    tr   td colspan  2    certificate authority string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a cert file for the certificate authority  p   td    tr    tr   td colspan  2    client certificate string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client certificate file for TLS  p   td    tr    tr   td colspan  2    client key string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client key file for TLS  p   td    tr    tr   td colspan  2    cluster string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig cluster to use  p   td    tr    tr   td colspan  2    context string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig context to use  p   td    tr    tr   td colspan  2    default not ready toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for notReady NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    default unreachable toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for unreachable NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    disable compression  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  opt out of response compression for all requests to the server  p   td    tr    tr   td colspan  2    insecure skip tls verify  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the server s certificate will not be checked for validity  This will make your HTTPS connections insecure  p   td    tr    tr   td colspan  2    kubeconfig string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to the kubeconfig file to use for CLI requests   p   td    tr    tr   td colspan  2    match server version  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Require server version to match client version  p   td    tr    tr   td colspan  2   n    namespace string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If present  the namespace scope for this CLI request  p   td    tr    tr   td colspan  2    password string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Password for basic authentication to the API server  p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of profile to capture  One of  none cpu heap goroutine threadcreate block mutex   p   td    tr    tr   td colspan  2    profile output string nbsp  nbsp  nbsp  nbsp  nbsp Default   profile pprof   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the file to write the profile to  p   td    tr    tr   td colspan  2    request timeout string nbsp  nbsp  nbsp  nbsp  nbsp Default   0   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up on a single server request  Non zero values should contain a corresponding time unit  e g  1s  2m  3h   A value of zero means don t timeout requests   p   td    tr    tr   td colspan  2   s    server string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The address and port of the Kubernetes API server  p   td    tr    tr   td colspan  2    storage driver buffer duration duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Writes in the storage driver will be buffered for this duration  and committed to the non memory backends as a single transaction  p   td    tr    tr   td colspan  2    storage driver db string nbsp  nbsp  nbsp  nbsp  nbsp Default   cadvisor   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database name  p   td    tr    tr   td colspan  2    storage driver host string nbsp  nbsp  nbsp  nbsp  nbsp Default   localhost 8086   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database host port  p   td    tr    tr   td colspan  2    storage driver password string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database password  p   td    tr    tr   td colspan  2    storage driver secure  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p use secure connection with database  p   td    tr    tr   td colspan  2    storage driver table string nbsp  nbsp  nbsp  nbsp  nbsp Default   stats   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p table name  p   td    tr    tr   td colspan  2    storage driver user string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database username  p   td    tr    tr   td colspan  2    tls server name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Server name to use for server certificate validation  If it is not provided  the hostname used to contact the server is used  p   td    tr    tr   td colspan  2    token string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Bearer token for authentication to the API server  p   td    tr    tr   td colspan  2    user string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig user to use  p   td    tr    tr   td colspan  2    username string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username for basic authentication to the API server  p   td    tr    tr   td colspan  2    version version  true   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p   version    version raw prints version information and quits    version vX Y Z    sets the reported version  p   td    tr    tr   td colspan  2    warnings as errors  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Treat warnings received from the server as errors and exit with a non zero exit code  p   td    tr     tbody    table             kubectl     kubectl      kubectl controls the Kubernetes cluster manager    kubectl create clusterrole  kubectl create clusterrole      Create a cluster role    kubectl create clusterrolebinding  kubectl create clusterrolebinding      Create a cluster role binding for a particular cluster role    kubectl create configmap  kubectl create configmap      Create a config map from a local file  directory or literal value    kubectl create cronjob  kubectl create cronjob      Create a cron job with the specified name    kubectl create deployment  kubectl create deployment      Create a deployment with the specified name    kubectl create ingress  kubectl create ingress      Create an ingress with the specified name    kubectl create job  kubectl create job      Create a job with the specified name    kubectl create namespace  kubectl create namespace      Create a namespace with the specified name    kubectl create poddisruptionbudget  kubectl create poddisruptionbudget      Create a pod disruption budget with the specified name    kubectl create priorityclass  kubectl create priorityclass      Create a priority class with the specified name    kubectl create quota  kubectl create quota      Create a quota with the specified name    kubectl create role  kubectl create role      Create a role with single rule    kubectl create rolebinding  kubectl create rolebinding      Create a role binding for a particular role or cluster role    kubectl create secret  kubectl create secret      Create a secret using a specified subcommand    kubectl create service  kubectl create service      Create a service using a specified subcommand    kubectl create serviceaccount  kubectl create serviceaccount      Create a service account with the specified name    kubectl create token  kubectl create token      Request a service account token


kubernetes reference nolist true contenttype tool reference weight 30 autogenerated true title kubectl api versions

Answer:
---
title: kubectl api-versions
content_type: tool-reference
weight: 30
auto_generated: true
no_list: true
---

##

Print the supported API versions on the server, in the form of "group/version".

```
kubectl api-versions
```

##

```
  # Print the supported API versions
  kubectl api-versions
```

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

-h, --help

help for api-versions

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--as string

Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group strings

Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid string

UID to impersonate for the operation.

--cache-dir string     Default: "$HOME/.kube/cache"

Default cache directory

--certificate-authority string

Path to a cert file for the certificate authority

--client-certificate string

Path to a client certificate file for TLS

--client-key string

Path to a client key file for TLS

--cluster string

The name of the kubeconfig cluster to use

--context string

The name of the kubeconfig context to use

--default-not-ready-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.

--default-unreachable-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig string

Path to the kubeconfig file to use for CLI requests.

--match-server-version

Require server version to match client version

-n, --namespace string

If present, the namespace scope for this CLI request

--password string

Password for basic authentication to the API server

--profile string     Default: "none"

Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output string     Default: "profile.pprof"

Name of the file to write the profile to

--request-timeout string     Default: "0"

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server string

The address and port of the Kubernetes API server

--storage-driver-buffer-duration duration     Default: 1m0s

Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction

--storage-driver-db string     Default: "cadvisor"

database name

--storage-driver-host string     Default: "localhost:8086"

database host:port

--storage-driver-password string     Default: "root"

database password

--storage-driver-secure

use secure connection with database

--storage-driver-table string     Default: "stats"

table name

--storage-driver-user string     Default: "root"

database username

--tls-server-name string

Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token string

Bearer token for authentication to the API server

--user string

The name of the kubeconfig user to use

--username string

Username for basic authentication to the API server

--version version[=true]

--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

--warnings-as-errors

Treat warnings received from the server as errors and exit with a non-zero exit code

##

* [kubectl](../kubectl/)	 - kubectl controls the Kubernetes cluster manager

title  kubectl api versions content type  tool reference weight  30 auto generated  true no list  true            The file is auto generated from the Go source code of the component using a generic  generator  https   github com kubernetes sigs reference docs    To learn how to generate the reference documentation  please read  Contributing to the reference documentation   docs contribute generate ref docs    To update the reference content  please follow the  Contributing upstream   docs contribute generate ref docs contribute upstream   guide  You can file document formatting bugs against the  reference docs  https   github com kubernetes sigs reference docs   project              Print the supported API versions on the server  in the form of  group version        kubectl api versions                   Print the supported API versions   kubectl api versions               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2   h    help  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p help for api versions  p   td    tr     tbody    table              table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    as string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username to impersonate for the operation  User could be a regular user or a service account in a namespace   p   td    tr    tr   td colspan  2    as group strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Group to impersonate for the operation  this flag can be repeated to specify multiple groups   p   td    tr    tr   td colspan  2    as uid string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p UID to impersonate for the operation   p   td    tr    tr   td colspan  2    cache dir string nbsp  nbsp  nbsp  nbsp  nbsp Default    HOME  kube cache   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Default cache directory  p   td    tr    tr   td colspan  2    certificate authority string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a cert file for the certificate authority  p   td    tr    tr   td colspan  2    client certificate string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client certificate file for TLS  p   td    tr    tr   td colspan  2    client key string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client key file for TLS  p   td    tr    tr   td colspan  2    cluster string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig cluster to use  p   td    tr    tr   td colspan  2    context string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig context to use  p   td    tr    tr   td colspan  2    default not ready toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for notReady NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    default unreachable toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for unreachable NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    disable compression  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  opt out of response compression for all requests to the server  p   td    tr    tr   td colspan  2    insecure skip tls verify  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the server s certificate will not be checked for validity  This will make your HTTPS connections insecure  p   td    tr    tr   td colspan  2    kubeconfig string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to the kubeconfig file to use for CLI requests   p   td    tr    tr   td colspan  2    match server version  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Require server version to match client version  p   td    tr    tr   td colspan  2   n    namespace string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If present  the namespace scope for this CLI request  p   td    tr    tr   td colspan  2    password string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Password for basic authentication to the API server  p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of profile to capture  One of  none cpu heap goroutine threadcreate block mutex   p   td    tr    tr   td colspan  2    profile output string nbsp  nbsp  nbsp  nbsp  nbsp Default   profile pprof   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the file to write the profile to  p   td    tr    tr   td colspan  2    request timeout string nbsp  nbsp  nbsp  nbsp  nbsp Default   0   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up on a single server request  Non zero values should contain a corresponding time unit  e g  1s  2m  3h   A value of zero means don t timeout requests   p   td    tr    tr   td colspan  2   s    server string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The address and port of the Kubernetes API server  p   td    tr    tr   td colspan  2    storage driver buffer duration duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Writes in the storage driver will be buffered for this duration  and committed to the non memory backends as a single transaction  p   td    tr    tr   td colspan  2    storage driver db string nbsp  nbsp  nbsp  nbsp  nbsp Default   cadvisor   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database name  p   td    tr    tr   td colspan  2    storage driver host string nbsp  nbsp  nbsp  nbsp  nbsp Default   localhost 8086   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database host port  p   td    tr    tr   td colspan  2    storage driver password string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database password  p   td    tr    tr   td colspan  2    storage driver secure  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p use secure connection with database  p   td    tr    tr   td colspan  2    storage driver table string nbsp  nbsp  nbsp  nbsp  nbsp Default   stats   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p table name  p   td    tr    tr   td colspan  2    storage driver user string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database username  p   td    tr    tr   td colspan  2    tls server name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Server name to use for server certificate validation  If it is not provided  the hostname used to contact the server is used  p   td    tr    tr   td colspan  2    token string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Bearer token for authentication to the API server  p   td    tr    tr   td colspan  2    user string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig user to use  p   td    tr    tr   td colspan  2    username string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username for basic authentication to the API server  p   td    tr    tr   td colspan  2    version version  true   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p   version    version raw prints version information and quits    version vX Y Z    sets the reported version  p   td    tr    tr   td colspan  2    warnings as errors  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Treat warnings received from the server as errors and exit with a non zero exit code  p   td    tr     tbody    table             kubectl     kubectl      kubectl controls the Kubernetes cluster manager


kubernetes reference nolist true contenttype tool reference title kubectl exec weight 30 autogenerated true

Answer:
---
title: kubectl exec
content_type: tool-reference
weight: 30
auto_generated: true
no_list: true
---

##

Execute a command in a container.

```
kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...]
```

##

```
  # Get output from running the 'date' command from pod mypod, using the first container by default
  kubectl exec mypod -- date

  # Get output from running the 'date' command in ruby-container from pod mypod
  kubectl exec mypod -c ruby-container -- date

  # Switch to raw terminal mode; sends stdin to 'bash' in ruby-container from pod mypod
  # and sends stdout/stderr from 'bash' back to the client
  kubectl exec mypod -c ruby-container -i -t -- bash -il

  # List contents of /usr from the first container of pod mypod and sort by modification time
  # If the command you want to execute in the pod has any flags in common (e.g. -i),
  # you must use two dashes (--) to separate your command's flags/arguments
  # Also note, do not surround your command and its flags/arguments with quotes
  # unless that is how you would execute it normally (i.e., do ls -t /usr, not "ls -t /usr")
  kubectl exec mypod -i -t -- ls -t /usr

  # Get output from running 'date' command from the first pod of the deployment mydeployment, using the first container by default
  kubectl exec deploy/mydeployment -- date

  # Get output from running 'date' command from the first pod of the service myservice, using the first container by default
  kubectl exec svc/myservice -- date
```

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

-c, --container string

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

-f, --filename strings

to use to exec into the resource

-h, --help

help for exec

--pod-running-timeout duration     Default: 1m0s

The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running

-q, --quiet

Only print output from the remote session

-i, --stdin

Pass stdin to the container

-t, --tty

Stdin is a TTY

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--as string

Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group strings

Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid string

UID to impersonate for the operation.

--cache-dir string     Default: "$HOME/.kube/cache"

Default cache directory

--certificate-authority string

Path to a cert file for the certificate authority

--client-certificate string

Path to a client certificate file for TLS

--client-key string

Path to a client key file for TLS

--cluster string

The name of the kubeconfig cluster to use

--context string

The name of the kubeconfig context to use

--default-not-ready-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.

--default-unreachable-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig string

Path to the kubeconfig file to use for CLI requests.

--match-server-version

Require server version to match client version

-n, --namespace string

If present, the namespace scope for this CLI request

--password string

Password for basic authentication to the API server

--profile string     Default: "none"

Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output string     Default: "profile.pprof"

Name of the file to write the profile to

--request-timeout string     Default: "0"

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server string

The address and port of the Kubernetes API server

--storage-driver-buffer-duration duration     Default: 1m0s

Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction

--storage-driver-db string     Default: "cadvisor"

database name

--storage-driver-host string     Default: "localhost:8086"

database host:port

--storage-driver-password string     Default: "root"

database password

--storage-driver-secure

use secure connection with database

--storage-driver-table string     Default: "stats"

table name

--storage-driver-user string     Default: "root"

database username

--tls-server-name string

Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token string

Bearer token for authentication to the API server

--user string

The name of the kubeconfig user to use

--username string

Username for basic authentication to the API server

--version version[=true]

--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

--warnings-as-errors

Treat warnings received from the server as errors and exit with a non-zero exit code

##

* [kubectl](../kubectl/)	 - kubectl controls the Kubernetes cluster manager

title  kubectl exec content type  tool reference weight  30 auto generated  true no list  true            The file is auto generated from the Go source code of the component using a generic  generator  https   github com kubernetes sigs reference docs    To learn how to generate the reference documentation  please read  Contributing to the reference documentation   docs contribute generate ref docs    To update the reference content  please follow the  Contributing upstream   docs contribute generate ref docs contribute upstream   guide  You can file document formatting bugs against the  reference docs  https   github com kubernetes sigs reference docs   project              Execute a command in a container       kubectl exec  POD   TYPE NAME    c CONTAINER   flags     COMMAND  args                       Get output from running the  date  command from pod mypod  using the first container by default   kubectl exec mypod    date        Get output from running the  date  command in ruby container from pod mypod   kubectl exec mypod  c ruby container    date        Switch to raw terminal mode  sends stdin to  bash  in ruby container from pod mypod     and sends stdout stderr from  bash  back to the client   kubectl exec mypod  c ruby container  i  t    bash  il        List contents of  usr from the first container of pod mypod and sort by modification time     If the command you want to execute in the pod has any flags in common  e g   i       you must use two dashes      to separate your command s flags arguments     Also note  do not surround your command and its flags arguments with quotes     unless that is how you would execute it normally  i e   do ls  t  usr  not  ls  t  usr     kubectl exec mypod  i  t    ls  t  usr        Get output from running  date  command from the first pod of the deployment mydeployment  using the first container by default   kubectl exec deploy mydeployment    date        Get output from running  date  command from the first pod of the service myservice  using the first container by default   kubectl exec svc myservice    date               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2   c    container string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p 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  p   td    tr    tr   td colspan  2   f    filename strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p to use to exec into the resource  p   td    tr    tr   td colspan  2   h    help  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p help for exec  p   td    tr    tr   td colspan  2    pod running timeout duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time  like 5s  2m  or 3h  higher than zero  to wait until at least one pod is running  p   td    tr    tr   td colspan  2   q    quiet  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Only print output from the remote session  p   td    tr    tr   td colspan  2   i    stdin  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Pass stdin to the container  p   td    tr    tr   td colspan  2   t    tty  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Stdin is a TTY  p   td    tr     tbody    table              table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    as string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username to impersonate for the operation  User could be a regular user or a service account in a namespace   p   td    tr    tr   td colspan  2    as group strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Group to impersonate for the operation  this flag can be repeated to specify multiple groups   p   td    tr    tr   td colspan  2    as uid string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p UID to impersonate for the operation   p   td    tr    tr   td colspan  2    cache dir string nbsp  nbsp  nbsp  nbsp  nbsp Default    HOME  kube cache   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Default cache directory  p   td    tr    tr   td colspan  2    certificate authority string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a cert file for the certificate authority  p   td    tr    tr   td colspan  2    client certificate string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client certificate file for TLS  p   td    tr    tr   td colspan  2    client key string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client key file for TLS  p   td    tr    tr   td colspan  2    cluster string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig cluster to use  p   td    tr    tr   td colspan  2    context string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig context to use  p   td    tr    tr   td colspan  2    default not ready toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for notReady NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    default unreachable toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for unreachable NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    disable compression  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  opt out of response compression for all requests to the server  p   td    tr    tr   td colspan  2    insecure skip tls verify  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the server s certificate will not be checked for validity  This will make your HTTPS connections insecure  p   td    tr    tr   td colspan  2    kubeconfig string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to the kubeconfig file to use for CLI requests   p   td    tr    tr   td colspan  2    match server version  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Require server version to match client version  p   td    tr    tr   td colspan  2   n    namespace string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If present  the namespace scope for this CLI request  p   td    tr    tr   td colspan  2    password string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Password for basic authentication to the API server  p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of profile to capture  One of  none cpu heap goroutine threadcreate block mutex   p   td    tr    tr   td colspan  2    profile output string nbsp  nbsp  nbsp  nbsp  nbsp Default   profile pprof   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the file to write the profile to  p   td    tr    tr   td colspan  2    request timeout string nbsp  nbsp  nbsp  nbsp  nbsp Default   0   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up on a single server request  Non zero values should contain a corresponding time unit  e g  1s  2m  3h   A value of zero means don t timeout requests   p   td    tr    tr   td colspan  2   s    server string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The address and port of the Kubernetes API server  p   td    tr    tr   td colspan  2    storage driver buffer duration duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Writes in the storage driver will be buffered for this duration  and committed to the non memory backends as a single transaction  p   td    tr    tr   td colspan  2    storage driver db string nbsp  nbsp  nbsp  nbsp  nbsp Default   cadvisor   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database name  p   td    tr    tr   td colspan  2    storage driver host string nbsp  nbsp  nbsp  nbsp  nbsp Default   localhost 8086   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database host port  p   td    tr    tr   td colspan  2    storage driver password string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database password  p   td    tr    tr   td colspan  2    storage driver secure  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p use secure connection with database  p   td    tr    tr   td colspan  2    storage driver table string nbsp  nbsp  nbsp  nbsp  nbsp Default   stats   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p table name  p   td    tr    tr   td colspan  2    storage driver user string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database username  p   td    tr    tr   td colspan  2    tls server name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Server name to use for server certificate validation  If it is not provided  the hostname used to contact the server is used  p   td    tr    tr   td colspan  2    token string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Bearer token for authentication to the API server  p   td    tr    tr   td colspan  2    user string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig user to use  p   td    tr    tr   td colspan  2    username string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username for basic authentication to the API server  p   td    tr    tr   td colspan  2    version version  true   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p   version    version raw prints version information and quits    version vX Y Z    sets the reported version  p   td    tr    tr   td colspan  2    warnings as errors  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Treat warnings received from the server as errors and exit with a non zero exit code  p   td    tr     tbody    table             kubectl     kubectl      kubectl controls the Kubernetes cluster manager


kubernetes reference nolist true contenttype tool reference weight 30 title kubectl patch autogenerated true

Answer:
---
title: kubectl patch
content_type: tool-reference
weight: 30
auto_generated: true
no_list: true
---

##

Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch.

 JSON and YAML formats are accepted.

 Note: Strategic merge patch is not supported for custom resources.

```
kubectl patch (-f FILENAME | TYPE NAME) [-p PATCH|--patch-file FILE]
```

##

```
  # Partially update a node using a strategic merge patch, specifying the patch as JSON
  kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'

  # Partially update a node using a strategic merge patch, specifying the patch as YAML
  kubectl patch node k8s-node-1 -p $'spec:\n unschedulable: true'

  # Partially update a node identified by the type and name specified in "node.json" using strategic merge patch
  kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}'

  # Update a container's image; spec.containers[*].name is required because it's a merge key
  kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'

  # Update a container's image using a JSON patch with positional arrays
  kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'

  # Update a deployment's replicas through the 'scale' subresource using a merge patch
  kubectl patch deployment nginx-deployment --subresource='scale' --type='merge' -p '{"spec":{"replicas":2}}'
```

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--allow-missing-template-keys     Default: true

If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.

--dry-run string[="unchanged"]     Default: "none"

Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.

--field-manager string     Default: "kubectl-patch"

Name of the manager used to track field ownership.

-f, --filename strings

Filename, directory, or URL to files identifying the resource to update

-h, --help

help for patch

-k, --kustomize string

Process the kustomization directory. This flag can't be used together with -f or -R.

--local

If true, patch will operate on the content of the file, not the server-side resource.

-o, --output string

Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).

-p, --patch string

The patch to be applied to the resource JSON file.

--patch-file string

A file containing a patch to be applied to the resource.

-R, --recursive

Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.

--show-managed-fields

If true, keep the managedFields when printing objects in JSON or YAML format.

--subresource string

If specified, patch will operate on the subresource of the requested object. Must be one of [status scale]. This flag is beta and may change in the future.

--template string

Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

--type string     Default: "strategic"

The type of patch being provided; one of [json merge strategic]

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--as string

Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group strings

Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid string

UID to impersonate for the operation.

--cache-dir string     Default: "$HOME/.kube/cache"

Default cache directory

--certificate-authority string

Path to a cert file for the certificate authority

--client-certificate string

Path to a client certificate file for TLS

--client-key string

Path to a client key file for TLS

--cluster string

The name of the kubeconfig cluster to use

--context string

The name of the kubeconfig context to use

--default-not-ready-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.

--default-unreachable-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig string

Path to the kubeconfig file to use for CLI requests.

--match-server-version

Require server version to match client version

-n, --namespace string

If present, the namespace scope for this CLI request

--password string

Password for basic authentication to the API server

--profile string     Default: "none"

Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output string     Default: "profile.pprof"

Name of the file to write the profile to

--request-timeout string     Default: "0"

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server string

The address and port of the Kubernetes API server

--storage-driver-buffer-duration duration     Default: 1m0s

Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction

--storage-driver-db string     Default: "cadvisor"

database name

--storage-driver-host string     Default: "localhost:8086"

database host:port

--storage-driver-password string     Default: "root"

database password

--storage-driver-secure

use secure connection with database

--storage-driver-table string     Default: "stats"

table name

--storage-driver-user string     Default: "root"

database username

--tls-server-name string

Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token string

Bearer token for authentication to the API server

--user string

The name of the kubeconfig user to use

--username string

Username for basic authentication to the API server

--version version[=true]

--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

--warnings-as-errors

Treat warnings received from the server as errors and exit with a non-zero exit code

##

* [kubectl](../kubectl/)	 - kubectl controls the Kubernetes cluster manager

title  kubectl patch content type  tool reference weight  30 auto generated  true no list  true            The file is auto generated from the Go source code of the component using a generic  generator  https   github com kubernetes sigs reference docs    To learn how to generate the reference documentation  please read  Contributing to the reference documentation   docs contribute generate ref docs    To update the reference content  please follow the  Contributing upstream   docs contribute generate ref docs contribute upstream   guide  You can file document formatting bugs against the  reference docs  https   github com kubernetes sigs reference docs   project              Update fields of a resource using strategic merge patch  a JSON merge patch  or a JSON patch    JSON and YAML formats are accepted    Note  Strategic merge patch is not supported for custom resources       kubectl patch   f FILENAME   TYPE NAME    p PATCH   patch file FILE                    Partially update a node using a strategic merge patch  specifying the patch as JSON   kubectl patch node k8s node 1  p    spec    unschedulable  true           Partially update a node using a strategic merge patch  specifying the patch as YAML   kubectl patch node k8s node 1  p   spec  n unschedulable  true         Partially update a node identified by the type and name specified in  node json  using strategic merge patch   kubectl patch  f node json  p    spec    unschedulable  true           Update a container s image  spec containers    name is required because it s a merge key   kubectl patch pod valid pod  p    spec    containers     name   kubernetes serve hostname   image   new image              Update a container s image using a JSON patch with positional arrays   kubectl patch pod valid pod   type  json   p     op    replace    path     spec containers 0 image    value   new image            Update a deployment s replicas through the  scale  subresource using a merge patch   kubectl patch deployment nginx deployment   subresource  scale    type  merge   p    spec    replicas  2                  table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    allow missing template keys nbsp  nbsp  nbsp  nbsp  nbsp Default  true  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  ignore any errors in templates when a field or map key is missing in the template  Only applies to golang and jsonpath output formats   p   td    tr    tr   td colspan  2    dry run string   unchanged   nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Must be  quot none quot    quot server quot   or  quot client quot   If client strategy  only print the object that would be sent  without sending it  If server strategy  submit server side request without persisting the resource   p   td    tr    tr   td colspan  2    field manager string nbsp  nbsp  nbsp  nbsp  nbsp Default   kubectl patch   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the manager used to track field ownership   p   td    tr    tr   td colspan  2   f    filename strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Filename  directory  or URL to files identifying the resource to update  p   td    tr    tr   td colspan  2   h    help  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p help for patch  p   td    tr    tr   td colspan  2   k    kustomize string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Process the kustomization directory  This flag can t be used together with  f or  R   p   td    tr    tr   td colspan  2    local  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  patch will operate on the content of the file  not the server side resource   p   td    tr    tr   td colspan  2   o    output string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Output format  One of   json  yaml  name  go template  go template file  template  templatefile  jsonpath  jsonpath as json  jsonpath file    p   td    tr    tr   td colspan  2   p    patch string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The patch to be applied to the resource JSON file   p   td    tr    tr   td colspan  2    patch file string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p A file containing a patch to be applied to the resource   p   td    tr    tr   td colspan  2   R    recursive  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Process the directory used in  f    filename recursively  Useful when you want to manage related manifests organized within the same directory   p   td    tr    tr   td colspan  2    show managed fields  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the managedFields when printing objects in JSON or YAML format   p   td    tr    tr   td colspan  2    subresource string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If specified  patch will operate on the subresource of the requested object  Must be one of  status scale   This flag is beta and may change in the future   p   td    tr    tr   td colspan  2    template string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Template string or path to template file to use when  o go template   o go template file  The template format is golang templates  http   golang org pkg text template  pkg overview    p   td    tr    tr   td colspan  2    type string nbsp  nbsp  nbsp  nbsp  nbsp Default   strategic   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The type of patch being provided  one of  json merge strategic   p   td    tr     tbody    table              table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    as string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username to impersonate for the operation  User could be a regular user or a service account in a namespace   p   td    tr    tr   td colspan  2    as group strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Group to impersonate for the operation  this flag can be repeated to specify multiple groups   p   td    tr    tr   td colspan  2    as uid string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p UID to impersonate for the operation   p   td    tr    tr   td colspan  2    cache dir string nbsp  nbsp  nbsp  nbsp  nbsp Default    HOME  kube cache   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Default cache directory  p   td    tr    tr   td colspan  2    certificate authority string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a cert file for the certificate authority  p   td    tr    tr   td colspan  2    client certificate string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client certificate file for TLS  p   td    tr    tr   td colspan  2    client key string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client key file for TLS  p   td    tr    tr   td colspan  2    cluster string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig cluster to use  p   td    tr    tr   td colspan  2    context string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig context to use  p   td    tr    tr   td colspan  2    default not ready toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for notReady NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    default unreachable toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for unreachable NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    disable compression  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  opt out of response compression for all requests to the server  p   td    tr    tr   td colspan  2    insecure skip tls verify  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the server s certificate will not be checked for validity  This will make your HTTPS connections insecure  p   td    tr    tr   td colspan  2    kubeconfig string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to the kubeconfig file to use for CLI requests   p   td    tr    tr   td colspan  2    match server version  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Require server version to match client version  p   td    tr    tr   td colspan  2   n    namespace string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If present  the namespace scope for this CLI request  p   td    tr    tr   td colspan  2    password string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Password for basic authentication to the API server  p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of profile to capture  One of  none cpu heap goroutine threadcreate block mutex   p   td    tr    tr   td colspan  2    profile output string nbsp  nbsp  nbsp  nbsp  nbsp Default   profile pprof   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the file to write the profile to  p   td    tr    tr   td colspan  2    request timeout string nbsp  nbsp  nbsp  nbsp  nbsp Default   0   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up on a single server request  Non zero values should contain a corresponding time unit  e g  1s  2m  3h   A value of zero means don t timeout requests   p   td    tr    tr   td colspan  2   s    server string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The address and port of the Kubernetes API server  p   td    tr    tr   td colspan  2    storage driver buffer duration duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Writes in the storage driver will be buffered for this duration  and committed to the non memory backends as a single transaction  p   td    tr    tr   td colspan  2    storage driver db string nbsp  nbsp  nbsp  nbsp  nbsp Default   cadvisor   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database name  p   td    tr    tr   td colspan  2    storage driver host string nbsp  nbsp  nbsp  nbsp  nbsp Default   localhost 8086   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database host port  p   td    tr    tr   td colspan  2    storage driver password string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database password  p   td    tr    tr   td colspan  2    storage driver secure  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p use secure connection with database  p   td    tr    tr   td colspan  2    storage driver table string nbsp  nbsp  nbsp  nbsp  nbsp Default   stats   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p table name  p   td    tr    tr   td colspan  2    storage driver user string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database username  p   td    tr    tr   td colspan  2    tls server name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Server name to use for server certificate validation  If it is not provided  the hostname used to contact the server is used  p   td    tr    tr   td colspan  2    token string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Bearer token for authentication to the API server  p   td    tr    tr   td colspan  2    user string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig user to use  p   td    tr    tr   td colspan  2    username string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username for basic authentication to the API server  p   td    tr    tr   td colspan  2    version version  true   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p   version    version raw prints version information and quits    version vX Y Z    sets the reported version  p   td    tr    tr   td colspan  2    warnings as errors  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Treat warnings received from the server as errors and exit with a non zero exit code  p   td    tr     tbody    table             kubectl     kubectl      kubectl controls the Kubernetes cluster manager


kubernetes reference nolist true contenttype tool reference weight 30 title kubectl drain autogenerated true

Answer:
---
title: kubectl drain
content_type: tool-reference
weight: 30
auto_generated: true
no_list: true
---

##

Drain node in preparation for maintenance.

 The given node will be marked unschedulable to prevent new pods from arriving. 'drain' evicts the pods if the API server supports https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ eviction https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ . Otherwise, it will use normal DELETE to delete the pods. The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through the API server).  If there are daemon set-managed pods, drain will not proceed without --ignore-daemonsets, and regardless it will not delete any daemon set-managed pods, because those pods would be immediately replaced by the daemon set controller, which ignores unschedulable markings.  If there are any pods that are neither mirror pods nor managed by a replication controller, replica set, daemon set, stateful set, or job, then drain will not delete any pods unless you use --force.  --force will also allow deletion to proceed if the managing resource of one or more pods is missing.

 'drain' waits for graceful termination. You should not operate on the machine until the command completes.

 When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again.

https://kubernetes.io/images/docs/kubectl_drain.svg Workflowhttps://kubernetes.io/images/docs/kubectl_drain.svg

```
kubectl drain NODE
```

##

```
  # Drain node "foo", even if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set on it
  kubectl drain foo --force

  # As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set, and use a grace period of 15 minutes
  kubectl drain foo --grace-period=900
```

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--chunk-size int     Default: 500

Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.

--delete-emptydir-data

Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).

--disable-eviction

Force drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, use with caution.

--dry-run string[="unchanged"]     Default: "none"

Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.

--force

Continue even if there are pods that do not declare a controller.

--grace-period int     Default: -1

Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.

-h, --help

help for drain

--ignore-daemonsets

Ignore DaemonSet-managed pods.

--pod-selector string

Label selector to filter pods on the node

-l, --selector string

Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.

--skip-wait-for-delete-timeout int

If pod DeletionTimestamp older than N seconds, skip waiting for the pod.  Seconds must be greater than 0 to skip.

--timeout duration

The length of time to wait before giving up, zero means infinite

##

<colgroup>
<col span="1" style="width: 10px;" />
<col span="1" />
</colgroup>

--as string

Username to impersonate for the operation. User could be a regular user or a service account in a namespace.

--as-group strings

Group to impersonate for the operation, this flag can be repeated to specify multiple groups.

--as-uid string

UID to impersonate for the operation.

--cache-dir string     Default: "$HOME/.kube/cache"

Default cache directory

--certificate-authority string

Path to a cert file for the certificate authority

--client-certificate string

Path to a client certificate file for TLS

--client-key string

Path to a client key file for TLS

--cluster string

The name of the kubeconfig cluster to use

--context string

The name of the kubeconfig context to use

--default-not-ready-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration.

--default-unreachable-toleration-seconds int     Default: 300

Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration.

--disable-compression

If true, opt-out of response compression for all requests to the server

--insecure-skip-tls-verify

If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

--kubeconfig string

Path to the kubeconfig file to use for CLI requests.

--match-server-version

Require server version to match client version

-n, --namespace string

If present, the namespace scope for this CLI request

--password string

Password for basic authentication to the API server

--profile string     Default: "none"

Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)

--profile-output string     Default: "profile.pprof"

Name of the file to write the profile to

--request-timeout string     Default: "0"

The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

-s, --server string

The address and port of the Kubernetes API server

--storage-driver-buffer-duration duration     Default: 1m0s

Writes in the storage driver will be buffered for this duration, and committed to the non memory backends as a single transaction

--storage-driver-db string     Default: "cadvisor"

database name

--storage-driver-host string     Default: "localhost:8086"

database host:port

--storage-driver-password string     Default: "root"

database password

--storage-driver-secure

use secure connection with database

--storage-driver-table string     Default: "stats"

table name

--storage-driver-user string     Default: "root"

database username

--tls-server-name string

Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used

--token string

Bearer token for authentication to the API server

--user string

The name of the kubeconfig user to use

--username string

Username for basic authentication to the API server

--version version[=true]

--version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

--warnings-as-errors

Treat warnings received from the server as errors and exit with a non-zero exit code

##

* [kubectl](../kubectl/)	 - kubectl controls the Kubernetes cluster manager

title  kubectl drain content type  tool reference weight  30 auto generated  true no list  true            The file is auto generated from the Go source code of the component using a generic  generator  https   github com kubernetes sigs reference docs    To learn how to generate the reference documentation  please read  Contributing to the reference documentation   docs contribute generate ref docs    To update the reference content  please follow the  Contributing upstream   docs contribute generate ref docs contribute upstream   guide  You can file document formatting bugs against the  reference docs  https   github com kubernetes sigs reference docs   project              Drain node in preparation for maintenance    The given node will be marked unschedulable to prevent new pods from arriving   drain  evicts the pods if the API server supports https   kubernetes io docs concepts workloads pods disruptions  eviction https   kubernetes io docs concepts workloads pods disruptions    Otherwise  it will use normal DELETE to delete the pods  The  drain  evicts or deletes all pods except mirror pods  which cannot be deleted through the API server    If there are daemon set managed pods  drain will not proceed without   ignore daemonsets  and regardless it will not delete any daemon set managed pods  because those pods would be immediately replaced by the daemon set controller  which ignores unschedulable markings   If there are any pods that are neither mirror pods nor managed by a replication controller  replica set  daemon set  stateful set  or job  then drain will not delete any pods unless you use   force     force will also allow deletion to proceed if the managing resource of one or more pods is missing     drain  waits for graceful termination  You should not operate on the machine until the command completes    When you are ready to put the node back into service  use kubectl uncordon  which will make the node schedulable again   https   kubernetes io images docs kubectl drain svg Workflowhttps   kubernetes io images docs kubectl drain svg      kubectl drain NODE                   Drain node  foo   even if there are pods not managed by a replication controller  replica set  job  daemon set  or stateful set on it   kubectl drain foo   force        As above  but abort if there are pods not managed by a replication controller  replica set  job  daemon set  or stateful set  and use a grace period of 15 minutes   kubectl drain foo   grace period 900               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    chunk size int nbsp  nbsp  nbsp  nbsp  nbsp Default  500  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Return large lists in chunks rather than all at once  Pass 0 to disable  This flag is beta and may change in the future   p   td    tr    tr   td colspan  2    delete emptydir data  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Continue even if there are pods using emptyDir  local data that will be deleted when the node is drained    p   td    tr    tr   td colspan  2    disable eviction  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Force drain to use delete  even if eviction is supported  This will bypass checking PodDisruptionBudgets  use with caution   p   td    tr    tr   td colspan  2    dry run string   unchanged   nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Must be  quot none quot    quot server quot   or  quot client quot   If client strategy  only print the object that would be sent  without sending it  If server strategy  submit server side request without persisting the resource   p   td    tr    tr   td colspan  2    force  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Continue even if there are pods that do not declare a controller   p   td    tr    tr   td colspan  2    grace period int nbsp  nbsp  nbsp  nbsp  nbsp Default   1  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Period of time in seconds given to each pod to terminate gracefully  If negative  the default value specified in the pod will be used   p   td    tr    tr   td colspan  2   h    help  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p help for drain  p   td    tr    tr   td colspan  2    ignore daemonsets  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Ignore DaemonSet managed pods   p   td    tr    tr   td colspan  2    pod selector string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Label selector to filter pods on the node  p   td    tr    tr   td colspan  2   l    selector string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Selector  label query  to filter on  supports            and       e g   l key1 value1 key2 value2   Matching objects must satisfy all of the specified label constraints   p   td    tr    tr   td colspan  2    skip wait for delete timeout int  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If pod DeletionTimestamp older than N seconds  skip waiting for the pod   Seconds must be greater than 0 to skip   p   td    tr    tr   td colspan  2    timeout duration  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up  zero means infinite  p   td    tr     tbody    table              table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    as string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username to impersonate for the operation  User could be a regular user or a service account in a namespace   p   td    tr    tr   td colspan  2    as group strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Group to impersonate for the operation  this flag can be repeated to specify multiple groups   p   td    tr    tr   td colspan  2    as uid string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p UID to impersonate for the operation   p   td    tr    tr   td colspan  2    cache dir string nbsp  nbsp  nbsp  nbsp  nbsp Default    HOME  kube cache   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Default cache directory  p   td    tr    tr   td colspan  2    certificate authority string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a cert file for the certificate authority  p   td    tr    tr   td colspan  2    client certificate string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client certificate file for TLS  p   td    tr    tr   td colspan  2    client key string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a client key file for TLS  p   td    tr    tr   td colspan  2    cluster string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig cluster to use  p   td    tr    tr   td colspan  2    context string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig context to use  p   td    tr    tr   td colspan  2    default not ready toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for notReady NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    default unreachable toleration seconds int nbsp  nbsp  nbsp  nbsp  nbsp Default  300  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Indicates the tolerationSeconds of the toleration for unreachable NoExecute that is added by default to every pod that does not already have such a toleration   p   td    tr    tr   td colspan  2    disable compression  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  opt out of response compression for all requests to the server  p   td    tr    tr   td colspan  2    insecure skip tls verify  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  the server s certificate will not be checked for validity  This will make your HTTPS connections insecure  p   td    tr    tr   td colspan  2    kubeconfig string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to the kubeconfig file to use for CLI requests   p   td    tr    tr   td colspan  2    match server version  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Require server version to match client version  p   td    tr    tr   td colspan  2   n    namespace string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If present  the namespace scope for this CLI request  p   td    tr    tr   td colspan  2    password string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Password for basic authentication to the API server  p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   none   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of profile to capture  One of  none cpu heap goroutine threadcreate block mutex   p   td    tr    tr   td colspan  2    profile output string nbsp  nbsp  nbsp  nbsp  nbsp Default   profile pprof   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name of the file to write the profile to  p   td    tr    tr   td colspan  2    request timeout string nbsp  nbsp  nbsp  nbsp  nbsp Default   0   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The length of time to wait before giving up on a single server request  Non zero values should contain a corresponding time unit  e g  1s  2m  3h   A value of zero means don t timeout requests   p   td    tr    tr   td colspan  2   s    server string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The address and port of the Kubernetes API server  p   td    tr    tr   td colspan  2    storage driver buffer duration duration nbsp  nbsp  nbsp  nbsp  nbsp Default  1m0s  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Writes in the storage driver will be buffered for this duration  and committed to the non memory backends as a single transaction  p   td    tr    tr   td colspan  2    storage driver db string nbsp  nbsp  nbsp  nbsp  nbsp Default   cadvisor   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database name  p   td    tr    tr   td colspan  2    storage driver host string nbsp  nbsp  nbsp  nbsp  nbsp Default   localhost 8086   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database host port  p   td    tr    tr   td colspan  2    storage driver password string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database password  p   td    tr    tr   td colspan  2    storage driver secure  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p use secure connection with database  p   td    tr    tr   td colspan  2    storage driver table string nbsp  nbsp  nbsp  nbsp  nbsp Default   stats   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p table name  p   td    tr    tr   td colspan  2    storage driver user string nbsp  nbsp  nbsp  nbsp  nbsp Default   root   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p database username  p   td    tr    tr   td colspan  2    tls server name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Server name to use for server certificate validation  If it is not provided  the hostname used to contact the server is used  p   td    tr    tr   td colspan  2    token string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Bearer token for authentication to the API server  p   td    tr    tr   td colspan  2    user string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name of the kubeconfig user to use  p   td    tr    tr   td colspan  2    username string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Username for basic authentication to the API server  p   td    tr    tr   td colspan  2    version version  true   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p   version    version raw prints version information and quits    version vX Y Z    sets the reported version  p   td    tr    tr   td colspan  2    warnings as errors  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Treat warnings received from the server as errors and exit with a non zero exit code  p   td    tr     tbody    table             kubectl     kubectl      kubectl controls the Kubernetes cluster manager