text
stringlengths 1
1k
| id
int64 0
8.58k
|
---|---|
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
See Also
kubectl - kubectl controls the Kubernetes cluster manager
kubectl auth can-i - Check whether an action is allowed
kubectl auth reconcile - Reconciles rules for RBAC role, role binding, cluster role, and
cluster role binding objects
kubectl auth whoami - Experimental: Check self subject attributes
kubectl auth can-i
Synopsis
Check whether an action is allowed.
VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubernetes
resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL that
starts with "/". NAME i | 6,200 |
s the name of a particular Kubernetes resource. This command pairs
nicely with impersonation. See --as global flag.
kubectl auth can-i VERB [TYPE | TYPE/NAME | NONRESOURCEURL]
Examples
# Check to see if I can create pods in any namespace
kubectl auth can-i create pods --all-namespaces
# Check to see if I can list deployments in my current namespace
kubectl auth can-i list deployments.apps•
•
•
| 6,201 |
# Check to see if service account "foo" of namespace "dev" can list pods
# in the namespace "prod".
# You must be allowed to use impersonation for the global option "--as".
kubectl auth can-i list pods --as=system:serviceaccount:dev:foo -n prod
# Check to see if I can do everything in my current namespace ("*" means all)
kubectl auth can-i '*' '*'
# Check to see if I can get the job named "bar" in namespace "foo"
kubectl auth can-i list jobs.batch/bar -n foo
# Check to see if I can read pod logs
kubectl auth can-i get pods --subresource=log
# Check to see if I can access the URL /logs/
kubectl auth can-i get /logs/
# List all allowed actions in namespace "foo"
kubectl auth can-i --list --namespace=foo
Options
-A, --all-namespaces
If true, check the specified action in all namespaces.
-h, --help
help for can-i
--list
If true, prints all allowed actions.
--no-headers
If true, prints allowed actions without headers
-q, --quiet
If true, suppress out | 6,202 |
put and just return the exit code.
--subresource string
SubResource such as pod/log or deployment/scale
--as strin | 6,203 |
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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & | 6,204 |
health checks
--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: 30 | 6,205 |
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 | 6,206 |
|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 serve | 6,207 |
--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 info | 6,208 |
rmation and quits; --version=vX.Y.Z... sets the
reported version
--warnings-as-error | 6,209 |
Treat warnings received from the server as errors and exit with a non-zero exit code
See Also
kubectl auth - Inspect authorization
kubectl auth reconcile
Synopsis
Reconciles rules for RBAC role, role binding, cluster role, and cluster role binding objects.
Missing objects are created, and the containing namespace is created for namespaced objects, if
required.
Existing roles are updated to include the permissions in the input objects, and remove extra
permissions if --remove-extra-permissions is specified.
Existing bindings are updated to include the subjects in the input objects, and remove extra
subjects if --remove-extra-subjects is specified.
This is preferred to 'apply' for RBAC resources so that semantically-aware merging of rules and
subjects is done.
kubectl auth reconcile -f FILENAME
Examples
# Reconcile RBAC resources from a file
kubectl auth reconcile -f my-rbac-rules.yaml
Options
--allow-missing-template-keys Default: true
If true, ignore any errors in templates wh | 6,210 |
en 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.
-f, --filename strings | 6,211 |
Filename, directory, or URL to files identifying the resource to reconcile.
-h, --help
help for reconcile
-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).
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage
related manifests organized within the same directory.
--remove-extra-permissions
If true, removes extra permissions added to roles
--remove-extra-subjects
If true, removes extra subjects added to rolebindings
--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].
--as stri | 6,212 |
ng
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 | 6,213 |
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 add | 6,214 |
ed 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-verif | 6,215 |
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 | 6,216 |
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 | 6,217 |
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
See Also
kubectl auth - Inspect authorization • | 6,218 |
kubectl auth whoami
Synopsis
Experimental: Check who you are and your attributes (groups, extra).
This command is helpful to get yourself aware of the current user attributes,
especially when dynamic authentication, e.g., token webhook, auth proxy, or OIDC provider,
is enabled in the Kubernetes cluster.
kubectl auth whoami
Examples
# Get your subject attributes.
kubectl auth whoami
# Get your subject attributes in JSON format.
kubectl auth whoami -o json
Options
--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.
-h, --help
help for whoami
-o, --output string
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile,
jsonpath, jsonpath-as-json, jsonpath-file).
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template string
Template str | 6,219 |
ing 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].
--as strin | 6,220 |
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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & | 6,221 |
health checks
--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: 30 | 6,222 |
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 | 6,223 |
|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 serve | 6,224 |
--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 info | 6,225 |
rmation and quits; --version=vX.Y.Z... sets the
reported version
--warnings-as-error | 6,226 |
Treat warnings received from the server as errors and exit with a non-zero exit code
See Also
kubectl auth - Inspect authorization
kubectl autoscale
Synopsis
Creates an autoscaler that automatically chooses and sets the number of pods that run in a
Kubernetes cluster.
Looks up a deployment, replica set, stateful set, or replication controller by name and creates an
autoscaler that uses the given resource as a reference. An autoscaler can automatically increase
or decrease number of pods deployed within the system as needed.
kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --
max=MAXPODS [--cpu-percent=CPU]
Examples
# Auto scale a deployment "foo", with the number of pods between 2 and 10, no target CPU
utilization specified so a default autoscaling policy will be used
kubectl autoscale deployment foo --min=2 --max=10
# Auto scale a replication controller "foo", with the number of pods between 1 and 5, target
CPU utilization at 80%
kubectl autoscale | 6,227 |
rc foo --max=5 --cpu-percent=80
Options
--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.
--cpu-percent int32 Default: -1
The target average CPU utilization (represented as a percent of requested CPU) over all the
pods. If it's not specified or negative, a default autoscaling policy will be used.
--dry-run string[="unchanged"] Default: "none" | 6,228 |
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-autoscale"
Name of the manager used to track field ownership.
-f, --filename strings
Filename, directory, or URL to files identifying the resource to autoscale.
-h, --help
help for autoscale
-k, --kustomize string
Process the kustomization directory. This flag can't be used together with -f or -R.
--max int32 Default: -1
The upper limit for the number of pods that can be set by the autoscaler. Required.
--min int32 Default: -1
The lower limit for the number of pods that can be set by the autoscaler. If it's not specified or
negative, the server will apply a default value.
--name string
The name for the newly created object. If not specified, the name of the input resource will be
used.
-o, --output string
Output format. One of: (json, y | 6,229 |
aml, name, go-template, go-template-file, template, templatefile,
jsonpath, jsonpath-as-json, jsonpath-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.
--show-managed-field | 6,230 |
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].
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-c | 6,231 |
idrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--cluster strin | 6,232 |
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
--pas | 6,233 |
sword 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 | 6,234 |
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 i | 6,235 |
s used
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
--username strin | 6,236 |
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
See Also
kubectl - kubectl controls the Kubernetes cluster manager
kubectl certificate
Synopsis
Modify certificate resources.
kubectl certificate SUBCOMMAND
Options
-h, --help
help for certificate
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.• | 6,237 |
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 | 6,238 |
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 insecur | 6,239 |
--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 transactio | 6,240 |
n
--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-secur | 6,241 |
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
See Also
kubectl - kubectl controls the Kubernetes cluster manager
kubectl certificate approve - Approve a certificate signing request
kubectl certificate deny - Deny a certificate signing request
kubectl certificate approve
Synopsis
Approve a certificat | 6,242 |
e signing request.•
•
| 6,243 |
kubectl certificate approve allows a cluster admin to approve a certificate signing request (CSR).
This action tells a certificate signing controller to issue a certificate to the requester with the
attributes requested in the CSR.
SECURITY NOTICE: Depending on the requested attributes, the issued certificate can
potentially grant a requester access to cluster resources or to authenticate as a requested
identity. Before approving a CSR, ensure you understand what the signed certificate can do.
kubectl certificate approve (-f FILENAME | NAME)
Examples
# Approve CSR 'csr-sqgzp'
kubectl certificate approve csr-sqgzp
Options
--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.
-f, --filename strings
Filename, directory, or URL to files identifying the resource to update
--force
Update the CSR even if it is already approved.
-h, --help
help for appro | 6,244 |
ve
-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).
-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-field | 6,245 |
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].
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-c | 6,246 |
idrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--cluster strin | 6,247 |
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
--pas | 6,248 |
sword 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 | 6,249 |
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 i | 6,250 |
s used
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
--username strin | 6,251 |
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
See Also
kubectl certificate - Modify certificate resources
kubectl certificate deny
Synopsis
Deny a certificate signing request.
kubectl certificate deny allows a cluster admin to deny a certificate signing request (CSR). This
action tells a certificate signing controller to not to issue a certificate to the requester.
kubectl certificate deny (-f FILENAME | NAME)
Examples
# Deny CSR 'csr-sqgzp'
kubectl certificate deny csr-sqgzp
Options
--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.
-f, --filename strings
Filename, directory, or URL to files identify | 6,252 |
ing the resource to update
--force
Update the CSR even if it is already denied. | 6,253 |
-h, --help
help for deny
-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).
-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.
--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].
--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 st | 6,254 |
ring
UID to impersonate for the operation.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--cache-dir string Default: "$HOME/.kube/cache"
Default cache directory
--certificate-authority strin | 6,255 |
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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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
| 6,256 |
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-versio | 6,257 |
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 | 6,258 |
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 | 6,259 |
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
See Also
kubectl certificate - Modify certificate resources
kubectl cluster-info
Synopsis
Display addresses of the control plane and services with label kubernetes.io/cluster-
service=true. To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
kubectl cluster-info [flags]• | 6,260 |
Examples
# Print the address of the control plane and cluster services
kubectl cluster-info
Options
-h, --help
help for cluster-info
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks | 6,261 |
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 | 6,262 |
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 | 6,263 |
--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-s | 6,264 |
erver-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 serve | 6,265 |
--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
See Also
kubectl - kubectl controls the Kubernetes cluster manager
kubectl cluster-info dump - Dump relevant information for debugging and diagnosis
kubectl cluster-info dump
Synopsis
Dump cluster information out suitable for debugging and diagnosing cluster problems. By
default, dumps everything to stdout. You can optionally specify a directory with --output-
directory. If you specify a directory, Kubernetes will build a set of files in that directory. By
default, only dumps things in the current namespace and 'kube-system' namespace, but you can
switch to a different namespace with the --namespaces flag, or specify --all-name | 6,266 |
spaces to
dump all namespaces.
The command also dumps the logs of all of the pods in the cluster; these logs are dumped into
different directories based on namespace and pod name.
kubectl cluster-info dump [flags]
Examples
# Dump current cluster state to stdout
kubectl cluster-info dump
# Dump current cluster state to /path/to/cluster-state
kubectl cluster-info dump --output-directory=/path/to/cluster-state
# Dump all namespaces to stdout
kubectl cluster-info dump --all-namespaces•
| 6,267 |
# Dump a set of namespaces to /path/to/cluster-state
kubectl cluster-info dump --namespaces default,kube-system --output-directory=/path/to/
cluster-state
Options
-A, --all-namespaces
If true, dump all namespaces. If true, --namespaces is ignored.
--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.
-h, --help
help for dump
--namespaces strings
A comma separated list of namespaces to dump.
-o, --output string Default: "json"
Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile,
jsonpath, jsonpath-as-json, jsonpath-file).
--output-directory string
Where to output the files. If empty or '-' uses stdout, otherwise creates a directory hierarchy in
that directory
--pod-running-timeout duration Default: 20s
The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is
runni | 6,268 |
ng
--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].
--as strin | 6,269 |
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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & | 6,270 |
health checks
--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: 30 | 6,271 |
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 | 6,272 |
|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 serve | 6,273 |
--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 info | 6,274 |
rmation and quits; --version=vX.Y.Z... sets the
reported version
--warnings-as-error | 6,275 |
Treat warnings received from the server as errors and exit with a non-zero exit code
See Also
kubectl cluster-info - Display cluster information
kubectl completion
Synopsis
Output shell completion code for the specified shell (bash, zsh, fish, or powershell). The shell
code must be evaluated to provide interactive completion of kubectl commands. This can be
done by sourcing it from the .bash_profile.
Detailed instructions on how to do this are available here:
for macOS:
https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion
for linux:
https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion
for windows:
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#enable-shell-autocompletion
Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2.
kubectl completion SHELL
Examples
# Installing bash completion on macOS using homebrew
## If running Bas | 6,276 |
h 3.2 included with macOS
brew install bash-completion
## or, if running Bash 4.1+
brew install bash-completion@2
## If kubectl is installed via homebrew, this should start working immediately
## If you've installed via other means, you may need add the completion to your completion
directory
kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl
# Installing bash completion on Linux
## If bash-completion is not installed on Linux, install the 'bash-completion' package
## via your distribution's package manager.
## Load the kubectl completion code for bash into the current shell
source <(kubectl completion bash)
## Write bash completion code to a file and source it from .bash_profile | 6,277 |
kubectl completion bash > ~/.kube/completion.bash.inc
printf "
# kubectl shell completion
source '$HOME/.kube/completion.bash.inc'
" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Load the kubectl completion code for zsh[1] into the current shell
source <(kubectl completion zsh)
# Set the kubectl completion code for zsh[1] to autoload on startup
kubectl completion zsh > "${fpath[1]}/_kubectl"
# Load the kubectl completion code for fish[2] into the current shell
kubectl completion fish | source
# To load completions for each session, execute once:
kubectl completion fish > ~/.config/fish/completions/kubectl.fish
# Load the kubectl completion code for powershell into the current shell
kubectl completion powershell | Out-String | Invoke-Expression
# Set kubectl completion code for powershell to run on startup
## Save completion code to a script and execute in the profile
kubectl completion powershell > $HOME\.kube\completion.ps1
Add-C | 6,278 |
ontent $PROFILE "$HOME\.kube\completion.ps1"
## Execute completion code in the profile
Add-Content $PROFILE "if (Get-Command kubectl -ErrorAction SilentlyContinue) {
kubectl completion powershell | Out-String | Invoke-Expression
}"
## Add completion code directly to the $PROFILE script
kubectl completion powershell >> $PROFILE
Options
-h, --help
help for completion
--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 | 6,279 |
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 add | 6,280 |
ed 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-verif | 6,281 |
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 | 6,282 |
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 | 6,283 |
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
See Also
kubectl - kubectl controls the Kubernetes cluster manager • | 6,284 |
kubectl config
Synopsis
Modify kubeconfig files using subcommands like "kubectl config set current-context my-
context".
The loading order follows these rules:
If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once
and no merging takes place.
If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal
path delimiting rules for your system). These paths are merged. When a value is modified,
it is modified in the file that defines the stanza. When a value is created, it is created in
the first file that exists. If no files in the chain exist, then it creates the last file in the list.
Otherwise, ${HOME}/.kube/config is used and no merging takes place.
kubectl config SUBCOMMAND
Options
-h, --help
help for config
--kubeconfig string
use a particular kubeconfig file
--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 f | 6,285 |
or the operation, this flag can be repeated to specify multiple groups.
--as-uid string
UID to impersonate for the operation.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--cache-dir string Default: "$HOME/.kube/cache"1.
2.
3 | 6,286 |
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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 | 6,287 |
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
--match-server-versio | 6,288 |
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 | 6,289 |
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 | 6,290 |
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
See Also
kubectl - kubectl controls the Kubernetes cluster manager
kubectl config current-context - Display the current-context
kubectl config delete-cluster - Delete the specified cluster from the kubeconfig
kubectl config delete-context - Delete the specified context from the kubeconfig
kubectl config delete-user - Delete the specified | 6,291 |
user from the kubeconfig
kubectl config get-clusters - Display clusters defined in the kubeconfig
kubectl config get-contexts - Describe one or many contexts
kubectl config get-users - Display users defined in the kubeconfig
kubectl config rename-context - Rename a context from the kubeconfig file
kubectl config set - Set an individual value in a kubeconfig file
kubectl config set-cluster - Set a cluster entry in kubeconfig
kubectl config set-context - Set a context entry in kubeconfig
kubectl config set-credentials - Set a user entry in kubeconfig
kubectl config unset - Unset an individual value in a kubeconfig file
kubectl config use-context - Set the current-context in a kubeconfig file
kubectl config view - Display merged kubeconfig settings or a specified kubeconfig file•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
| 6,292 |
kubectl config current-context
Synopsis
Display the current-context.
kubectl config current-context [flags]
Examples
# Display the current-context
kubectl config current-context
Options
-h, --help
help for current-context
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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 | 6,293 |
--client-key string
Path to a client key file for TLS
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks
--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 co | 6,294 |
mpression 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
use a particular kubeconfig file
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI reques | 6,295 |
--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
--s | 6,296 |
torage-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 strin | 6,297 |
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
See Also
kubectl config - Modify kubeconfig files
kubectl config delete-cluster
Synopsis
Delete the specified cluster from the kubeconfig.
kubectl config delete-cluster NAME
Examples
# Delete the minikube cluster
kubectl config delete-cluster minikube
Options
-h, --help• | 6,298 |
help for delete-cluster
--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.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--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
--cloud-provider-gce-l7lb-src-cidrs cidrs Default: 130.211.0.0/22,35.191.0.0/16
CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks
--cloud-provider-gce-lb-src-cidrs cidrs Default:
130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
CIDRs opened in GCE | 6,299 |