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

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

##

Debug cluster resources using interactive debugging containers.

 'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified.

 The action taken by 'debug' varies depending on what resource is specified. Supported actions include:

  *  Workload: Create a copy of an existing pod with certain attributes changed, for example changing the image tag to a new version.
  *  Workload: Add an ephemeral container to an already running pod, for example to add debugging utilities without restarting the pod.
  *  Node: Create a new pod that runs in the node's host namespaces and can access the node's filesystem.

```
kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ]
```

##

```
  # Create an interactive debugging session in pod mypod and immediately attach to it.
  kubectl debug mypod -it --image=busybox

  # Create an interactive debugging session for the pod in the file pod.yaml and immediately attach to it.
  # (requires the EphemeralContainers feature to be enabled in the cluster)
  kubectl debug -f pod.yaml -it --image=busybox

  # Create a debug container named debugger using a custom automated debugging image.
  kubectl debug --image=myproj/debug-tools -c debugger mypod

  # Create a copy of mypod adding a debug container and attach to it
  kubectl debug mypod -it --image=busybox --copy-to=my-debugger

  # Create a copy of mypod changing the command of mycontainer
  kubectl debug mypod -it --copy-to=my-debugger --container=mycontainer -- sh

  # Create a copy of mypod changing all container images to busybox
  kubectl debug mypod --copy-to=my-debugger --set-image=*=busybox

  # Create a copy of mypod adding a debug container and changing container images
  kubectl debug mypod -it --copy-to=my-debugger --image=debian --set-image=app=app:debug,sidecar=sidecar:debug

  # Create an interactive debugging session on a node and immediately attach to it.
  # The container will run in the host namespaces and the host's filesystem will be mounted at /host
  kubectl debug node/mynode -it --image=busybox
```

##

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

--arguments-only

If specified, everything after -- will be passed to the new container as Args instead of Command.

--attach

If true, wait for the container to start running, and then attach as if 'kubectl attach ...' were called.  Default false, unless '-i/--stdin' is set, in which case the default is true.

-c, --container string

Container name to use for debug container.

--copy-to string

Create a copy of the target Pod with this name.

--custom string

Path to a JSON or YAML file containing a partial container spec to customize built-in debug profiles.

--env stringToString     Default: []

Environment variables to set in the container.

-f, --filename strings

identifying the resource to debug

-h, --help

help for debug

--image string

Container image to use for debug container.

--image-pull-policy string

The image pull policy for the container. If left empty, this value will not be specified by the client and defaulted by the server.

--keep-annotations

If true, keep the original pod annotations.(This flag only works when used with '--copy-to')

--keep-init-containers     Default: true

Run the init containers for the pod. Defaults to true.(This flag only works when used with '--copy-to')

--keep-labels

If true, keep the original pod labels.(This flag only works when used with '--copy-to')

--keep-liveness

If true, keep the original pod liveness probes.(This flag only works when used with '--copy-to')

--keep-readiness

If true, keep the original pod readiness probes.(This flag only works when used with '--copy-to')

--keep-startup

If true, keep the original startup probes.(This flag only works when used with '--copy-to')

--profile string     Default: "legacy"

Options are "legacy", "general", "baseline", "netadmin", "restricted" or "sysadmin".

-q, --quiet

If true, suppress informational messages.

--replace

When used with '--copy-to', delete the original Pod.

--same-node

When used with '--copy-to', schedule the copy of target Pod on the same node.

--set-image stringToString     Default: []

When used with '--copy-to', a list of name=image pairs for changing container images, similar to how 'kubectl set image' works.

--share-processes     Default: true

When used with '--copy-to', enable process namespace sharing in the copy.

-i, --stdin

Keep stdin open on the container(s) in the pod, even if nothing is attached.

--target string

When using an ephemeral container, target processes in this container name.

-t, --tty

Allocate a TTY for the debugging container.

##

<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-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 debug 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              Debug cluster resources using interactive debugging containers     debug  provides automation for common debugging tasks for cluster objects identified by resource and name  Pods will be used by default if no resource is specified    The action taken by  debug  varies depending on what resource is specified  Supported actions include        Workload  Create a copy of an existing pod with certain attributes changed  for example changing the image tag to a new version       Workload  Add an ephemeral container to an already running pod  for example to add debugging utilities without restarting the pod       Node  Create a new pod that runs in the node s host namespaces and can access the node s filesystem       kubectl debug  POD   TYPE   VERSION  GROUP  NAME       COMMAND  args                         Create an interactive debugging session in pod mypod and immediately attach to it    kubectl debug mypod  it   image busybox        Create an interactive debugging session for the pod in the file pod yaml and immediately attach to it       requires the EphemeralContainers feature to be enabled in the cluster    kubectl debug  f pod yaml  it   image busybox        Create a debug container named debugger using a custom automated debugging image    kubectl debug   image myproj debug tools  c debugger mypod        Create a copy of mypod adding a debug container and attach to it   kubectl debug mypod  it   image busybox   copy to my debugger        Create a copy of mypod changing the command of mycontainer   kubectl debug mypod  it   copy to my debugger   container mycontainer    sh        Create a copy of mypod changing all container images to busybox   kubectl debug mypod   copy to my debugger   set image   busybox        Create a copy of mypod adding a debug container and changing container images   kubectl debug mypod  it   copy to my debugger   image debian   set image app app debug sidecar sidecar debug        Create an interactive debugging session on a node and immediately attach to it      The container will run in the host namespaces and the host s filesystem will be mounted at  host   kubectl debug node mynode  it   image busybox               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    arguments only  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If specified  everything after    will be passed to the new container as Args instead of Command   p   td    tr    tr   td colspan  2    attach  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  wait for the container to start running  and then attach as if  kubectl attach      were called   Default false  unless   i   stdin  is set  in which case the default is true   p   td    tr    tr   td colspan  2   c    container string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Container name to use for debug container   p   td    tr    tr   td colspan  2    copy to string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Create a copy of the target Pod with this name   p   td    tr    tr   td colspan  2    custom string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Path to a JSON or YAML file containing a partial container spec to customize built in debug profiles   p   td    tr    tr   td colspan  2    env stringToString nbsp  nbsp  nbsp  nbsp  nbsp Default      td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Environment variables to set in the container   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 identifying the resource to debug  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 debug  p   td    tr    tr   td colspan  2    image string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Container image to use for debug container   p   td    tr    tr   td colspan  2    image pull policy string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The image pull policy for the container  If left empty  this value will not be specified by the client and defaulted by the server   p   td    tr    tr   td colspan  2    keep annotations  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the original pod annotations  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    keep init containers nbsp  nbsp  nbsp  nbsp  nbsp Default  true  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Run the init containers for the pod  Defaults to true  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    keep labels  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the original pod labels  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    keep liveness  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the original pod liveness probes  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    keep readiness  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the original pod readiness probes  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    keep startup  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  keep the original startup probes  This flag only works when used with    copy to    p   td    tr    tr   td colspan  2    profile string nbsp  nbsp  nbsp  nbsp  nbsp Default   legacy   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Options are  quot legacy quot    quot general quot    quot baseline quot    quot netadmin quot    quot restricted quot  or  quot sysadmin quot    p   td    tr    tr   td colspan  2   q    quiet  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  suppress informational messages   p   td    tr    tr   td colspan  2    replace  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When used with    copy to   delete the original Pod   p   td    tr    tr   td colspan  2    same node  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When used with    copy to   schedule the copy of target Pod on the same node   p   td    tr    tr   td colspan  2    set image stringToString nbsp  nbsp  nbsp  nbsp  nbsp Default      td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When used with    copy to   a list of name image pairs for changing container images  similar to how  kubectl set image  works   p   td    tr    tr   td colspan  2    share processes nbsp  nbsp  nbsp  nbsp  nbsp Default  true  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When used with    copy to   enable process namespace sharing in the copy   p   td    tr    tr   td colspan  2   i    stdin  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Keep stdin open on the container s  in the pod  even if nothing is attached   p   td    tr    tr   td colspan  2    target string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When using an ephemeral container  target processes in this container name   p   td    tr    tr   td colspan  2   t    tty  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Allocate a TTY for the debugging container   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 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 api resources weight 30 autogenerated true

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

##

Print the supported API resources on the server.

```
kubectl api-resources [flags]
```

##

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

  # Print the supported API resources with more information
  kubectl api-resources -o wide

  # Print the supported API resources sorted by a column
  kubectl api-resources --sort-by=name

  # Print the supported namespaced resources
  kubectl api-resources --namespaced=true

  # Print the supported non-namespaced resources
  kubectl api-resources --namespaced=false

  # Print the supported API resources with a specific APIGroup
  kubectl api-resources --api-group=rbac.authorization.k8s.io
```

##

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

--api-group string

Limit to resources in the specified API group.

--cached

Use the cached list of resources if available.

--categories strings

Limit to resources that belong to the specified categories.

-h, --help

help for api-resources

--namespaced     Default: true

If false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.

--no-headers

When using the default or custom-column output format, don't print headers (default print headers).

-o, --output string

Output format. One of: (wide, name).

--sort-by string

If non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.

--verbs strings

Limit to resources that support the specified verbs.

##

<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 resources 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 resources on the server       kubectl api resources  flags                    Print the supported API resources   kubectl api resources        Print the supported API resources with more information   kubectl api resources  o wide        Print the supported API resources sorted by a column   kubectl api resources   sort by name        Print the supported namespaced resources   kubectl api resources   namespaced true        Print the supported non namespaced resources   kubectl api resources   namespaced false        Print the supported API resources with a specific APIGroup   kubectl api resources   api group rbac authorization k8s io               table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    api group string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Limit to resources in the specified API group   p   td    tr    tr   td colspan  2    cached  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Use the cached list of resources if available   p   td    tr    tr   td colspan  2    categories strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Limit to resources that belong to the specified categories   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 api resources  p   td    tr    tr   td colspan  2    namespaced nbsp  nbsp  nbsp  nbsp  nbsp Default  true  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If false  non namespaced resources will be returned  otherwise returning namespaced resources by default   p   td    tr    tr   td colspan  2    no headers  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p When using the default or custom column output format  don t print headers  default print headers    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   wide  name    p   td    tr    tr   td colspan  2    sort by string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If non empty  sort list of resources using specified field  The field can be either  name  or  kind    p   td    tr    tr   td colspan  2    verbs strings  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Limit to resources that support the specified verbs   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 autogenerated true title kubectl expose

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

##

Expose a resource as a new Kubernetes service.

 Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports, i.e. when the selector contains only the matchLabels component. Note that if no port is specified via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no labels are specified, the new service will re-use the labels from the resource it exposes.

 Possible resources include (case insensitive):

 pod (po), service (svc), replicationcontroller (rc), deployment (deploy), replicaset (rs)

```
kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]
```

##

```
  # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000
  kubectl expose rc nginx --port=80 --target-port=8000

  # Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000
  kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000

  # Create a service for a pod valid-pod, which serves on port 444 with the name "frontend"
  kubectl expose pod valid-pod --port=444 --name=frontend

  # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https"
  kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https

  # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'.
  kubectl expose rc streamer --port=4100 --protocol=UDP --name=video-stream

  # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000
  kubectl expose rs nginx --port=80 --target-port=8000

  # Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000
  kubectl expose deployment nginx --port=80 --target-port=8000
```

##

<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.

--cluster-ip string

ClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to 'None' to create a headless service.

--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.

--external-ip string

Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.

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

Name of the manager used to track field ownership.

-f, --filename strings

Filename, directory, or URL to files identifying the resource to expose a service

-h, --help

help for expose

-k, --kustomize string

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

-l, --labels string

Labels to apply to the service created by this call.

--load-balancer-ip string

IP to assign to the LoadBalancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).

--name string

The name for the newly created object.

-o, --output string

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

--override-type string     Default: "merge"

The method used to override the generated object: json, merge, or strategic.

--overrides string

An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.

--port string

The port that the service should serve on. Copied from the resource being exposed, if unspecified

--protocol string

The network protocol for the service to be created. Default is 'TCP'.

-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.

--selector string

A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.)

--session-affinity string

If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'

--show-managed-fields

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

--target-port string

Name or number for the port on the container that the service should direct traffic to. Optional.

--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

Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'.

##

<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 expose 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              Expose a resource as a new Kubernetes service    Looks up a deployment  service  replica set  replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port  A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports  i e  when the selector contains only the matchLabels component  Note that if no port is specified via   port and the exposed resource has multiple ports  all will be re used by the new service  Also if no labels are specified  the new service will re use the labels from the resource it exposes    Possible resources include  case insensitive     pod  po   service  svc   replicationcontroller  rc   deployment  deploy   replicaset  rs       kubectl expose   f FILENAME   TYPE NAME     port port     protocol TCP UDP SCTP     target port number or name     name name     external ip external ip of service     type type                    Create a service for a replicated nginx  which serves on port 80 and connects to the containers on port 8000   kubectl expose rc nginx   port 80   target port 8000        Create a service for a replication controller identified by type and name specified in  nginx controller yaml   which serves on port 80 and connects to the containers on port 8000   kubectl expose  f nginx controller yaml   port 80   target port 8000        Create a service for a pod valid pod  which serves on port 444 with the name  frontend    kubectl expose pod valid pod   port 444   name frontend        Create a second service based on the above service  exposing the container port 8443 as port 443 with the name  nginx https    kubectl expose service nginx   port 443   target port 8443   name nginx https        Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named  video stream     kubectl expose rc streamer   port 4100   protocol UDP   name video stream        Create a service for a replicated nginx using replica set  which serves on port 80 and connects to the containers on port 8000   kubectl expose rs nginx   port 80   target port 8000        Create a service for an nginx deployment  which serves on port 80 and connects to the containers on port 8000   kubectl expose deployment nginx   port 80   target port 8000               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    cluster ip string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p ClusterIP to be assigned to the service  Leave empty to auto allocate  or set to  None  to create a headless service   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    external ip string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Additional external IP address  not managed by Kubernetes  to accept for the service  If this IP is routed to a node  the service can be accessed by this IP in addition to its generated service IP   p   td    tr    tr   td colspan  2    field manager string nbsp  nbsp  nbsp  nbsp  nbsp Default   kubectl expose   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 expose a service  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 expose  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   l    labels string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Labels to apply to the service created by this call   p   td    tr    tr   td colspan  2    load balancer ip string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p IP to assign to the LoadBalancer  If empty  an ephemeral IP will be created and used  cloud provider specific    p   td    tr    tr   td colspan  2    name string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The name for the newly created object   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    override type string nbsp  nbsp  nbsp  nbsp  nbsp Default   merge   td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The method used to override the generated object  json  merge  or strategic   p   td    tr    tr   td colspan  2    overrides string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p An inline JSON override for the generated object  If this is non empty  it is used to override the generated object  Requires that the object supply a valid apiVersion field   p   td    tr    tr   td colspan  2    port string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The port that the service should serve on  Copied from the resource being exposed  if unspecified  p   td    tr    tr   td colspan  2    protocol string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p The network protocol for the service to be created  Default is  TCP    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    selector string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p A label selector to use for this service  Only equality based selector requirements are supported  If empty  the default  infer the selector from the replication controller or replica set    p   td    tr    tr   td colspan  2    session affinity string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If non empty  set the session affinity for the service to this  legal values   None    ClientIP   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    target port string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Name or number for the port on the container that the service should direct traffic to  Optional   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  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Type for this service  ClusterIP  NodePort  LoadBalancer  or ExternalName  Default is  ClusterIP    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 annotate autogenerated true

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

##

Update the annotations on one or more resources.

 All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations to store their own data.

 Attempting to set an annotation that already exists will fail unless --overwrite is set. If --resource-version is specified and does not match the current resource version on the server the command will fail.

Use "kubectl api-resources" for a complete list of supported resources.

```
kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
```

##

```
  # Update pod 'foo' with the annotation 'description' and the value 'my frontend'
  # If the same annotation is set multiple times, only the last value will be applied
  kubectl annotate pods foo description='my frontend'

  # Update a pod identified by type and name in "pod.json"
  kubectl annotate -f pod.json description='my frontend'

  # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value
  kubectl annotate --overwrite pods foo description='my frontend running nginx'

  # Update all pods in the namespace
  kubectl annotate pods --all description='my frontend running nginx'

  # Update pod 'foo' only if the resource is unchanged from version 1
  kubectl annotate pods foo description='my frontend running nginx' --resource-version=1

  # Update pod 'foo' by removing an annotation named 'description' if it exists
  # Does not require the --overwrite flag
  kubectl annotate pods foo description-
```

##

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

--all

Select all resources, in the namespace of the specified resource types.

-A, --all-namespaces

If true, check the specified action in all namespaces.

--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-annotate"

Name of the manager used to track field ownership.

--field-selector string

Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.

-f, --filename strings

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

-h, --help

help for annotate

-k, --kustomize string

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

--list

If true, display the annotations for a given resource.

--local

If true, annotation will NOT contact api-server but run locally.

-o, --output string

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

--overwrite

If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.

-R, --recursive

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

--resource-version string

If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.

-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].

##

<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 annotate 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 the annotations on one or more resources    All Kubernetes objects support the ability to store additional data with the object as annotations  Annotations are key value pairs that can be larger than labels and include arbitrary string values such as structured JSON  Tools and system extensions may use annotations to store their own data    Attempting to set an annotation that already exists will fail unless   overwrite is set  If   resource version is specified and does not match the current resource version on the server the command will fail   Use  kubectl api resources  for a complete list of supported resources       kubectl annotate    overwrite    f FILENAME   TYPE NAME  KEY 1 VAL 1     KEY N VAL N    resource version version                    Update pod  foo  with the annotation  description  and the value  my frontend      If the same annotation is set multiple times  only the last value will be applied   kubectl annotate pods foo description  my frontend         Update a pod identified by type and name in  pod json    kubectl annotate  f pod json description  my frontend         Update pod  foo  with the annotation  description  and the value  my frontend running nginx   overwriting any existing value   kubectl annotate   overwrite pods foo description  my frontend running nginx         Update all pods in the namespace   kubectl annotate pods   all description  my frontend running nginx         Update pod  foo  only if the resource is unchanged from version 1   kubectl annotate pods foo description  my frontend running nginx    resource version 1        Update pod  foo  by removing an annotation named  description  if it exists     Does not require the   overwrite flag   kubectl annotate pods foo description                table style  width  100   table layout  fixed     colgroup   col span  1  style  width  10px       col span  1       colgroup   tbody    tr   td colspan  2    all  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Select all resources  in the namespace of the specified resource types   p   td    tr    tr   td colspan  2   A    all namespaces  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  check the specified action in all namespaces   p   td    tr    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 annotate   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    field selector string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p Selector  field query  to filter on  supports            and       e g    field selector key1 value1 key2 value2   The server only supports a limited number of field queries per type   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 the annotation  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 annotate  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    list  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  display the annotations for a given resource   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  annotation will NOT contact api server but run locally   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    overwrite  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If true  allow annotations to be overwritten  otherwise reject annotation updates that overwrite existing annotations   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    resource version string  td    tr   tr   td   td  td style  line height  130   word wrap  break word    p If non empty  the annotation update will only succeed if this is the current resource version for the object  Only valid when specifying a single resource   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     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