diff --git a/content/en/docs/reference/kubectl/kubectl.md b/content/en/docs/reference/kubectl/kubectl.md old mode 100755 new mode 100644 index dd968f8e3f95c..3b681260bf15f --- a/content/en/docs/reference/kubectl/kubectl.md +++ b/content/en/docs/reference/kubectl/kubectl.md @@ -8,6 +8,7 @@ kubectl controls the Kubernetes cluster manager ### Synopsis + kubectl controls the Kubernetes cluster manager. Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/ @@ -18,39 +19,421 @@ kubectl [flags] ### Options -``` - --alsologtostderr log to standard error as well as files - --as string Username to impersonate for the operation - --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. - --cache-dir string Default HTTP cache directory (default "/home/username/.kube/http-cache") - --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 - -h, --help help for kubectl - --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. - --log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0) - --log-dir string If non-empty, write log files in this directory - --logtostderr log to standard error instead of files - --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 - --request-timeout string 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. (default "0") - -s, --server string The address and port of the Kubernetes API server - --stderrthreshold severity logs at or above this threshold go to stderr (default 2) - --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 - -v, --v Level log level for V logs - --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging -``` + + + + + + -### SEE ALSO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
-h, --help
help for kubectl
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO * [kubectl alpha](kubectl_alpha.md) - Commands for features in alpha * [kubectl annotate](kubectl_annotate.md) - Update the annotations on a resource +* [kubectl api-resources](kubectl_api-resources.md) - Print the supported API resources on the server * [kubectl api-versions](kubectl_api-versions.md) - Print the supported API versions on the server, in the form of "group/version" * [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin * [kubectl attach](kubectl_attach.md) - Attach to a running container @@ -80,7 +463,6 @@ kubectl [flags] * [kubectl port-forward](kubectl_port-forward.md) - Forward one or more local ports to a pod * [kubectl proxy](kubectl_proxy.md) - Run a proxy to the Kubernetes API server * [kubectl replace](kubectl_replace.md) - Replace a resource by filename or stdin -* [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController * [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource * [kubectl run](kubectl_run.md) - Run a particular image on the cluster * [kubectl scale](kubectl_scale.md) - Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job @@ -89,5 +471,5 @@ kubectl [flags] * [kubectl top](kubectl_top.md) - Display Resource (CPU/Memory/Storage) usage. * [kubectl uncordon](kubectl_uncordon.md) - Mark node as schedulable * [kubectl version](kubectl_version.md) - Print the client and server version information +* [kubectl wait](kubectl_wait.md) - Wait for one condition on one or many resources -###### Auto generated by spf13/cobra on 25-Mar-2018 diff --git a/content/en/docs/reference/kubectl/kubectl_alpha.md b/content/en/docs/reference/kubectl/kubectl_alpha.md new file mode 100644 index 0000000000000..2b3d1f234e07b --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_alpha.md @@ -0,0 +1,444 @@ +--- +title: kubectl alpha +notitle: true +--- +## kubectl alpha + +Commands for features in alpha + +### Synopsis + + +These commands correspond to alpha features that are not enabled in Kubernetes clusters by default. + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for alpha
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl alpha diff](kubectl_alpha_diff.md) - Diff different versions of configurations + diff --git a/content/en/docs/reference/kubectl/kubectl_alpha_diff.md b/content/en/docs/reference/kubectl/kubectl_alpha_diff.md new file mode 100644 index 0000000000000..e17a9646afb98 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_alpha_diff.md @@ -0,0 +1,480 @@ +--- +title: kubectl alpha diff +notitle: true +--- +## kubectl alpha diff + +Diff different versions of configurations + +### Synopsis + + +Diff configurations specified by filename or stdin between their local, last-applied, live and/or "merged" versions. + +LOCAL and LIVE versions are diffed by default. Other available keywords are MERGED and LAST. + +Output is always YAML. + +KUBERNETES EXTERNAL DIFF environment variable can be used to select your own diff command. By default, the "diff" command available in your path will be run with "-u" (unicode) and "-N" (treat new files as empty) options. + +``` +kubectl alpha diff -f FILENAME +``` + +### Examples + +``` + # Diff resources included in pod.json. By default, it will diff LOCAL and LIVE versions + kubectl alpha diff -f pod.json + + # When one version is specified, diff that version against LIVE + cat service.yaml | kubectl alpha diff -f - MERGED + + # Or specify both versions + kubectl alpha diff -f pod.json -f service.yaml LAST LOCAL +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files contains the configuration to diff
-h, --help
help for diff
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl alpha](kubectl_alpha.md) - Commands for features in alpha + diff --git a/content/en/docs/reference/kubectl/kubectl_annotate.md b/content/en/docs/reference/kubectl/kubectl_annotate.md new file mode 100644 index 0000000000000..9f7c5e4fab060 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_annotate.md @@ -0,0 +1,561 @@ +--- +title: kubectl annotate +notitle: true +--- +## kubectl annotate + +Update the annotations on a resource + +### Synopsis + + +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] +``` + +### Examples + +``` + # 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- +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types.
--dry-run
If true, only print the object that would be sent, without sending it.
--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 stringSlice
Filename, directory, or URL to files identifying the resource to update the annotation
-h, --help
help for annotate
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--local
If true, annotation will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--overwrite
If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-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, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_api-resources.md b/content/en/docs/reference/kubectl/kubectl_api-resources.md new file mode 100644 index 0000000000000..136bcd9c6e394 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_api-resources.md @@ -0,0 +1,508 @@ +--- +title: kubectl api-resources +notitle: true +--- +## kubectl api-resources + +Print the supported API resources on the server + +### Synopsis + + +Print the supported API resources on the server + +``` +kubectl api-resources [flags] +``` + +### Examples + +``` + # Print the supported API Resources + kubectl api-resources + + # Print the supported API Resources with more information + kubectl api-resources -o wide + + # 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 specific APIGroup + kubectl api-resources --api-group=extensions +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--api-group string
Limit to resources in the specified API group.
--cached
Use the cached list of resources if available.
-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.
--verbs stringSlice
Limit to resources that support the specified verbs.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_api-versions.md b/content/en/docs/reference/kubectl/kubectl_api-versions.md new file mode 100644 index 0000000000000..8ad8243d83f83 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_api-versions.md @@ -0,0 +1,454 @@ +--- +title: kubectl api-versions +notitle: true +--- +## kubectl api-versions + +Print the supported API versions on the server, in the form of "group/version" + +### Synopsis + + +Print the supported API versions on the server, in the form of "group/version" + +``` +kubectl api-versions [flags] +``` + +### Examples + +``` + # Print the supported API versions + kubectl api-versions +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for api-versions
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_apply.md b/content/en/docs/reference/kubectl/kubectl_apply.md new file mode 100644 index 0000000000000..ec3c38e111ffe --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_apply.md @@ -0,0 +1,597 @@ +--- +title: kubectl apply +notitle: true +--- +## kubectl apply + +Apply a configuration to a resource by filename or stdin + +### Synopsis + + +Apply a configuration to a resource by filename or stdin. The resource name must be specified. This resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. + +JSON and YAML formats are accepted. + +Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current state is. See https://issues.k8s.io/34274. + +``` +kubectl apply -f FILENAME +``` + +### Examples + +``` + # Apply the configuration in pod.json to a pod. + kubectl apply -f ./pod.json + + # Apply the JSON passed into stdin to a pod. + cat pod.json | kubectl apply -f - + + # Note: --prune is still in Alpha + # Apply the configuration in manifest.yaml that matches label app=nginx and delete all the other resources that are not in the file and match label app=nginx. + kubectl apply --prune -f manifest.yaml -l app=nginx + + # Apply the configuration in manifest.yaml and delete all the other configmaps that are not in the file. + kubectl apply --prune -f manifest.yaml --all --prune-whitelist=core/v1/ConfigMap +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources in the namespace of the specified resource types.
--cascade     Default: true
If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
that contains the configuration to apply
--force
Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
--grace-period int     Default: -1
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).
-h, --help
help for apply
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--openapi-patch     Default: true
If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--overwrite     Default: true
Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration
--prune
Automatically delete resource objects, including the uninitialized ones, that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.
--prune-whitelist stringArray
Overwrite the default whitelist with <group/version/kind> for --prune
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--timeout duration
The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
--validate     Default: true
If true, use a schema to validate the input before sending it
--wait
If true, wait for resources to be gone before returning. This waits for finalizers.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl apply edit-last-applied](kubectl_apply_edit-last-applied.md) - Edit latest last-applied-configuration annotations of a resource/object +* [kubectl apply set-last-applied](kubectl_apply_set-last-applied.md) - Set the last-applied-configuration annotation on a live object to match the contents of a file. +* [kubectl apply view-last-applied](kubectl_apply_view-last-applied.md) - View latest last-applied-configuration annotations of a resource/object + diff --git a/content/en/docs/reference/kubectl/kubectl_apply_edit-last-applied.md b/content/en/docs/reference/kubectl/kubectl_apply_edit-last-applied.md new file mode 100644 index 0000000000000..a2fc85f01ade1 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_apply_edit-last-applied.md @@ -0,0 +1,507 @@ +--- +title: kubectl apply edit-last-applied +notitle: true +--- +## kubectl apply edit-last-applied + +Edit latest last-applied-configuration annotations of a resource/object + +### Synopsis + + +Edit the latest last-applied-configuration annotations of resources from the default editor. + +The edit-last-applied command allows you to directly edit any API resource you can retrieve via the command line tools. It will open the editor defined by your KUBE _EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts filenames as well as command line arguments, although the files you point to must be previously saved versions of resources. + +The default format is YAML. To edit in JSON, specify "-o json". + +The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. + +In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version. + +``` +kubectl apply edit-last-applied (RESOURCE/NAME | -f FILENAME) +``` + +### Examples + +``` + # Edit the last-applied-configuration annotations by type/name in YAML. + kubectl apply edit-last-applied deployment/nginx + + # Edit the last-applied-configuration annotations by file in JSON. + kubectl apply edit-last-applied -f deploy.yaml -o json +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files to use to edit the resource
-h, --help
help for edit-last-applied
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
-o, --output string     Default: "yaml"
Output format. One of: yaml|json.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--windows-line-endings
Defaults to the line ending native to your platform.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin + diff --git a/content/en/docs/reference/kubectl/kubectl_apply_set-last-applied.md b/content/en/docs/reference/kubectl/kubectl_apply_set-last-applied.md new file mode 100644 index 0000000000000..f64ccd6ab5649 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_apply_set-last-applied.md @@ -0,0 +1,488 @@ +--- +title: kubectl apply set-last-applied +notitle: true +--- +## kubectl apply set-last-applied + +Set the last-applied-configuration annotation on a live object to match the contents of a file. + +### Synopsis + + +Set the latest last-applied-configuration annotations by setting it to match the contents of a file. This results in the last-applied-configuration being updated as though 'kubectl apply -f ' was run, without updating any other parts of the object. + +``` +kubectl apply set-last-applied -f FILENAME +``` + +### Examples + +``` + # Set the last-applied-configuration of a resource to match the contents of a file. + kubectl apply set-last-applied -f deploy.yaml + + # Execute set-last-applied against each configuration file in a directory. + kubectl apply set-last-applied -f path/ + + # Set the last-applied-configuration of a resource to match the contents of a file, will create the annotation if it does not already exist. + kubectl apply set-last-applied -f deploy.yaml --create-annotation=true +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--create-annotation
Will create 'last-applied-configuration' annotations if current objects doesn't have one
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files that contains the last-applied-configuration annotations
-h, --help
help for set-last-applied
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin + diff --git a/content/en/docs/reference/kubectl/kubectl_apply_view-last-applied.md b/content/en/docs/reference/kubectl/kubectl_apply_view-last-applied.md new file mode 100644 index 0000000000000..bd238b13ad2c5 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_apply_view-last-applied.md @@ -0,0 +1,494 @@ +--- +title: kubectl apply view-last-applied +notitle: true +--- +## kubectl apply view-last-applied + +View latest last-applied-configuration annotations of a resource/object + +### Synopsis + + +View the latest last-applied-configuration annotations by type/name or file. + +The default output will be printed to stdout in YAML format. One can use -o option to change output format. + +``` +kubectl apply view-last-applied (TYPE [NAME | -l label] | TYPE/NAME | -f FILENAME) +``` + +### Examples + +``` + # View the last-applied-configuration annotations by type/name in YAML. + kubectl apply view-last-applied deployment/nginx + + # View the last-applied-configuration annotations by file in JSON + kubectl apply view-last-applied -f deploy.yaml -o json +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources in the namespace of the specified resource types
-f, --filename stringSlice
Filename, directory, or URL to files that contains the last-applied-configuration annotations
-h, --help
help for view-last-applied
-o, --output string     Default: "yaml"
Output format. Must be one of yaml|json
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin + diff --git a/content/en/docs/reference/kubectl/kubectl_attach.md b/content/en/docs/reference/kubectl/kubectl_attach.md new file mode 100644 index 0000000000000..32046d36c6344 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_attach.md @@ -0,0 +1,492 @@ +--- +title: kubectl attach +notitle: true +--- +## kubectl attach + +Attach to a running container + +### Synopsis + + +Attach to a process that is already running inside an existing container. + +``` +kubectl attach (POD | TYPE/NAME) -c CONTAINER +``` + +### Examples + +``` + # Get output from running pod 123456-7890, using the first container by default + kubectl attach 123456-7890 + + # Get output from ruby-container from pod 123456-7890 + kubectl attach 123456-7890 -c ruby-container + + # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 + # and sends stdout/stderr from 'bash' back to the client + kubectl attach 123456-7890 -c ruby-container -i -t + + # Get output from the first pod of a ReplicaSet named nginx + kubectl attach rs/nginx +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-c, --container string
Container name. If omitted, the first container in the pod will be chosen
-h, --help
help for attach
--pod-running-timeout duration     Default: 1m0s
The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running
-i, --stdin
Pass stdin to the container
-t, --tty
Stdin is a TTY
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_auth.md b/content/en/docs/reference/kubectl/kubectl_auth.md new file mode 100644 index 0000000000000..41d37f8b79d9a --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_auth.md @@ -0,0 +1,449 @@ +--- +title: kubectl auth +notitle: true +--- +## kubectl auth + +Inspect authorization + +### Synopsis + + +Inspect authorization + +``` +kubectl auth [flags] +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for auth
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl auth can-i](kubectl_auth_can-i.md) - Check whether an action is allowed +* [kubectl auth reconcile](kubectl_auth_reconcile.md) - Reconciles rules for RBAC Role, RoleBinding, ClusterRole, and ClusterRole binding objects + diff --git a/content/en/docs/reference/kubectl/kubectl_auth_can-i.md b/content/en/docs/reference/kubectl/kubectl_auth_can-i.md new file mode 100644 index 0000000000000..69a16171b5ee9 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_auth_can-i.md @@ -0,0 +1,492 @@ +--- +title: kubectl auth can-i +notitle: true +--- +## kubectl auth can-i + +Check whether an action is allowed + +### 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 starts with "/". NAME is the name of a particular Kubernetes resource. + +``` +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.extensions + + # 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/ +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If true, check the specified action in all namespaces.
-h, --help
help for can-i
-q, --quiet
If true, suppress output and just return the exit code.
--subresource string
SubResource such as pod/log or deployment/scale
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl auth](kubectl_auth.md) - Inspect authorization + diff --git a/content/en/docs/reference/kubectl/kubectl_auth_reconcile.md b/content/en/docs/reference/kubectl/kubectl_auth_reconcile.md new file mode 100644 index 0000000000000..f93449a77f80f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_auth_reconcile.md @@ -0,0 +1,484 @@ +--- +title: kubectl auth reconcile +notitle: true +--- +## kubectl auth reconcile + +Reconciles rules for RBAC Role, RoleBinding, ClusterRole, and ClusterRole binding objects + +### Synopsis + + +Reconciles rules for RBAC Role, RoleBinding, ClusterRole, and ClusterRole binding objects. + +This is preferred to 'apply' for RBAC resources so that proper rule coverage checks are done. + +``` +kubectl auth reconcile -f FILENAME +``` + +### Examples + +``` + # Reconcile rbac resources from a file + kubectl auth reconcile -f my-rbac-rules.yaml +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--dry-run
If true, display results but do not submit changes
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to reconcile.
-h, --help
help for reconcile
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl auth](kubectl_auth.md) - Inspect authorization + diff --git a/content/en/docs/reference/kubectl/kubectl_autoscale.md b/content/en/docs/reference/kubectl/kubectl_autoscale.md new file mode 100644 index 0000000000000..24dac11c45a88 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_autoscale.md @@ -0,0 +1,536 @@ +--- +title: kubectl autoscale +notitle: true +--- +## kubectl autoscale + +Auto-scale a Deployment, ReplicaSet, or ReplicationController + +### Synopsis + + +Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. + +Looks up a Deployment, ReplicaSet, or ReplicationController 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 rc foo --max=5 --cpu-percent=80 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--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
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to autoscale.
--generator string     Default: "horizontalpodautoscaler/v1"
The name of the API generator to use. Currently there is only 1 generator.
-h, --help
help for autoscale
--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|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-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.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_certificate.md b/content/en/docs/reference/kubectl/kubectl_certificate.md new file mode 100644 index 0000000000000..49809863dcb11 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_certificate.md @@ -0,0 +1,449 @@ +--- +title: kubectl certificate +notitle: true +--- +## kubectl certificate + +Modify certificate resources. + +### Synopsis + + +Modify certificate resources. + +``` +kubectl certificate SUBCOMMAND +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for certificate
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl certificate approve](kubectl_certificate_approve.md) - Approve a certificate signing request +* [kubectl certificate deny](kubectl_certificate_deny.md) - Deny a certificate signing request + diff --git a/content/en/docs/reference/kubectl/kubectl_certificate_approve.md b/content/en/docs/reference/kubectl/kubectl_certificate_approve.md new file mode 100644 index 0000000000000..fc2e712dddcf4 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_certificate_approve.md @@ -0,0 +1,479 @@ +--- +title: kubectl certificate approve +notitle: true +--- +## kubectl certificate approve + +Approve a certificate signing request + +### Synopsis + + +Approve a certificate signing request. + +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 requestor 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) +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
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 approve
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl certificate](kubectl_certificate.md) - Modify certificate resources. + diff --git a/content/en/docs/reference/kubectl/kubectl_certificate_deny.md b/content/en/docs/reference/kubectl/kubectl_certificate_deny.md new file mode 100644 index 0000000000000..b2e75503ffdbe --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_certificate_deny.md @@ -0,0 +1,477 @@ +--- +title: kubectl certificate deny +notitle: true +--- +## kubectl certificate deny + +Deny a certificate signing request + +### 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 requestor. + +``` +kubectl certificate deny (-f FILENAME | NAME) +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to update
--force
Update the CSR even if it is already denied.
-h, --help
help for deny
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl certificate](kubectl_certificate.md) - Modify certificate resources. + diff --git a/content/en/docs/reference/kubectl/kubectl_cluster-info.md b/content/en/docs/reference/kubectl/kubectl_cluster-info.md new file mode 100644 index 0000000000000..277242c719741 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_cluster-info.md @@ -0,0 +1,455 @@ +--- +title: kubectl cluster-info +notitle: true +--- +## kubectl cluster-info + +Display cluster info + +### Synopsis + + +Display addresses of the master 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] +``` + +### Examples + +``` + # Print the address of the master and cluster services + kubectl cluster-info +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for cluster-info
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl cluster-info dump](kubectl_cluster-info_dump.md) - Dump lots of relevant info for debugging and diagnosis + diff --git a/content/en/docs/reference/kubectl/kubectl_cluster-info_dump.md b/content/en/docs/reference/kubectl/kubectl_cluster-info_dump.md new file mode 100644 index 0000000000000..7831a9ab00a88 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_cluster-info_dump.md @@ -0,0 +1,493 @@ +--- +title: kubectl cluster-info dump +notitle: true +--- +## kubectl cluster-info dump + +Dump lots of relevant info for debugging and diagnosis + +### Synopsis + + +Dumps cluster info 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 'kube-system' namespace, but you can switch to a different namespace with the --namespaces flag, or specify --all-namespaces 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 + + # 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If true, dump all namespaces. If true, --namespaces is ignored.
-h, --help
help for dump
--namespaces stringSlice
A comma separated list of namespaces to dump.
--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 running
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info + diff --git a/content/en/docs/reference/kubectl/kubectl_completion.md b/content/en/docs/reference/kubectl/kubectl_completion.md new file mode 100644 index 0000000000000..fe106081e12bc --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_completion.md @@ -0,0 +1,481 @@ +--- +title: kubectl completion +notitle: true +--- +## kubectl completion + +Output shell completion code for the specified shell (bash or zsh) + +### Synopsis + + +Output shell completion code for the specified shell (bash or zsh). 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: https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-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 Bash 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 + ## Load the kubectl completion code for bash into the current shell + source <(kubectl completion bash) + ## Write bash completion code to a file and source if from .bash_profile + 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" +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for completion
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_config.md b/content/en/docs/reference/kubectl/kubectl_config.md new file mode 100644 index 0000000000000..c397f1173e8be --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config.md @@ -0,0 +1,466 @@ +--- +title: kubectl config +notitle: true +--- +## kubectl config + +Modify kubeconfig files + +### Synopsis + + +Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" + +The loading order follows these rules: + + 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. + 2. If $KUBECONFIG environment variable is set, then it is used a list of paths (normal path delimitting 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. + 3. Otherwise, ${HOME}/.kube/config is used and no merging takes place. + +``` +kubectl config SUBCOMMAND +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for config
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl config current-context](kubectl_config_current-context.md) - Displays the current-context +* [kubectl config delete-cluster](kubectl_config_delete-cluster.md) - Delete the specified cluster from the kubeconfig +* [kubectl config delete-context](kubectl_config_delete-context.md) - Delete the specified context from the kubeconfig +* [kubectl config get-clusters](kubectl_config_get-clusters.md) - Display clusters defined in the kubeconfig +* [kubectl config get-contexts](kubectl_config_get-contexts.md) - Describe one or many contexts +* [kubectl config rename-context](kubectl_config_rename-context.md) - Renames a context from the kubeconfig file. +* [kubectl config set](kubectl_config_set.md) - Sets an individual value in a kubeconfig file +* [kubectl config set-cluster](kubectl_config_set-cluster.md) - Sets a cluster entry in kubeconfig +* [kubectl config set-context](kubectl_config_set-context.md) - Sets a context entry in kubeconfig +* [kubectl config set-credentials](kubectl_config_set-credentials.md) - Sets a user entry in kubeconfig +* [kubectl config unset](kubectl_config_unset.md) - Unsets an individual value in a kubeconfig file +* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file +* [kubectl config view](kubectl_config_view.md) - Display merged kubeconfig settings or a specified kubeconfig file + diff --git a/content/en/docs/reference/kubectl/kubectl_config_current-context.md b/content/en/docs/reference/kubectl/kubectl_config_current-context.md new file mode 100644 index 0000000000000..f5bea70e65153 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_current-context.md @@ -0,0 +1,454 @@ +--- +title: kubectl config current-context +notitle: true +--- +## kubectl config current-context + +Displays the current-context + +### Synopsis + + +Displays the current-context + +``` +kubectl config current-context [flags] +``` + +### Examples + +``` + # Display the current-context + kubectl config current-context +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for current-context
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_delete-cluster.md b/content/en/docs/reference/kubectl/kubectl_config_delete-cluster.md new file mode 100644 index 0000000000000..a8af8ba70b5b8 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_delete-cluster.md @@ -0,0 +1,454 @@ +--- +title: kubectl config delete-cluster +notitle: true +--- +## kubectl config delete-cluster + +Delete the specified cluster from the kubeconfig + +### 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
help for delete-cluster
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_delete-context.md b/content/en/docs/reference/kubectl/kubectl_config_delete-context.md new file mode 100644 index 0000000000000..ec186b6ebbd08 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_delete-context.md @@ -0,0 +1,454 @@ +--- +title: kubectl config delete-context +notitle: true +--- +## kubectl config delete-context + +Delete the specified context from the kubeconfig + +### Synopsis + + +Delete the specified context from the kubeconfig + +``` +kubectl config delete-context NAME +``` + +### Examples + +``` + # Delete the context for the minikube cluster + kubectl config delete-context minikube +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for delete-context
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_get-clusters.md b/content/en/docs/reference/kubectl/kubectl_config_get-clusters.md new file mode 100644 index 0000000000000..f48d1df0c4a3c --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_get-clusters.md @@ -0,0 +1,454 @@ +--- +title: kubectl config get-clusters +notitle: true +--- +## kubectl config get-clusters + +Display clusters defined in the kubeconfig + +### Synopsis + + +Display clusters defined in the kubeconfig. + +``` +kubectl config get-clusters [flags] +``` + +### Examples + +``` + # List the clusters kubectl knows about + kubectl config get-clusters +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for get-clusters
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_get-contexts.md b/content/en/docs/reference/kubectl/kubectl_config_get-contexts.md new file mode 100644 index 0000000000000..929562b98ce8a --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_get-contexts.md @@ -0,0 +1,471 @@ +--- +title: kubectl config get-contexts +notitle: true +--- +## kubectl config get-contexts + +Describe one or many contexts + +### Synopsis + + +Displays one or many contexts from the kubeconfig file. + +``` +kubectl config get-contexts [(-o|--output=)name)] +``` + +### Examples + +``` + # List all the contexts in your kubeconfig file + kubectl config get-contexts + + # Describe one context in your kubeconfig file. + kubectl config get-contexts my-context +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-h, --help
help for get-contexts
--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: name
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_rename-context.md b/content/en/docs/reference/kubectl/kubectl_config_rename-context.md new file mode 100644 index 0000000000000..de9f2cd785592 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_rename-context.md @@ -0,0 +1,460 @@ +--- +title: kubectl config rename-context +notitle: true +--- +## kubectl config rename-context + +Renames a context from the kubeconfig file. + +### Synopsis + + +Renames a context from the kubeconfig file. + +CONTEXT _NAME is the context name that you wish change. + +NEW _NAME is the new name you wish to set. + +Note: In case the context being renamed is the 'current-context', this field will also be updated. + +``` +kubectl config rename-context CONTEXT_NAME NEW_NAME +``` + +### Examples + +``` + # Rename the context 'old-name' to 'new-name' in your kubeconfig file + kubectl config rename-context old-name new-name +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for rename-context
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_set-cluster.md b/content/en/docs/reference/kubectl/kubectl_config_set-cluster.md new file mode 100644 index 0000000000000..1be0d51433e2d --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_set-cluster.md @@ -0,0 +1,469 @@ +--- +title: kubectl config set-cluster +notitle: true +--- +## kubectl config set-cluster + +Sets a cluster entry in kubeconfig + +### Synopsis + + +Sets a cluster entry in kubeconfig. + +Specifying a name that already exists will merge new fields on top of existing values for those fields. + +``` +kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/to/certificate/authority] [--insecure-skip-tls-verify=true] +``` + +### Examples + +``` + # Set only the server field on the e2e cluster entry without touching other values. + kubectl config set-cluster e2e --server=https://1.2.3.4 + + # Embed certificate authority data for the e2e cluster entry + kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt + + # Disable cert checking for the dev cluster entry + kubectl config set-cluster e2e --insecure-skip-tls-verify=true +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + +
--embed-certs tristate[=true]
embed-certs for the cluster entry in kubeconfig
-h, --help
help for set-cluster
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_set-context.md b/content/en/docs/reference/kubectl/kubectl_config_set-context.md new file mode 100644 index 0000000000000..11dc749d569d3 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_set-context.md @@ -0,0 +1,456 @@ +--- +title: kubectl config set-context +notitle: true +--- +## kubectl config set-context + +Sets a context entry in kubeconfig + +### Synopsis + + +Sets a context entry in kubeconfig + +Specifying a name that already exists will merge new fields on top of existing values for those fields. + +``` +kubectl config set-context NAME [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace] +``` + +### Examples + +``` + # Set the user field on the gce context entry without touching other values + kubectl config set-context gce --user=cluster-admin +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for set-context
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_set-credentials.md b/content/en/docs/reference/kubectl/kubectl_config_set-credentials.md new file mode 100644 index 0000000000000..e9c41b9c0c482 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_set-credentials.md @@ -0,0 +1,518 @@ +--- +title: kubectl config set-credentials +notitle: true +--- +## kubectl config set-credentials + +Sets a user entry in kubeconfig + +### Synopsis + + +Sets a user entry in kubeconfig + +Specifying a name that already exists will merge new fields on top of existing values. + + Client-certificate flags: + --client-certificate=certfile --client-key=keyfile + + Bearer token flags: + --token=bearer_token + + Basic auth flags: + --username=basic_user --password=basic_password + +Bearer token and basic auth are mutually exclusive. + +``` +kubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--client-key=path/to/keyfile] [--token=bearer_token] [--username=basic_user] [--password=basic_password] [--auth-provider=provider_name] [--auth-provider-arg=key=value] +``` + +### Examples + +``` + # Set only the "client-key" field on the "cluster-admin" + # entry, without touching other values: + kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key + + # Set basic auth for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif + + # Embed client certificate data in the "cluster-admin" entry + kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true + + # Enable the Google Compute Platform auth provider for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --auth-provider=gcp + + # Enable the OpenID Connect auth provider for the "cluster-admin" entry with additional args + kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-id=foo --auth-provider-arg=client-secret=bar + + # Remove the "client-secret" config value for the OpenID Connect auth provider for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-secret- +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--auth-provider string
Auth provider for the user entry in kubeconfig
--auth-provider-arg stringSlice
'key=value' arguments for the auth provider
--embed-certs tristate[=true]
Embed client cert/key for the user entry in kubeconfig
-h, --help
help for set-credentials
--password string
password for the user entry in kubeconfig
--username string
username for the user entry in kubeconfig
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_set.md b/content/en/docs/reference/kubectl/kubectl_config_set.md new file mode 100644 index 0000000000000..f6cce987bf72e --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_set.md @@ -0,0 +1,458 @@ +--- +title: kubectl config set +notitle: true +--- +## kubectl config set + +Sets an individual value in a kubeconfig file + +### Synopsis + + +Sets an individual value in a kubeconfig file + +PROPERTY _NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. + +PROPERTY _VALUE is the new value you wish to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used. + +``` +kubectl config set PROPERTY_NAME PROPERTY_VALUE +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + +
-h, --help
help for set
--set-raw-bytes tristate[=true]
When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_unset.md b/content/en/docs/reference/kubectl/kubectl_config_unset.md new file mode 100644 index 0000000000000..306ba76c7593c --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_unset.md @@ -0,0 +1,459 @@ +--- +title: kubectl config unset +notitle: true +--- +## kubectl config unset + +Unsets an individual value in a kubeconfig file + +### Synopsis + + +Unsets an individual value in a kubeconfig file + +PROPERTY _NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. + +``` +kubectl config unset PROPERTY_NAME +``` + +### Examples + +``` + # Unset the current-context. + kubectl config unset current-context + + # Unset namespace in foo context. + kubectl config unset contexts.foo.namespace +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for unset
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_use-context.md b/content/en/docs/reference/kubectl/kubectl_config_use-context.md new file mode 100644 index 0000000000000..37b973a3aac7a --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_use-context.md @@ -0,0 +1,454 @@ +--- +title: kubectl config use-context +notitle: true +--- +## kubectl config use-context + +Sets the current-context in a kubeconfig file + +### Synopsis + + +Sets the current-context in a kubeconfig file + +``` +kubectl config use-context CONTEXT_NAME +``` + +### Examples + +``` + # Use the context for the minikube cluster + kubectl config use-context minikube +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for use-context
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_config_view.md b/content/en/docs/reference/kubectl/kubectl_config_view.md new file mode 100644 index 0000000000000..e55d7a923320c --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_config_view.md @@ -0,0 +1,511 @@ +--- +title: kubectl config view +notitle: true +--- +## kubectl config view + +Display merged kubeconfig settings or a specified kubeconfig file + +### Synopsis + + +Display merged kubeconfig settings or a specified kubeconfig file. + +You can use --output jsonpath={...} to extract specific values using a jsonpath expression. + +``` +kubectl config view [flags] +``` + +### Examples + +``` + # Show merged kubeconfig settings. + kubectl config view + + # Show merged kubeconfig settings and raw certificate data. + kubectl config view --raw + + # Get the password for the e2e user + kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' +``` + +### 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.
--flatten
Flatten the resulting kubeconfig file into self-contained output (useful for creating portable kubeconfig files)
-h, --help
help for view
--merge tristate[=true]     Default: true
Merge the full hierarchy of kubeconfig files
--minify
Remove all information not used by current-context from the output
-o, --output string     Default: "yaml"
Output format. One of: json|yaml|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--raw
Display raw byte data
--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].
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl config](kubectl_config.md) - Modify kubeconfig files + diff --git a/content/en/docs/reference/kubectl/kubectl_convert.md b/content/en/docs/reference/kubectl/kubectl_convert.md new file mode 100644 index 0000000000000..f1e3a8ee14442 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_convert.md @@ -0,0 +1,507 @@ +--- +title: kubectl convert +notitle: true +--- +## kubectl convert + +Convert config files between different API versions + +### Synopsis + + +Convert config files between different API versions. Both YAML and JSON formats are accepted. + +The command takes filename, directory, or URL as input, and convert it into format of version specified by --output-version flag. If target version is not specified or not supported, convert to latest version. + +The default output will be printed to stdout in YAML format. One can use -o option to change to output destination. + +``` +kubectl convert -f FILENAME +``` + +### Examples + +``` + # Convert 'pod.yaml' to latest version and print to stdout. + kubectl convert -f pod.yaml + + # Convert the live state of the resource specified by 'pod.yaml' to the latest version + # and print to stdout in JSON format. + kubectl convert -f pod.yaml --local -o json + + # Convert all files under current directory to latest version and create them all. + kubectl convert -f . | kubectl create -f - +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files to need to get converted.
-h, --help
help for convert
--local     Default: true
If true, convert will NOT try to contact api-server but run locally.
-o, --output string     Default: "yaml"
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--output-version string
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').)
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_cordon.md b/content/en/docs/reference/kubectl/kubectl_cordon.md new file mode 100644 index 0000000000000..9cb916684dbb6 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_cordon.md @@ -0,0 +1,468 @@ +--- +title: kubectl cordon +notitle: true +--- +## kubectl cordon + +Mark node as unschedulable + +### Synopsis + + +Mark node as unschedulable. + +``` +kubectl cordon NODE +``` + +### Examples + +``` + # Mark node "foo" as unschedulable. + kubectl cordon foo +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--dry-run
If true, only print the object that would be sent, without sending it.
-h, --help
help for cordon
-l, --selector string
Selector (label query) to filter on
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_cp.md b/content/en/docs/reference/kubectl/kubectl_cp.md new file mode 100644 index 0000000000000..f25b35b5375ec --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_cp.md @@ -0,0 +1,474 @@ +--- +title: kubectl cp +notitle: true +--- +## kubectl cp + +Copy files and directories to and from containers. + +### Synopsis + + +Copy files and directories to and from containers. + +``` +kubectl cp +``` + +### Examples + +``` + # !!!Important Note!!! + # Requires that the 'tar' binary is present in your container + # image. If 'tar' is not present, 'kubectl cp' will fail. + + # Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace + kubectl cp /tmp/foo_dir :/tmp/bar_dir + + # Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container + kubectl cp /tmp/foo :/tmp/bar -c + + # Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace + kubectl cp /tmp/foo /:/tmp/bar + + # Copy /tmp/foo from a remote pod to /tmp/bar locally + kubectl cp /:/tmp/foo /tmp/bar +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + +
-c, --container string
Container name. If omitted, the first container in the pod will be chosen
-h, --help
help for cp
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_create.md b/content/en/docs/reference/kubectl/kubectl_create.md new file mode 100644 index 0000000000000..ffb30af5a7191 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create.md @@ -0,0 +1,567 @@ +--- +title: kubectl create +notitle: true +--- +## kubectl create + +Create a resource from a file or from stdin. + +### Synopsis + + +Create a resource from a file or from stdin. + +JSON and YAML formats are accepted. + +``` +kubectl create -f FILENAME +``` + +### Examples + +``` + # Create a pod using the data in pod.json. + kubectl create -f ./pod.json + + # Create a pod based on the JSON passed into stdin. + cat pod.json | kubectl create -f - + + # Edit the data in docker-registry.yaml in JSON then create the resource using the edited data. + kubectl create -f docker-registry.yaml --edit -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.
--dry-run
If true, only print the object that would be sent, without sending it.
--edit
Edit the API resource before creating
-f, --filename stringSlice
Filename, directory, or URL to files to use to create the resource
-h, --help
help for create
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--raw string
Raw URI to POST to the server. Uses the transport specified by the kubeconfig file.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--save-config
If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
--windows-line-endings
Only relevant if --edit=true. Defaults to the line ending native to your platform.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl create clusterrole](kubectl_create_clusterrole.md) - Create a ClusterRole. +* [kubectl create clusterrolebinding](kubectl_create_clusterrolebinding.md) - Create a ClusterRoleBinding for a particular ClusterRole +* [kubectl create configmap](kubectl_create_configmap.md) - Create a configmap from a local file, directory or literal value +* [kubectl create deployment](kubectl_create_deployment.md) - Create a deployment with the specified name. +* [kubectl create job](kubectl_create_job.md) - Create a job with the specified name. +* [kubectl create namespace](kubectl_create_namespace.md) - Create a namespace with the specified name +* [kubectl create poddisruptionbudget](kubectl_create_poddisruptionbudget.md) - Create a pod disruption budget with the specified name. +* [kubectl create priorityclass](kubectl_create_priorityclass.md) - Create a priorityclass with the specified name. +* [kubectl create quota](kubectl_create_quota.md) - Create a quota with the specified name. +* [kubectl create role](kubectl_create_role.md) - Create a role with single rule. +* [kubectl create rolebinding](kubectl_create_rolebinding.md) - Create a RoleBinding for a particular Role or ClusterRole +* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand +* [kubectl create service](kubectl_create_service.md) - Create a service using specified subcommand. +* [kubectl create serviceaccount](kubectl_create_serviceaccount.md) - Create a service account with the specified name + diff --git a/content/en/docs/reference/kubectl/kubectl_create_clusterrole.md b/content/en/docs/reference/kubectl/kubectl_create_clusterrole.md new file mode 100644 index 0000000000000..7211046f05d86 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_clusterrole.md @@ -0,0 +1,546 @@ +--- +title: kubectl create clusterrole +notitle: true +--- +## kubectl create clusterrole + +Create a ClusterRole. + +### Synopsis + + +Create a ClusterRole. + +``` +kubectl create clusterrole NAME --verb=verb --resource=resource.group [--resource-name=resourcename] [--dry-run] +``` + +### Examples + +``` + # Create a ClusterRole named "pod-reader" that allows user to perform "get", "watch" and "list" on pods + kubectl create clusterrole pod-reader --verb=get,list,watch --resource=pods + + # Create a ClusterRole named "pod-reader" with ResourceName specified + kubectl create clusterrole pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod + + # Create a ClusterRole named "foo" with API Group specified + kubectl create clusterrole foo --verb=get,list,watch --resource=rs.extensions + + # Create a ClusterRole named "foo" with SubResource specified + kubectl create clusterrole foo --verb=get,list,watch --resource=pods,pods/status + + # Create a ClusterRole name "foo" with NonResourceURL specified + kubectl create clusterrole "foo" --verb=get --non-resource-url=/logs/* + + # Create a ClusterRole name "monitoring" with AggregationRule specified + kubectl create clusterrole monitoring --aggregation-rule="rbac.example.com/aggregate-to-monitoring=true" +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--aggregation-rule mapStringString
An aggregation label selector for combining ClusterRoles.
--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
If true, only print the object that would be sent, without sending it.
-h, --help
help for clusterrole
--non-resource-url stringSlice
A partial url that user should have access to.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--resource stringSlice
Resource that the rule applies to
--resource-name stringArray
Resource in the white list that the rule applies to, repeat this flag for multiple items
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
--verb stringSlice
Verb that applies to the resources contained in the rule
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_clusterrolebinding.md b/content/en/docs/reference/kubectl/kubectl_create_clusterrolebinding.md new file mode 100644 index 0000000000000..4ec7a92cdaf11 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_clusterrolebinding.md @@ -0,0 +1,524 @@ +--- +title: kubectl create clusterrolebinding +notitle: true +--- +## kubectl create clusterrolebinding + +Create a ClusterRoleBinding for a particular ClusterRole + +### Synopsis + + +Create a ClusterRoleBinding for a particular ClusterRole. + +``` +kubectl create clusterrolebinding NAME --clusterrole=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run] +``` + +### Examples + +``` + # Create a ClusterRoleBinding for user1, user2, and group1 using the cluster-admin ClusterRole + kubectl create clusterrolebinding cluster-admin --clusterrole=cluster-admin --user=user1 --user=user2 --group=group1 +``` + +### 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.
--clusterrole string
ClusterRole this ClusterRoleBinding should reference
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "clusterrolebinding.rbac.authorization.k8s.io/v1alpha1"
The name of the API generator to use.
--group stringArray
Groups to bind to the role
-h, --help
help for clusterrolebinding
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--serviceaccount stringArray
Service accounts to bind to the role, in the format <namespace>:<name>
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_configmap.md b/content/en/docs/reference/kubectl/kubectl_create_configmap.md new file mode 100644 index 0000000000000..e0fdaf0f3c64b --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_configmap.md @@ -0,0 +1,549 @@ +--- +title: kubectl create configmap +notitle: true +--- +## kubectl create configmap + +Create a configmap from a local file, directory or literal value + +### Synopsis + + +Create a configmap based on a file, directory, or specified literal value. + +A single configmap may package one or more key/value pairs. + +When creating a configmap based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you may specify an alternate key. + +When creating a configmap based on a directory, each file whose basename is a valid key in the directory will be packaged into the configmap. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc). + +``` +kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run] +``` + +### Examples + +``` + # Create a new configmap named my-config based on folder bar + kubectl create configmap my-config --from-file=path/to/bar + + # Create a new configmap named my-config with specified keys instead of file basenames on disk + kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt + + # Create a new configmap named my-config with key1=config1 and key2=config2 + kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2 + + # Create a new configmap named my-config from the key=value pairs in the file + kubectl create configmap my-config --from-file=path/to/bar + + # Create a new configmap named my-config from an env file + kubectl create configmap my-config --from-env-file=path/to/bar.env +``` + +### 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.
--append-hash
Append a hash of the configmap to its name.
--dry-run
If true, only print the object that would be sent, without sending it.
--from-env-file string
Specify the path to a file to read lines of key=val pairs to create a configmap (i.e. a Docker .env file).
--from-file stringSlice
Key file can be specified using its file path, in which case file basename will be used as configmap key, or optionally with a key and file path, in which case the given key will be used. Specifying a directory will iterate each named file in the directory whose basename is a valid configmap key.
--from-literal stringArray
Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)
--generator string     Default: "configmap/v1"
The name of the API generator to use.
-h, --help
help for configmap
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_deployment.md b/content/en/docs/reference/kubectl/kubectl_create_deployment.md new file mode 100644 index 0000000000000..49f84ebbd754d --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_deployment.md @@ -0,0 +1,510 @@ +--- +title: kubectl create deployment +notitle: true +--- +## kubectl create deployment + +Create a deployment with the specified name. + +### Synopsis + + +Create a deployment with the specified name. + +``` +kubectl create deployment NAME --image=image [--dry-run] +``` + +### Examples + +``` + # Create a new deployment named my-dep that runs the busybox image. + kubectl create deployment my-dep --image=busybox +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string
The name of the API generator to use.
-h, --help
help for deployment
--image stringSlice
Image name to run.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_job.md b/content/en/docs/reference/kubectl/kubectl_create_job.md new file mode 100644 index 0000000000000..6fc0da0fa75cd --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_job.md @@ -0,0 +1,503 @@ +--- +title: kubectl create job +notitle: true +--- +## kubectl create job + +Create a job with the specified name. + +### Synopsis + + +Create a job with the specified name. + +``` +kubectl create job NAME [--from=CRONJOB] [flags] +``` + +### Examples + +``` + # Create a job from a CronJob named "a-cronjob" + kubectl create job test-job --from=cronjob/a-cronjob +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--from string
The name of the resource to create a Job from (only cronjob is supported).
-h, --help
help for job
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_namespace.md b/content/en/docs/reference/kubectl/kubectl_create_namespace.md new file mode 100644 index 0000000000000..4bc9b86428844 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_namespace.md @@ -0,0 +1,503 @@ +--- +title: kubectl create namespace +notitle: true +--- +## kubectl create namespace + +Create a namespace with the specified name + +### Synopsis + + +Create a namespace with the specified name. + +``` +kubectl create namespace NAME [--dry-run] +``` + +### Examples + +``` + # Create a new namespace named my-namespace + kubectl create namespace my-namespace +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "namespace/v1"
The name of the API generator to use.
-h, --help
help for namespace
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_poddisruptionbudget.md b/content/en/docs/reference/kubectl/kubectl_create_poddisruptionbudget.md new file mode 100644 index 0000000000000..63598ccbcff43 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_poddisruptionbudget.md @@ -0,0 +1,529 @@ +--- +title: kubectl create poddisruptionbudget +notitle: true +--- +## kubectl create poddisruptionbudget + +Create a pod disruption budget with the specified name. + +### Synopsis + + +Create a pod disruption budget with the specified name, selector, and desired minimum available pods + +``` +kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run] +``` + +### Examples + +``` + # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label + # and require at least one of them being available at any point in time. + kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 + + # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label + # and require at least half of the pods selected to be available at any point in time. + kubectl create pdb my-pdb --selector=app=nginx --min-available=50% +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "poddisruptionbudget/v1beta1/v2"
The name of the API generator to use.
-h, --help
help for poddisruptionbudget
--max-unavailable string
The maximum number or percentage of unavailable pods this budget requires.
--min-available string
The minimum number or percentage of available pods this budget requires.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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 budget. Only equality-based selector requirements are supported.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_priorityclass.md b/content/en/docs/reference/kubectl/kubectl_create_priorityclass.md new file mode 100644 index 0000000000000..33f3251b181e8 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_priorityclass.md @@ -0,0 +1,527 @@ +--- +title: kubectl create priorityclass +notitle: true +--- +## kubectl create priorityclass + +Create a priorityclass with the specified name. + +### Synopsis + + +Create a priorityclass with the specified name, value, globalDefault and description + +``` +kubectl create priorityclass NAME --value=VALUE --global-default=BOOL [--dry-run] +``` + +### Examples + +``` + # Create a priorityclass named high-priority + kubectl create priorityclass default-priority --value=1000 --description="high priority" + + # Create a priorityclass named default-priority that considered as the global default priority + kubectl create priorityclass default-priority --value=1000 --global-default=true --description="default priority" +``` + +### 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.
--description string
description is an arbitrary string that usually provides guidelines on when this priority class should be used.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "priorityclass/v1alpha1"
The name of the API generator to use.
--global-default
global-default specifies whether this PriorityClass should be considered as the default priority.
-h, --help
help for priorityclass
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
--value int32
the value of this priority class.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_quota.md b/content/en/docs/reference/kubectl/kubectl_create_quota.md new file mode 100644 index 0000000000000..5ee0beca50db5 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_quota.md @@ -0,0 +1,520 @@ +--- +title: kubectl create quota +notitle: true +--- +## kubectl create quota + +Create a quota with the specified name. + +### Synopsis + + +Create a resourcequota with the specified name, hard limits and optional scopes + +``` +kubectl create quota NAME [--hard=key1=value1,key2=value2] [--scopes=Scope1,Scope2] [--dry-run=bool] +``` + +### Examples + +``` + # Create a new resourcequota named my-quota + kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10 + + # Create a new resourcequota named best-effort + kubectl create quota best-effort --hard=pods=100 --scopes=BestEffort +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "resourcequotas/v1"
The name of the API generator to use.
--hard string
A comma-delimited set of resource=quantity pairs that define a hard limit.
-h, --help
help for quota
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--scopes string
A comma-delimited set of quota scopes that must all match each object tracked by the quota.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_role.md b/content/en/docs/reference/kubectl/kubectl_create_role.md new file mode 100644 index 0000000000000..10c56e85b7de2 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_role.md @@ -0,0 +1,526 @@ +--- +title: kubectl create role +notitle: true +--- +## kubectl create role + +Create a role with single rule. + +### Synopsis + + +Create a role with single rule. + +``` +kubectl create role NAME --verb=verb --resource=resource.group/subresource [--resource-name=resourcename] [--dry-run] +``` + +### Examples + +``` + # Create a Role named "pod-reader" that allows user to perform "get", "watch" and "list" on pods + kubectl create role pod-reader --verb=get --verb=list --verb=watch --resource=pods + + # Create a Role named "pod-reader" with ResourceName specified + kubectl create role pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod + + # Create a Role named "foo" with API Group specified + kubectl create role foo --verb=get,list,watch --resource=rs.extensions + + # Create a Role named "foo" with SubResource specified + kubectl create role foo --verb=get,list,watch --resource=pods,pods/status +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
-h, --help
help for role
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--resource stringSlice
Resource that the rule applies to
--resource-name stringArray
Resource in the white list that the rule applies to, repeat this flag for multiple items
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
--verb stringSlice
Verb that applies to the resources contained in the rule
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_rolebinding.md b/content/en/docs/reference/kubectl/kubectl_create_rolebinding.md new file mode 100644 index 0000000000000..92217b836ae26 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_rolebinding.md @@ -0,0 +1,531 @@ +--- +title: kubectl create rolebinding +notitle: true +--- +## kubectl create rolebinding + +Create a RoleBinding for a particular Role or ClusterRole + +### Synopsis + + +Create a RoleBinding for a particular Role or ClusterRole. + +``` +kubectl create rolebinding NAME --clusterrole=NAME|--role=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run] +``` + +### Examples + +``` + # Create a RoleBinding for user1, user2, and group1 using the admin ClusterRole + kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1 +``` + +### 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.
--clusterrole string
ClusterRole this RoleBinding should reference
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "rolebinding.rbac.authorization.k8s.io/v1alpha1"
The name of the API generator to use.
--group stringArray
Groups to bind to the role
-h, --help
help for rolebinding
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--role string
Role this RoleBinding should reference
--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.
--serviceaccount stringArray
Service accounts to bind to the role, in the format <namespace>:<name>
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_secret.md b/content/en/docs/reference/kubectl/kubectl_create_secret.md new file mode 100644 index 0000000000000..d187b569a70a6 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_secret.md @@ -0,0 +1,450 @@ +--- +title: kubectl create secret +notitle: true +--- +## kubectl create secret + +Create a secret using specified subcommand + +### Synopsis + + +Create a secret using specified subcommand. + +``` +kubectl create secret [flags] +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for secret
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. +* [kubectl create secret docker-registry](kubectl_create_secret_docker-registry.md) - Create a secret for use with a Docker registry +* [kubectl create secret generic](kubectl_create_secret_generic.md) - Create a secret from a local file, directory or literal value +* [kubectl create secret tls](kubectl_create_secret_tls.md) - Create a TLS secret + diff --git a/content/en/docs/reference/kubectl/kubectl_create_secret_docker-registry.md b/content/en/docs/reference/kubectl/kubectl_create_secret_docker-registry.md new file mode 100644 index 0000000000000..5a59fa95ecf80 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_secret_docker-registry.md @@ -0,0 +1,556 @@ +--- +title: kubectl create secret docker-registry +notitle: true +--- +## kubectl create secret docker-registry + +Create a secret for use with a Docker registry + +### Synopsis + + +Create a new secret for use with Docker registries. + + Dockercfg secrets are used to authenticate against Docker registries. + + When using the Docker command line to push images, you can authenticate to a given registry by running: + '$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. + +That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to authenticate to the registry. The email address is optional. + + When creating applications, you may have a Docker registry that requires authentication. In order for the + nodes to pull images on your behalf, they have to have the credentials. You can provide this information + by creating a dockercfg secret and attaching it to your service account. + +``` +kubectl create secret docker-registry NAME --docker-username=user --docker-password=password --docker-email=email [--docker-server=string] [--from-literal=key1=value1] [--dry-run] +``` + +### Examples + +``` + # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using: + kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL +``` + +### 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.
--append-hash
Append a hash of the secret to its name.
--docker-email string
Email for Docker registry
--docker-password string
Password for Docker registry authentication
--docker-server string     Default: "https://index.docker.io/v1/"
Server location for Docker registry
--docker-username string
Username for Docker registry authentication
--dry-run
If true, only print the object that would be sent, without sending it.
--from-file stringSlice
Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.
--generator string     Default: "secret-for-docker-registry/v1"
The name of the API generator to use.
-h, --help
help for docker-registry
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand + diff --git a/content/en/docs/reference/kubectl/kubectl_create_secret_generic.md b/content/en/docs/reference/kubectl/kubectl_create_secret_generic.md new file mode 100644 index 0000000000000..1439c30b59593 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_secret_generic.md @@ -0,0 +1,556 @@ +--- +title: kubectl create secret generic +notitle: true +--- +## kubectl create secret generic + +Create a secret from a local file, directory or literal value + +### Synopsis + + +Create a secret based on a file, directory, or specified literal value. + +A single secret may package one or more key/value pairs. + +When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chose your own, you may specify an alternate key. + +When creating a secret based on a directory, each file whose basename is a valid key in the directory will be packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc). + +``` +kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run] +``` + +### Examples + +``` + # Create a new secret named my-secret with keys for each file in folder bar + kubectl create secret generic my-secret --from-file=path/to/bar + + # Create a new secret named my-secret with specified keys instead of names on disk + kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + + # Create a new secret named my-secret with key1=supersecret and key2=topsecret + kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret + + # Create a new secret named my-secret using a combination of a file and a literal + kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-literal=passphrase=topsecret + + # Create a new secret named my-secret from an env file + kubectl create secret generic my-secret --from-env-file=path/to/bar.env +``` + +### 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.
--append-hash
Append a hash of the secret to its name.
--dry-run
If true, only print the object that would be sent, without sending it.
--from-env-file string
Specify the path to a file to read lines of key=val pairs to create a secret (i.e. a Docker .env file).
--from-file stringSlice
Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.
--from-literal stringArray
Specify a key and literal value to insert in secret (i.e. mykey=somevalue)
--generator string     Default: "secret/v1"
The name of the API generator to use.
-h, --help
help for generic
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--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
The type of secret to create
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand + diff --git a/content/en/docs/reference/kubectl/kubectl_create_secret_tls.md b/content/en/docs/reference/kubectl/kubectl_create_secret_tls.md new file mode 100644 index 0000000000000..b78d272ec486f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_secret_tls.md @@ -0,0 +1,526 @@ +--- +title: kubectl create secret tls +notitle: true +--- +## kubectl create secret tls + +Create a TLS secret + +### Synopsis + + +Create a TLS secret from the given public/private key pair. + +The public/private key pair must exist before hand. The public key certificate must be .PEM encoded and match the given private key. + +``` +kubectl create secret tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run] +``` + +### Examples + +``` + # Create a new TLS secret named tls-secret with the given key pair: + kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key +``` + +### 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.
--append-hash
Append a hash of the secret to its name.
--cert string
Path to PEM encoded public key certificate.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "secret-for-tls/v1"
The name of the API generator to use.
-h, --help
help for tls
--key string
Path to private key associated with given certificate.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create secret](kubectl_create_secret.md) - Create a secret using specified subcommand + diff --git a/content/en/docs/reference/kubectl/kubectl_create_service.md b/content/en/docs/reference/kubectl/kubectl_create_service.md new file mode 100644 index 0000000000000..8cb130474cc4b --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_service.md @@ -0,0 +1,451 @@ +--- +title: kubectl create service +notitle: true +--- +## kubectl create service + +Create a service using specified subcommand. + +### Synopsis + + +Create a service using specified subcommand. + +``` +kubectl create service [flags] +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for service
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. +* [kubectl create service clusterip](kubectl_create_service_clusterip.md) - Create a ClusterIP service. +* [kubectl create service externalname](kubectl_create_service_externalname.md) - Create an ExternalName service. +* [kubectl create service loadbalancer](kubectl_create_service_loadbalancer.md) - Create a LoadBalancer service. +* [kubectl create service nodeport](kubectl_create_service_nodeport.md) - Create a NodePort service. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_service_clusterip.md b/content/en/docs/reference/kubectl/kubectl_create_service_clusterip.md new file mode 100644 index 0000000000000..d379c8b0eb704 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_service_clusterip.md @@ -0,0 +1,520 @@ +--- +title: kubectl create service clusterip +notitle: true +--- +## kubectl create service clusterip + +Create a ClusterIP service. + +### Synopsis + + +Create a ClusterIP service with the specified name. + +``` +kubectl create service clusterip NAME [--tcp=:] [--dry-run] +``` + +### Examples + +``` + # Create a new ClusterIP service named my-cs + kubectl create service clusterip my-cs --tcp=5678:8080 + + # Create a new ClusterIP service named my-cs (in headless mode) + kubectl create service clusterip my-cs --clusterip="None" +``` + +### 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.
--clusterip string
Assign your own ClusterIP or set to 'None' for a 'headless' service (no loadbalancing).
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "service-clusterip/v1"
The name of the API generator to use.
-h, --help
help for clusterip
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--tcp stringSlice
Port pairs can be specified as '<port>:<targetPort>'.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create service](kubectl_create_service.md) - Create a service using specified subcommand. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_service_externalname.md b/content/en/docs/reference/kubectl/kubectl_create_service_externalname.md new file mode 100644 index 0000000000000..5d57f918d6993 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_service_externalname.md @@ -0,0 +1,519 @@ +--- +title: kubectl create service externalname +notitle: true +--- +## kubectl create service externalname + +Create an ExternalName service. + +### Synopsis + + +Create an ExternalName service with the specified name. + +ExternalName service references to an external DNS address instead of only pods, which will allow application authors to reference services that exist off platform, on other clusters, or locally. + +``` +kubectl create service externalname NAME --external-name external.name [--dry-run] +``` + +### Examples + +``` + # Create a new ExternalName service named my-ns + kubectl create service externalname my-ns --external-name bar.com +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--external-name string
External name of service
--generator string     Default: "service-externalname/v1"
The name of the API generator to use.
-h, --help
help for externalname
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--tcp stringSlice
Port pairs can be specified as '<port>:<targetPort>'.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create service](kubectl_create_service.md) - Create a service using specified subcommand. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_service_loadbalancer.md b/content/en/docs/reference/kubectl/kubectl_create_service_loadbalancer.md new file mode 100644 index 0000000000000..42a74c58ed91d --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_service_loadbalancer.md @@ -0,0 +1,510 @@ +--- +title: kubectl create service loadbalancer +notitle: true +--- +## kubectl create service loadbalancer + +Create a LoadBalancer service. + +### Synopsis + + +Create a LoadBalancer service with the specified name. + +``` +kubectl create service loadbalancer NAME [--tcp=port:targetPort] [--dry-run] +``` + +### Examples + +``` + # Create a new LoadBalancer service named my-lbs + kubectl create service loadbalancer my-lbs --tcp=5678:8080 +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "service-loadbalancer/v1"
The name of the API generator to use.
-h, --help
help for loadbalancer
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--tcp stringSlice
Port pairs can be specified as '<port>:<targetPort>'.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create service](kubectl_create_service.md) - Create a service using specified subcommand. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_service_nodeport.md b/content/en/docs/reference/kubectl/kubectl_create_service_nodeport.md new file mode 100644 index 0000000000000..4cfe9db32fb31 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_service_nodeport.md @@ -0,0 +1,517 @@ +--- +title: kubectl create service nodeport +notitle: true +--- +## kubectl create service nodeport + +Create a NodePort service. + +### Synopsis + + +Create a NodePort service with the specified name. + +``` +kubectl create service nodeport NAME [--tcp=port:targetPort] [--dry-run] +``` + +### Examples + +``` + # Create a new NodePort service named my-ns + kubectl create service nodeport my-ns --tcp=5678:8080 +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "service-nodeport/v1"
The name of the API generator to use.
-h, --help
help for nodeport
--node-port int
Port used to expose the service on each node in a cluster.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--tcp stringSlice
Port pairs can be specified as '<port>:<targetPort>'.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create service](kubectl_create_service.md) - Create a service using specified subcommand. + diff --git a/content/en/docs/reference/kubectl/kubectl_create_serviceaccount.md b/content/en/docs/reference/kubectl/kubectl_create_serviceaccount.md new file mode 100644 index 0000000000000..9ebce861f162f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_create_serviceaccount.md @@ -0,0 +1,503 @@ +--- +title: kubectl create serviceaccount +notitle: true +--- +## kubectl create serviceaccount + +Create a service account with the specified name + +### Synopsis + + +Create a service account with the specified name. + +``` +kubectl create serviceaccount NAME [--dry-run] +``` + +### Examples + +``` + # Create a new service account named my-service-account + kubectl create serviceaccount my-service-account +``` + +### 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.
--dry-run
If true, only print the object that would be sent, without sending it.
--generator string     Default: "serviceaccount/v1"
The name of the API generator to use.
-h, --help
help for serviceaccount
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--template string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl create](kubectl_create.md) - Create a resource from a file or from stdin. + diff --git a/content/en/docs/reference/kubectl/kubectl_delete.md b/content/en/docs/reference/kubectl/kubectl_delete.md new file mode 100644 index 0000000000000..b47b3512428d4 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_delete.md @@ -0,0 +1,578 @@ +--- +title: kubectl delete +notitle: true +--- +## kubectl delete + +Delete resources by filenames, stdin, resources and names, or by resources and label selector + +### Synopsis + + +Delete resources by filenames, stdin, resources and names, or by resources and label selector. + +JSON and YAML formats are accepted. Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector. + +Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must pass a grace period of 0 and specify the --force flag. + +IMPORTANT: Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately. + +Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource. + +``` +kubectl delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) +``` + +### Examples + +``` + # Delete a pod using the type and name specified in pod.json. + kubectl delete -f ./pod.json + + # Delete a pod based on the type and name in the JSON passed into stdin. + cat pod.json | kubectl delete -f - + + # Delete pods and services with same names "baz" and "foo" + kubectl delete pod,service baz foo + + # Delete pods and services with label name=myLabel. + kubectl delete pods,services -l name=myLabel + + # Delete a pod with minimal delay + kubectl delete pod foo --now + + # Force delete a pod on a dead node + kubectl delete pod foo --grace-period=0 --force + + # Delete all pods + kubectl delete pods --all +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Delete all resources, including uninitialized ones, in the namespace of the specified resource types.
--cascade     Default: true
If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
--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 stringSlice
containing the resource to delete.
--force
Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
--grace-period int     Default: -1
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).
-h, --help
help for delete
--ignore-not-found
Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--now
If true, resources are signaled for immediate shutdown (same as --grace-period=1).
-o, --output string
Output mode. Use "-o name" for shorter output (resource/name).
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, not including uninitialized ones.
--timeout duration
The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
--wait     Default: true
If true, wait for resources to be gone before returning. This waits for finalizers.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_describe.md b/content/en/docs/reference/kubectl/kubectl_describe.md new file mode 100644 index 0000000000000..1539b673e7474 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_describe.md @@ -0,0 +1,520 @@ +--- +title: kubectl describe +notitle: true +--- +## kubectl describe + +Show details of a specific resource or group of resources + +### Synopsis + + +Show details of a specific resource or group of resources + +Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: + + $ kubectl describe TYPE NAME_PREFIX + +will first check for an exact match on TYPE and NAME PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME PREFIX. + +Use "kubectl api-resources" for a complete list of supported resources. + +``` +kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) +``` + +### Examples + +``` + # Describe a node + kubectl describe nodes kubernetes-node-emt8.c.myproject.internal + + # Describe a pod + kubectl describe pods/nginx + + # Describe a pod identified by type and name in "pod.json" + kubectl describe -f pod.json + + # Describe all pods + kubectl describe pods + + # Describe pods by label name=myLabel + kubectl describe po -l name=myLabel + + # Describe all pods managed by the 'frontend' replication controller (rc-created pods + # get the name of the rc as a prefix in the pod the name). + kubectl describe pods frontend +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
-f, --filename stringSlice
Filename, directory, or URL to files containing the resource to describe
-h, --help
help for describe
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--show-events     Default: true
If true, display events related to the described object.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_drain.md b/content/en/docs/reference/kubectl/kubectl_drain.md new file mode 100644 index 0000000000000..e376fd50fa647 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_drain.md @@ -0,0 +1,521 @@ +--- +title: kubectl drain +notitle: true +--- +## kubectl drain + +Drain node in preparation for maintenance + +### Synopsis + + +Drain node in preparation for maintenance. + +The given node will be marked unschedulable to prevent new pods from arriving. 'drain' evicts the pods if the APIServer supports eviction (http://kubernetes.io/docs/admin/disruptions/). Otherwise, it will use normal DELETE to delete the pods. The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through the API server). If there are DaemonSet-managed pods, drain will not proceed without --ignore-daemonsets, and regardless it will not delete any DaemonSet-managed pods, because those pods would be immediately replaced by the DaemonSet controller, which ignores unschedulable markings. If there are any pods that are neither mirror pods nor managed by ReplicationController, ReplicaSet, DaemonSet, StatefulSet or Job, then drain will not delete any pods unless you use --force. --force will also allow deletion to proceed if the managing resource of one or more pods is missing. + +'drain' waits for graceful termination. You should not operate on the machine until the command completes. + +When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again. + +! http://kubernetes.io/images/docs/kubectl_drain.svg + +``` +kubectl drain NODE +``` + +### Examples + +``` + # Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet on it. + $ kubectl drain foo --force + + # As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet, and use a grace period of 15 minutes. + $ kubectl drain foo --grace-period=900 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--delete-local-data
Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).
--dry-run
If true, only print the object that would be sent, without sending it.
--force
Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet.
--grace-period int     Default: -1
Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.
-h, --help
help for drain
--ignore-daemonsets
Ignore DaemonSet-managed pods.
--pod-selector string
Label selector to filter pods on the node
-l, --selector string
Selector (label query) to filter on
--timeout duration
The length of time to wait before giving up, zero means infinite
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_edit.md b/content/en/docs/reference/kubectl/kubectl_edit.md new file mode 100644 index 0000000000000..1d072a105fd87 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_edit.md @@ -0,0 +1,536 @@ +--- +title: kubectl edit +notitle: true +--- +## kubectl edit + +Edit a resource on the server + +### Synopsis + + +Edit a resource from the default editor. + +The edit command allows you to directly edit any API resource you can retrieve via the command line tools. It will open the editor defined by your KUBE _EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts filenames as well as command line arguments, although the files you point to must be previously saved versions of resources. + +Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group. + +The default format is YAML. To edit in JSON, specify "-o json". + +The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. + +In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version. + +``` +kubectl edit (RESOURCE/NAME | -f FILENAME) +``` + +### Examples + +``` + # Edit the service named 'docker-registry': + kubectl edit svc/docker-registry + + # Use an alternative editor + KUBE_EDITOR="nano" kubectl edit svc/docker-registry + + # Edit the job 'myjob' in JSON using the v1 API format: + kubectl edit job.v1.batch/myjob -o json + + # Edit the deployment 'mydeployment' in YAML and save the modified config in its annotation: + kubectl edit deployment/mydeployment -o yaml --save-config +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files to use to edit the resource
-h, --help
help for edit
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--output-patch
Output the patch if the resource is edited.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-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.
--validate     Default: true
If true, use a schema to validate the input before sending it
--windows-line-endings
Defaults to the line ending native to your platform.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_exec.md b/content/en/docs/reference/kubectl/kubectl_exec.md new file mode 100644 index 0000000000000..d26f103d6c238 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_exec.md @@ -0,0 +1,496 @@ +--- +title: kubectl exec +notitle: true +--- +## kubectl exec + +Execute a command in a container + +### Synopsis + + +Execute a command in a container. + +``` +kubectl exec POD [-c CONTAINER] -- COMMAND [args...] +``` + +### Examples + +``` + # Get output from running 'date' from pod 123456-7890, using the first container by default + kubectl exec 123456-7890 date + + # Get output from running 'date' in ruby-container from pod 123456-7890 + kubectl exec 123456-7890 -c ruby-container date + + # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 + # and sends stdout/stderr from 'bash' back to the client + kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il + + # List contents of /usr from the first container of pod 123456-7890 and sort by modification time. + # If the command you want to execute in the pod has any flags in common (e.g. -i), + # you must use two dashes (--) to separate your command's flags/arguments. + # Also note, do not surround your command and its flags/arguments with quotes + # unless that is how you would execute it normally (i.e., do ls -t /usr, not "ls -t /usr"). + kubectl exec 123456-7890 -i -t -- ls -t /usr +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-c, --container string
Container name. If omitted, the first container in the pod will be chosen
-h, --help
help for exec
-p, --pod string
Pod name
-i, --stdin
Pass stdin to the container
-t, --tty
Stdin is a TTY
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_explain.md b/content/en/docs/reference/kubectl/kubectl_explain.md new file mode 100644 index 0000000000000..5fed87e70d9dd --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_explain.md @@ -0,0 +1,479 @@ +--- +title: kubectl explain +notitle: true +--- +## kubectl explain + +Documentation of resources + +### Synopsis + + +List the fields for supported resources + +This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier: + + .[.] + +Add the --recursive flag to display all of the fields at once without descriptions. Information about each field is retrieved from the server in OpenAPI format. + +Use "kubectl api-resources" for a complete list of supported resources. + +``` +kubectl explain RESOURCE +``` + +### Examples + +``` + # Get the documentation of the resource and its fields + kubectl explain pods + + # Get the documentation of a specific field of a resource + kubectl explain pods.spec.containers +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--api-version string
Get different explanations for particular API version
-h, --help
help for explain
--recursive
Print the fields of fields (Currently only 1 level deep)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_expose.md b/content/en/docs/reference/kubectl/kubectl_expose.md new file mode 100644 index 0000000000000..4e8f0474695f6 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_expose.md @@ -0,0 +1,611 @@ +--- +title: kubectl expose +notitle: true +--- +## kubectl expose + +Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service + +### Synopsis + + +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] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] +``` + +### Examples + +``` + # 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 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--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
If true, only print the object that would be sent, without sending it.
--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.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to expose a service
--generator string     Default: "service/v2"
The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'.
-h, --help
help for expose
-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|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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'.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-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'
--target-port string
Name or number for the port on the container that the service should direct traffic to. Optional.
--type string
Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_get.md b/content/en/docs/reference/kubectl/kubectl_get.md new file mode 100644 index 0000000000000..2092544dc4688 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_get.md @@ -0,0 +1,640 @@ +--- +title: kubectl get +notitle: true +--- +## kubectl get + +Display one or many resources + +### Synopsis + + +Display one or many resources + +Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces. + +Uninitialized objects are not shown unless --include-uninitialized is passed. + +By specifying the output as 'template' and providing a Go template as the value of the --template flag, you can filter the attributes of the fetched resources. + +Use "kubectl api-resources" for a complete list of supported resources. + +``` +kubectl get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] +``` + +### Examples + +``` + # List all pods in ps output format. + kubectl get pods + + # List all pods in ps output format with more information (such as node name). + kubectl get pods -o wide + + # List a single replication controller with specified NAME in ps output format. + kubectl get replicationcontroller web + + # List deployments in JSON output format, in the "v1" version of the "apps" API group: + kubectl get deployments.v1.apps -o json + + # List a single pod in JSON output format. + kubectl get -o json pod web-pod-13je7 + + # List a pod identified by type and name specified in "pod.yaml" in JSON output format. + kubectl get -f pod.yaml -o json + + # Return only the phase value of the specified pod. + kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} + + # List all replication controllers and services together in ps output format. + kubectl get rc,services + + # List one or more resources by their type and names. + kubectl get rc/web service/frontend pods/web-pod-13je7 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
--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.
--chunk-size int     Default: 500
Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.
--export
If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.
--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 stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for get
--ignore-not-found
If the requested object does not exist the command will return exit code 0.
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
-L, --label-columns stringSlice
Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...
--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: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--raw string
Raw URI to request from the server. Uses the transport specified by the kubeconfig file.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--server-print     Default: true
If true, have the server return the appropriate table output. Supports extension APIs and CRDs.
--show-kind
If present, list the resource type for the requested object(s).
--show-labels
When printing, show all labels as the last column (default hide labels column)
--sort-by string
If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
--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].
--use-openapi-print-columns
If true, use x-kubernetes-print-column metadata (if present) from the OpenAPI schema for displaying a resource.
-w, --watch
After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.
--watch-only
Watch for changes to the requested object(s), without listing/getting first.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_label.md b/content/en/docs/reference/kubectl/kubectl_label.md new file mode 100644 index 0000000000000..f8c1e948bd4fd --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_label.md @@ -0,0 +1,566 @@ +--- +title: kubectl label +notitle: true +--- +## kubectl label + +Update the labels on a resource + +### Synopsis + + +Update the labels on a resource. + + * A label key and value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters each. + * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app + * If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. + * If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. + +``` +kubectl label [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] +``` + +### Examples + +``` + # Update pod 'foo' with the label 'unhealthy' and the value 'true'. + kubectl label pods foo unhealthy=true + + # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. + kubectl label --overwrite pods foo status=unhealthy + + # Update all pods in the namespace + kubectl label pods --all status=unhealthy + + # Update a pod identified by the type and name in "pod.json" + kubectl label -f pod.json status=unhealthy + + # Update pod 'foo' only if the resource is unchanged from version 1. + kubectl label pods foo status=unhealthy --resource-version=1 + + # Update pod 'foo' by removing a label named 'bar' if it exists. + # Does not require the --overwrite flag. + kubectl label pods foo bar- +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types
--dry-run
If true, only print the object that would be sent, without sending it.
--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 stringSlice
Filename, directory, or URL to files identifying the resource to update the labels
-h, --help
help for label
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--list
If true, display the labels for a given resource.
--local
If true, label will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--overwrite
If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-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 labels 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, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_logs.md b/content/en/docs/reference/kubectl/kubectl_logs.md new file mode 100644 index 0000000000000..4507541bf56d1 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_logs.md @@ -0,0 +1,555 @@ +--- +title: kubectl logs +notitle: true +--- +## kubectl logs + +Print the logs for a container in a pod + +### Synopsis + + +Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional. + +``` +kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER] +``` + +### Examples + +``` + # Return snapshot logs from pod nginx with only one container + kubectl logs nginx + + # Return snapshot logs from pod nginx with multi containers + kubectl logs nginx --all-containers=true + + # Return snapshot logs from all containers in pods defined by label app=nginx + kubectl logs -lapp=nginx --all-containers=true + + # Return snapshot of previous terminated ruby container logs from pod web-1 + kubectl logs -p -c ruby web-1 + + # Begin streaming the logs of the ruby container in pod web-1 + kubectl logs -f -c ruby web-1 + + # Display only the most recent 20 lines of output in pod nginx + kubectl logs --tail=20 nginx + + # Show all logs from pod nginx written in the last hour + kubectl logs --since=1h nginx + + # Return snapshot logs from first container of a job named hello + kubectl logs job/hello + + # Return snapshot logs from container nginx-1 of a deployment named nginx + kubectl logs deployment/nginx -c nginx-1 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-containers
Get all containers's logs in the pod(s).
-c, --container string
Print the logs of this container
-f, --follow
Specify if the logs should be streamed.
-h, --help
help for logs
--limit-bytes int
Maximum bytes of logs to return. Defaults to no limit.
--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 running
-p, --previous
If true, print the logs for the previous instance of the container in a pod if it exists.
-l, --selector string
Selector (label query) to filter on.
--since duration
Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.
--since-time string
Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.
--tail int     Default: -1
Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise 10, if a selector is provided.
--timestamps
Include timestamps on each line in the log output
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_options.md b/content/en/docs/reference/kubectl/kubectl_options.md new file mode 100644 index 0000000000000..65e4fc01189ad --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_options.md @@ -0,0 +1,454 @@ +--- +title: kubectl options +notitle: true +--- +## kubectl options + +Print the list of flags inherited by all commands + +### Synopsis + + +Print the list of flags inherited by all commands + +``` +kubectl options [flags] +``` + +### Examples + +``` + # Print flags inherited by all commands + kubectl options +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for options
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_patch.md b/content/en/docs/reference/kubectl/kubectl_patch.md new file mode 100644 index 0000000000000..d2d46d4940277 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_patch.md @@ -0,0 +1,526 @@ +--- +title: kubectl patch +notitle: true +--- +## kubectl patch + +Update field(s) of a resource using strategic merge patch + +### Synopsis + + +Update field(s) of a resource using strategic merge patch, a JSON merge patch, or a JSON patch. + +JSON and YAML formats are accepted. + +Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable. + +``` +kubectl patch (-f FILENAME | TYPE NAME) -p PATCH +``` + +### Examples + +``` + # Partially update a node using a strategic merge patch. Specify the patch as JSON. + kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' + + # Partially update a node using a strategic merge patch. Specify the patch as YAML. + kubectl patch node k8s-node-1 -p $'spec:\n unschedulable: true' + + # Partially update a node identified by the type and name specified in "node.json" using strategic merge patch. + kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}' + + # Update a container's image; spec.containers[*].name is required because it's a merge key. + kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' + + # Update a container's image using a json patch with positional arrays. + kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]' +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to update
-h, --help
help for patch
--local
If true, patch will operate on the content of the file, not the server-side resource.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-p, --patch string
The patch to be applied to the resource JSON file.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--type string     Default: "strategic"
The type of patch being provided; one of [json merge strategic]
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_plugin.md b/content/en/docs/reference/kubectl/kubectl_plugin.md new file mode 100644 index 0000000000000..af3e6c259bea4 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_plugin.md @@ -0,0 +1,449 @@ +--- +title: kubectl plugin +notitle: true +--- +## kubectl plugin + +Runs a command-line plugin + +### Synopsis + + +Runs a command-line plugin. + +Plugins are subcommands that are not part of the major command-line distribution and can even be provided by third-parties. Please refer to the documentation and examples for more information about how to install and write your own plugins. + +``` +kubectl plugin NAME +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for plugin
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_port-forward.md b/content/en/docs/reference/kubectl/kubectl_port-forward.md new file mode 100644 index 0000000000000..f68437c0ac2e4 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_port-forward.md @@ -0,0 +1,474 @@ +--- +title: kubectl port-forward +notitle: true +--- +## kubectl port-forward + +Forward one or more local ports to a pod + +### Synopsis + + +Forward one or more local ports to a pod. + +Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted. + +If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and rerun of the command is needed to resume forwarding. + +``` +kubectl port-forward TYPE/NAME [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] +``` + +### Examples + +``` + # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod + kubectl port-forward pod/mypod 5000 6000 + + # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in a pod selected by the deployment + kubectl port-forward deployment/mydeployment 5000 6000 + + # Listen on port 8888 locally, forwarding to 5000 in the pod + kubectl port-forward pod/mypod 8888:5000 + + # Listen on a random port locally, forwarding to 5000 in the pod + kubectl port-forward pod/mypod :5000 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + +
-h, --help
help for port-forward
--pod-running-timeout duration     Default: 1m0s
The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_proxy.md b/content/en/docs/reference/kubectl/kubectl_proxy.md new file mode 100644 index 0000000000000..bf09747e2892c --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_proxy.md @@ -0,0 +1,555 @@ +--- +title: kubectl proxy +notitle: true +--- +## kubectl proxy + +Run a proxy to the Kubernetes API server + +### Synopsis + + +Creates a proxy server or application-level gateway between localhost and the Kubernetes API Server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote kubernetes API Server port, except for the path matching the static content path. + +``` +kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] +``` + +### Examples + +``` + # To proxy all of the kubernetes api and nothing else, use: + + $ kubectl proxy --api-prefix=/ + + # To proxy only part of the kubernetes api and also some static files: + + $ kubectl proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/ + + # The above lets you 'curl localhost:8001/api/v1/pods'. + + # To proxy the entire kubernetes api at a different root, use: + + $ kubectl proxy --api-prefix=/custom/ + + # The above lets you 'curl localhost:8001/custom/api/v1/pods' + + # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ + kubectl proxy --port=8011 --www=./local/www/ + + # Run a proxy to kubernetes apiserver on an arbitrary local port. + # The chosen port for the server will be output to stdout. + kubectl proxy --port=0 + + # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api + # This makes e.g. the pods api available at localhost:8001/k8s-api/v1/pods/ + kubectl proxy --api-prefix=/k8s-api +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--accept-hosts string     Default: "^localhost$,^127\.0\.0\.1$,^\[::1\]$"
Regular expression for hosts that the proxy should accept.
--accept-paths string     Default: "^.*"
Regular expression for paths that the proxy should accept.
--address string     Default: "127.0.0.1"
The IP address on which to serve on.
--api-prefix string     Default: "/"
Prefix to serve the proxied API under.
--disable-filter
If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port.
-h, --help
help for proxy
-p, --port int     Default: 8001
The port on which to run the proxy. Set to 0 to pick a random port.
--reject-methods string     Default: "^$"
Regular expression for HTTP methods that the proxy should reject (example --reject-methods='POST,PUT,PATCH').
--reject-paths string     Default: "^/api/.*/pods/.*/exec,
^/api/.*/pods/.*/attach"
Regular expression for paths that the proxy should reject. Paths specified here will be rejected even accepted by --accept-paths.
-u, --unix-socket string
Unix socket on which to run the proxy.
-w, --www string
Also serve static files from the given directory under the specified prefix.
-P, --www-prefix string     Default: "/static/"
Prefix to serve static files under, if static file directory is specified.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_replace.md b/content/en/docs/reference/kubectl/kubectl_replace.md new file mode 100644 index 0000000000000..2e3ca247ad3e1 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_replace.md @@ -0,0 +1,539 @@ +--- +title: kubectl replace +notitle: true +--- +## kubectl replace + +Replace a resource by filename or stdin + +### Synopsis + + +Replace a resource by filename or stdin. + +JSON and YAML formats are accepted. If replacing an existing resource, the complete resource spec must be provided. This can be obtained by + + $ kubectl get TYPE NAME -o yaml + +Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable. + +``` +kubectl replace -f FILENAME +``` + +### Examples + +``` + # Replace a pod using the data in pod.json. + kubectl replace -f ./pod.json + + # Replace a pod based on the JSON passed into stdin. + cat pod.json | kubectl replace -f - + + # Update a single-container pod's image version (tag) to v4 + kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - + + # Force replace, delete and then re-create the resource + kubectl replace --force -f ./pod.json +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--cascade     Default: true
If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
-f, --filename stringSlice
to use to replace the resource.
--force
Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
--grace-period int     Default: -1
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).
-h, --help
help for replace
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-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.
--timeout duration
The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
--validate     Default: true
If true, use a schema to validate the input before sending it
--wait
If true, wait for resources to be gone before returning. This waits for finalizers.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout.md b/content/en/docs/reference/kubectl/kubectl_rollout.md new file mode 100644 index 0000000000000..12d8b2dc6beeb --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout.md @@ -0,0 +1,468 @@ +--- +title: kubectl rollout +notitle: true +--- +## kubectl rollout + +Manage the rollout of a resource + +### Synopsis + + +Manage the rollout of a resource. + +Valid resource types include: + + * deployments + * daemonsets + * statefulsets + +``` +kubectl rollout SUBCOMMAND +``` + +### Examples + +``` + # Rollback to the previous deployment + kubectl rollout undo deployment/abc + + # Check the rollout status of a daemonset + kubectl rollout status daemonset/foo +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for rollout
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl rollout history](kubectl_rollout_history.md) - View rollout history +* [kubectl rollout pause](kubectl_rollout_pause.md) - Mark the provided resource as paused +* [kubectl rollout resume](kubectl_rollout_resume.md) - Resume a paused resource +* [kubectl rollout status](kubectl_rollout_status.md) - Show the status of the rollout +* [kubectl rollout undo](kubectl_rollout_undo.md) - Undo a previous rollout + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout_history.md b/content/en/docs/reference/kubectl/kubectl_rollout_history.md new file mode 100644 index 0000000000000..8f7eb2b148ab3 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout_history.md @@ -0,0 +1,478 @@ +--- +title: kubectl rollout history +notitle: true +--- +## kubectl rollout history + +View rollout history + +### Synopsis + + +View previous rollout revisions and configurations. + +``` +kubectl rollout history (TYPE NAME | TYPE/NAME) [flags] +``` + +### Examples + +``` + # View the rollout history of a deployment + kubectl rollout history deployment/abc + + # View the details of daemonset revision 3 + kubectl rollout history daemonset/abc --revision=3 +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for history
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--revision int
See the details, including podTemplate of the revision specified
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout_pause.md b/content/en/docs/reference/kubectl/kubectl_rollout_pause.md new file mode 100644 index 0000000000000..c3e8b700d2e2f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout_pause.md @@ -0,0 +1,472 @@ +--- +title: kubectl rollout pause +notitle: true +--- +## kubectl rollout pause + +Mark the provided resource as paused + +### Synopsis + + +Mark the provided resource as paused + +Paused resources will not be reconciled by a controller. Use "kubectl rollout resume" to resume a paused resource. Currently only deployments support being paused. + +``` +kubectl rollout pause RESOURCE +``` + +### Examples + +``` + # Mark the nginx deployment as paused. Any current state of + # the deployment will continue its function, new updates to the deployment will not + # have an effect as long as the deployment is paused. + kubectl rollout pause deployment/nginx +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for pause
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout_resume.md b/content/en/docs/reference/kubectl/kubectl_rollout_resume.md new file mode 100644 index 0000000000000..341732e1a1a46 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout_resume.md @@ -0,0 +1,470 @@ +--- +title: kubectl rollout resume +notitle: true +--- +## kubectl rollout resume + +Resume a paused resource + +### Synopsis + + +Resume a paused resource + +Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again. Currently only deployments support being resumed. + +``` +kubectl rollout resume RESOURCE +``` + +### Examples + +``` + # Resume an already paused deployment + kubectl rollout resume deployment/nginx +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for resume
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout_status.md b/content/en/docs/reference/kubectl/kubectl_rollout_status.md new file mode 100644 index 0000000000000..21b0cdbb1fc22 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout_status.md @@ -0,0 +1,484 @@ +--- +title: kubectl rollout status +notitle: true +--- +## kubectl rollout status + +Show the status of the rollout + +### Synopsis + + +Show the status of the rollout. + +By default 'rollout status' will watch the status of the latest rollout until it's done. If you don't want to wait for the rollout to finish then you can use --watch=false. Note that if a new rollout starts in-between, then 'rollout status' will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use --revision=N where N is the revision you need to watch for. + +``` +kubectl rollout status (TYPE NAME | TYPE/NAME) [flags] +``` + +### Examples + +``` + # Watch the rollout status of a deployment + kubectl rollout status deployment/nginx +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for status
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--revision int
Pin to a specific revision for showing its status. Defaults to 0 (last revision).
-w, --watch     Default: true
Watch the status of the rollout until it's done.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource + diff --git a/content/en/docs/reference/kubectl/kubectl_rollout_undo.md b/content/en/docs/reference/kubectl/kubectl_rollout_undo.md new file mode 100644 index 0000000000000..a160383f1186c --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_rollout_undo.md @@ -0,0 +1,488 @@ +--- +title: kubectl rollout undo +notitle: true +--- +## kubectl rollout undo + +Undo a previous rollout + +### Synopsis + + +Rollback to a previous rollout. + +``` +kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags] +``` + +### Examples + +``` + # Rollback to the previous deployment + kubectl rollout undo deployment/abc + + # Rollback to daemonset revision 3 + kubectl rollout undo daemonset/abc --to-revision=3 + + # Rollback to the previous deployment with dry-run + kubectl rollout undo --dry-run=true deployment/abc +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for undo
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--to-revision int
The revision to rollback to. Default to 0 (last revision).
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl rollout](kubectl_rollout.md) - Manage the rollout of a resource + diff --git a/content/en/docs/reference/kubectl/kubectl_run.md b/content/en/docs/reference/kubectl/kubectl_run.md new file mode 100644 index 0000000000000..709dfb514b35f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_run.md @@ -0,0 +1,741 @@ +--- +title: kubectl run +notitle: true +--- +## kubectl run + +Run a particular image on the cluster + +### Synopsis + + +Create and run a particular image, possibly replicated. + +Creates a deployment or job to manage the created container(s). + +``` +kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...] +``` + +### Examples + +``` + # Start a single instance of nginx. + kubectl run nginx --image=nginx + + # Start a single instance of hazelcast and let the container expose port 5701 . + kubectl run hazelcast --image=hazelcast --port=5701 + + # Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container. + kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" + + # Start a single instance of hazelcast and set labels "app=hazelcast" and "env=prod" in the container. + kubectl run hazelcast --image=nginx --labels="app=hazelcast,env=prod" + + # Start a replicated instance of nginx. + kubectl run nginx --image=nginx --replicas=5 + + # Dry run. Print the corresponding API objects without creating them. + kubectl run nginx --image=nginx --dry-run + + # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. + kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' + + # Start a pod of busybox and keep it in the foreground, don't restart it if it exits. + kubectl run -i -t busybox --image=busybox --restart=Never + + # Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. + kubectl run nginx --image=nginx -- ... + + # Start the nginx container using a different command and custom arguments. + kubectl run nginx --image=nginx --command -- ... + + # Start the perl container to compute π to 2000 places and print it out. + kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)' + + # Start the cron job to compute π to 2000 places and print it out every 5 minutes. + kubectl run pi --schedule="0/5 * * * ?" --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)' +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--attach
If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true. With '--restart=Never' the exit code of the container process is returned.
--cascade     Default: true
If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
--command
If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.
--dry-run
If true, only print the object that would be sent, without sending it.
--env stringArray
Environment variables to set in the container
--expose
If true, a public, external service is created for the container(s) which are run
-f, --filename stringSlice
to use to replace the resource.
--force
Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
--generator string
The name of the API generator to use, see http://kubernetes.io/docs/user-guide/kubectl-conventions/#generators for a list.
--grace-period int     Default: -1
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).
-h, --help
help for run
--hostport int     Default: -1
The host port mapping for the container port. To demonstrate a single-machine container.
--image string
The image for the container to run.
--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
-l, --labels string
Comma separated labels to apply to the pod(s). Will override previous values.
--leave-stdin-open
If the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.
--limits string
The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'. Note that server side components may assign limits depending on the server configuration, such as limit ranges.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--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.
--pod-running-timeout duration     Default: 1m0s
The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running
--port string
The port that this container exposes. If --expose is true, this is also the port used by the service that is created.
--quiet
If true, suppress prompt messages.
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-r, --replicas int     Default: 1
Number of replicas to create for this container. Default is 1.
--requests string
The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.
--restart Never     Default: "Always"
The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created, if set to 'OnFailure' a job is created, if set to 'Never', a regular pod is created. For the latter two --replicas must be 1. Default 'Always', for CronJobs Never.
--rm
If true, delete resources created in this command for attached containers.
--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.
--schedule string
A schedule in the Cron format the job should be run with.
--service-generator string     Default: "service/v2"
The name of the generator to use for creating a service. Only used if --expose is true
--service-overrides string
An inline JSON override for the generated service object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. Only used if --expose is true.
--serviceaccount string
Service account to set in the pod spec
-i, --stdin
Keep stdin open on the container(s) in the pod, even if nothing is attached.
--timeout duration
The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
-t, --tty
Allocated a TTY for each container in the pod.
--wait
If true, wait for resources to be gone before returning. This waits for finalizers.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_scale.md b/content/en/docs/reference/kubectl/kubectl_scale.md new file mode 100644 index 0000000000000..1aec154c81b1b --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_scale.md @@ -0,0 +1,540 @@ +--- +title: kubectl scale +notitle: true +--- +## kubectl scale + +Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job + +### Synopsis + + +Set a new size for a Deployment, ReplicaSet, Replication Controller, or StatefulSet. + +Scale also allows users to specify one or more preconditions for the scale action. + +If --current-replicas or --resource-version is specified, it is validated before the scale is attempted, and it is guaranteed that the precondition holds true when the scale is sent to the server. + +``` +kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT (-f FILENAME | TYPE NAME) +``` + +### Examples + +``` + # Scale a replicaset named 'foo' to 3. + kubectl scale --replicas=3 rs/foo + + # Scale a resource identified by type and name specified in "foo.yaml" to 3. + kubectl scale --replicas=3 -f foo.yaml + + # If the deployment named mysql's current size is 2, scale mysql to 3. + kubectl scale --current-replicas=2 --replicas=3 deployment/mysql + + # Scale multiple replication controllers. + kubectl scale --replicas=5 rc/foo rc/bar rc/baz + + # Scale statefulset named 'web' to 3. + kubectl scale --replicas=3 statefulset/web +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources in the namespace of the specified resource types
--current-replicas int     Default: -1
Precondition for current size. Requires that the current size of the resource match this value in order to scale.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to set a new size
-h, --help
help for scale
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--replicas int
The new desired number of replicas. Required.
--resource-version string
Precondition for resource version. Requires that the current resource version match this value in order to scale.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--timeout duration
The length of time to wait before giving up on a scale operation, zero means don't wait. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_set.md b/content/en/docs/reference/kubectl/kubectl_set.md new file mode 100644 index 0000000000000..e6d99e77a9c3f --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set.md @@ -0,0 +1,455 @@ +--- +title: kubectl set +notitle: true +--- +## kubectl set + +Set specific features on objects + +### Synopsis + + +Configure application resources + +These commands help you make changes to existing application resources. + +``` +kubectl set SUBCOMMAND +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for set
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl set env](kubectl_set_env.md) - Update environment variables on a pod template +* [kubectl set image](kubectl_set_image.md) - Update image of a pod template +* [kubectl set resources](kubectl_set_resources.md) - Update resource requests/limits on objects with pod templates +* [kubectl set selector](kubectl_set_selector.md) - Set the selector on a resource +* [kubectl set serviceaccount](kubectl_set_serviceaccount.md) - Update ServiceAccount of a resource +* [kubectl set subject](kubectl_set_subject.md) - Update User, Group or ServiceAccount in a RoleBinding/ClusterRoleBinding + diff --git a/content/en/docs/reference/kubectl/kubectl_set_env.md b/content/en/docs/reference/kubectl/kubectl_set_env.md new file mode 100644 index 0000000000000..4ee09b5600208 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_env.md @@ -0,0 +1,598 @@ +--- +title: kubectl set env +notitle: true +--- +## kubectl set env + +Update environment variables on a pod template + +### Synopsis + + +Update environment variables on a pod template. + +List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable definitions on all containers in the specified pods or pod templates, or just those that match a wildcard. + +If "--env -" is passed, environment variables can be read from STDIN using the standard env syntax. + +Possible resources include (case insensitive): + + pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs) + +``` +kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N +``` + +### Examples + +``` + # Update deployment 'registry' with a new environment variable + kubectl set env deployment/registry STORAGE_DIR=/local + + # List the environment variables defined on a deployments 'sample-build' + kubectl set env deployment/sample-build --list + + # List the environment variables defined on all pods + kubectl set env pods --all --list + + # Output modified deployment in YAML, and does not alter the object on the server + kubectl set env deployment/sample-build STORAGE_DIR=/data -o yaml + + # Update all containers in all replication controllers in the project to have ENV=prod + kubectl set env rc --all ENV=prod + + # Import environment from a secret + kubectl set env --from=secret/mysecret deployment/myapp + + # Import environment from a config map with a prefix + kubectl set env --from=configmap/myconfigmap --prefix=MYSQL_ deployment/myapp + + # Import specific keys from a config map + kubectl set env --keys=my-example-key --from=configmap/myconfigmap deployment/myapp + + # Remove the environment variable ENV from container 'c1' in all deployment configs + kubectl set env deployments --all --containers="c1" ENV- + + # Remove the environment variable ENV from a deployment definition on disk and + # update the deployment config on the server + kubectl set env -f deploy.json ENV- + + # Set some of the local shell environment into a deployment config on the server + env | grep RAILS_ | kubectl set env -e - deployment/registry +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
If true, select all resources in the namespace of the specified resource types
-c, --containers string     Default: "*"
The names of containers in the selected pod templates to change - may use wildcards
--dry-run
If true, only print the object that would be sent, without sending it.
-e, --env stringArray
Specify a key-value pair for an environment variable to set into each container.
-f, --filename stringSlice
Filename, directory, or URL to files the resource to update the env
--from string
The name of a resource from which to inject environment variables
-h, --help
help for env
--keys stringSlice
Comma-separated list of keys to import from specified resource
--list
If true, display the environment and any changes in the standard format. this flag will removed when we have kubectl view env.
--local
If true, set env will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--overwrite     Default: true
If true, allow environment to be overwritten, otherwise reject updates that overwrite existing environment.
--prefix string
Prefix to append to variable names
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--resolve
If true, show secret or configmap references when listing variables
-l, --selector string
Selector (label query) to filter on
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_set_image.md b/content/en/docs/reference/kubectl/kubectl_set_image.md new file mode 100644 index 0000000000000..135196743a3c2 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_image.md @@ -0,0 +1,530 @@ +--- +title: kubectl set image +notitle: true +--- +## kubectl set image + +Update image of a pod template + +### Synopsis + + +Update existing container image(s) of resources. + +Possible resources include (case insensitive): + + pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), replicaset (rs) + +``` +kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N +``` + +### Examples + +``` + # Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'. + kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1 + + # Update all deployments' and rc's nginx container's image to 'nginx:1.9.1' + kubectl set image deployments,rc nginx=nginx:1.9.1 --all + + # Update image of all containers of daemonset abc to 'nginx:1.9.1' + kubectl set image daemonset abc *=nginx:1.9.1 + + # Print result (in yaml format) of updating nginx container image from local file, without hitting the server + kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for image
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--local
If true, set image will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_set_resources.md b/content/en/docs/reference/kubectl/kubectl_set_resources.md new file mode 100644 index 0000000000000..ba86f725db4ad --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_resources.md @@ -0,0 +1,551 @@ +--- +title: kubectl set resources +notitle: true +--- +## kubectl set resources + +Update resource requests/limits on objects with pod templates + +### Synopsis + + +Specify compute resource requirements (cpu, memory) for any resource that defines a pod template. If a pod is successfully scheduled, it is guaranteed the amount of resource requested, but may burst up to its specified limits. + +for each compute resource, if a limit is specified and a request is omitted, the request will default to the limit. + +Possible resources include (case insensitive): Use "kubectl api-resources" for a complete list of supported resources.. + +``` +kubectl set resources (-f FILENAME | TYPE NAME) ([--limits=LIMITS & --requests=REQUESTS] +``` + +### Examples + +``` + # Set a deployments nginx container cpu limits to "200m" and memory to "512Mi" + kubectl set resources deployment nginx -c=nginx --limits=cpu=200m,memory=512Mi + + # Set the resource request and limits for all containers in nginx + kubectl set resources deployment nginx --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi + + # Remove the resource requests for resources on containers in nginx + kubectl set resources deployment nginx --limits=cpu=0,memory=0 --requests=cpu=0,memory=0 + + # Print the result (in yaml format) of updating nginx container limits from a local, without hitting the server + kubectl set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --local -o yaml +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types
-c, --containers string     Default: "*"
The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for resources
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--limits string
The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.
--local
If true, set resources will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
--requests string
The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.
-l, --selector string
Selector (label query) to filter on, not including uninitialized ones,supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_set_selector.md b/content/en/docs/reference/kubectl/kubectl_set_selector.md new file mode 100644 index 0000000000000..1b2a7d402e67a --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_selector.md @@ -0,0 +1,520 @@ +--- +title: kubectl set selector +notitle: true +--- +## kubectl set selector + +Set the selector on a resource + +### Synopsis + + +Set the selector on a resource. Note that the new selector will overwrite the old selector if the resource had one prior to the invocation of 'set selector'. + +A selector must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. Note: currently selectors can only be set on Service objects. + +``` +kubectl set selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version] +``` + +### Examples + +``` + # set the labels and selector before creating a deployment/service pair. + kubectl create service clusterip my-svc --clusterip="None" -o yaml --dry-run | kubectl set selector --local -f - 'environment=qa' -o yaml | kubectl create -f - + kubectl create deployment my-dep -o yaml --dry-run | kubectl label --local -f - environment=qa -o yaml | kubectl create -f - +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources in the namespace of the specified resource types
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
identifying the resource.
-h, --help
help for selector
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--local
If true, annotation will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive     Default: true
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 selectors update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_set_serviceaccount.md b/content/en/docs/reference/kubectl/kubectl_set_serviceaccount.md new file mode 100644 index 0000000000000..4383387983cca --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_serviceaccount.md @@ -0,0 +1,517 @@ +--- +title: kubectl set serviceaccount +notitle: true +--- +## kubectl set serviceaccount + +Update ServiceAccount of a resource + +### Synopsis + + +Update ServiceAccount of pod template resources. + +Possible resources (case insensitive) can be: + +replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset + +``` +kubectl set serviceaccount (-f FILENAME | TYPE NAME) SERVICE_ACCOUNT +``` + +### Examples + +``` + # Set Deployment nginx-deployment's ServiceAccount to serviceaccount1 + kubectl set serviceaccount deployment nginx-deployment serviceaccount1 + + # Print the result (in yaml format) of updated nginx deployment with serviceaccount from local file, without hitting apiserver + kubectl set sa -f nginx-deployment.yaml serviceaccount1 --local --dry-run -o yaml +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files identifying the resource to get from a server.
-h, --help
help for serviceaccount
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--local
If true, set serviceaccount will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--record
Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_set_subject.md b/content/en/docs/reference/kubectl/kubectl_set_subject.md new file mode 100644 index 0000000000000..2f1654244c906 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_set_subject.md @@ -0,0 +1,530 @@ +--- +title: kubectl set subject +notitle: true +--- +## kubectl set subject + +Update User, Group or ServiceAccount in a RoleBinding/ClusterRoleBinding + +### Synopsis + + +Update User, Group or ServiceAccount in a RoleBinding/ClusterRoleBinding. + +``` +kubectl set subject (-f FILENAME | TYPE NAME) [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run] +``` + +### Examples + +``` + # Update a ClusterRoleBinding for serviceaccount1 + kubectl set subject clusterrolebinding admin --serviceaccount=namespace:serviceaccount1 + + # Update a RoleBinding for user1, user2, and group1 + kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1 + + # Print the result (in yaml format) of updating rolebinding subjects from a local, without hitting the server + kubectl create rolebinding admin --role=admin --user=admin -o yaml --dry-run | kubectl set subject --local -f - --user=foo -o yaml +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all resources, including uninitialized ones, in the namespace of the specified resource types
--dry-run
If true, only print the object that would be sent, without sending it.
-f, --filename stringSlice
Filename, directory, or URL to files the resource to update the subjects
--group stringArray
Groups to bind to the role
-h, --help
help for subject
--include-uninitialized
If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
--local
If true, set subject will NOT contact api-server but run locally.
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-R, --recursive
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--serviceaccount stringArray
Service accounts to bind to the role
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl set](kubectl_set.md) - Set specific features on objects + diff --git a/content/en/docs/reference/kubectl/kubectl_taint.md b/content/en/docs/reference/kubectl/kubectl_taint.md new file mode 100644 index 0000000000000..f39072efec44e --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_taint.md @@ -0,0 +1,506 @@ +--- +title: kubectl taint +notitle: true +--- +## kubectl taint + +Update the taints on one or more nodes + +### Synopsis + + +Update the taints on one or more nodes. + + * A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. + * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters. + * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app + * The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. + * The effect must be NoSchedule, PreferNoSchedule or NoExecute. + * Currently taint can only apply to node. + +``` +kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N +``` + +### Examples + +``` + # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'. + # If a taint with that key and effect already exists, its value is replaced as specified. + kubectl taint nodes foo dedicated=special-user:NoSchedule + + # Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists. + kubectl taint nodes foo dedicated:NoSchedule- + + # Remove from node 'foo' all the taints with key 'dedicated' + kubectl taint nodes foo dedicated- + + # Add a taint with key 'dedicated' on nodes having label mylabel=X + kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all
Select all nodes in the cluster
-h, --help
help for taint
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--overwrite
If true, allow taints to be overwritten, otherwise reject taint updates that overwrite existing taints.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--validate     Default: true
If true, use a schema to validate the input before sending it
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_top.md b/content/en/docs/reference/kubectl/kubectl_top.md new file mode 100644 index 0000000000000..e3f6a3c386d10 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_top.md @@ -0,0 +1,453 @@ +--- +title: kubectl top +notitle: true +--- +## kubectl top + +Display Resource (CPU/Memory/Storage) usage. + +### Synopsis + + +Display Resource (CPU/Memory/Storage) usage. + +The top command allows you to see the resource consumption for nodes or pods. + +This command requires Heapster to be correctly configured and working on the server. + +``` +kubectl top [flags] +``` + +### Options + + + + + + + + + + + + + + + + +
-h, --help
help for top
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +* [kubectl top node](kubectl_top_node.md) - Display Resource (CPU/Memory/Storage) usage of nodes +* [kubectl top pod](kubectl_top_pod.md) - Display Resource (CPU/Memory/Storage) usage of pods + diff --git a/content/en/docs/reference/kubectl/kubectl_top_node.md b/content/en/docs/reference/kubectl/kubectl_top_node.md new file mode 100644 index 0000000000000..2c77ede7d97e6 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_top_node.md @@ -0,0 +1,494 @@ +--- +title: kubectl top node +notitle: true +--- +## kubectl top node + +Display Resource (CPU/Memory/Storage) usage of nodes + +### Synopsis + + +Display Resource (CPU/Memory/Storage) usage of nodes. + +The top-node command allows you to see the resource consumption of nodes. + +``` +kubectl top node [NAME | -l label] +``` + +### Examples + +``` + # Show metrics for all nodes + kubectl top node + + # Show metrics for a given node + kubectl top node NODE_NAME +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--heapster-namespace string     Default: "kube-system"
Namespace Heapster service is located in
--heapster-port string
Port name in service to use
--heapster-scheme string     Default: "http"
Scheme (http or https) to connect to Heapster as
--heapster-service string     Default: "heapster"
Name of Heapster service
-h, --help
help for node
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl top](kubectl_top.md) - Display Resource (CPU/Memory/Storage) usage. + diff --git a/content/en/docs/reference/kubectl/kubectl_top_pod.md b/content/en/docs/reference/kubectl/kubectl_top_pod.md new file mode 100644 index 0000000000000..fb7174a004ee1 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_top_pod.md @@ -0,0 +1,516 @@ +--- +title: kubectl top pod +notitle: true +--- +## kubectl top pod + +Display Resource (CPU/Memory/Storage) usage of pods + +### Synopsis + + +Display Resource (CPU/Memory/Storage) usage of pods. + +The 'top pod' command allows you to see the resource consumption of pods. + +Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation. + +``` +kubectl top pod [NAME | -l label] +``` + +### Examples + +``` + # Show metrics for all pods in the default namespace + kubectl top pod + + # Show metrics for all pods in the given namespace + kubectl top pod --namespace=NAMESPACE + + # Show metrics for a given pod and its containers + kubectl top pod POD_NAME --containers + + # Show metrics for the pods defined by label name=myLabel + kubectl top pod -l name=myLabel +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
--containers
If present, print usage of containers within a pod.
--heapster-namespace string     Default: "kube-system"
Namespace Heapster service is located in
--heapster-port string
Port name in service to use
--heapster-scheme string     Default: "http"
Scheme (http or https) to connect to Heapster as
--heapster-service string     Default: "heapster"
Name of Heapster service
-h, --help
help for pod
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl top](kubectl_top.md) - Display Resource (CPU/Memory/Storage) usage. + diff --git a/content/en/docs/reference/kubectl/kubectl_uncordon.md b/content/en/docs/reference/kubectl/kubectl_uncordon.md new file mode 100644 index 0000000000000..fa88e4c23eea2 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_uncordon.md @@ -0,0 +1,468 @@ +--- +title: kubectl uncordon +notitle: true +--- +## kubectl uncordon + +Mark node as schedulable + +### Synopsis + + +Mark node as schedulable. + +``` +kubectl uncordon NODE +``` + +### Examples + +``` + # Mark node "foo" as schedulable. + $ kubectl uncordon foo +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--dry-run
If true, only print the object that would be sent, without sending it.
-h, --help
help for uncordon
-l, --selector string
Selector (label query) to filter on
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_version.md b/content/en/docs/reference/kubectl/kubectl_version.md new file mode 100644 index 0000000000000..efff14ae7334b --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_version.md @@ -0,0 +1,475 @@ +--- +title: kubectl version +notitle: true +--- +## kubectl version + +Print the client and server version information + +### Synopsis + + +Print the client and server version information for the current context + +``` +kubectl version [flags] +``` + +### Examples + +``` + # Print the client and server versions for the current context + kubectl version +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--client
Client version only (no server required).
-h, --help
help for version
-o, --output string
One of 'yaml' or 'json'.
--short
Print just the version number.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager + diff --git a/content/en/docs/reference/kubectl/kubectl_wait.md b/content/en/docs/reference/kubectl/kubectl_wait.md new file mode 100644 index 0000000000000..f576fe647bec1 --- /dev/null +++ b/content/en/docs/reference/kubectl/kubectl_wait.md @@ -0,0 +1,496 @@ +--- +title: kubectl wait +notitle: true +--- +## kubectl wait + +Wait for one condition on one or many resources + +### Synopsis + + +Wait for one condition on one or many resources + +``` +kubectl wait resource.group/name [--for=delete|--for condition=available] +``` + +### Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--all-namespaces
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
-f, --filename stringSlice
identifying the resource.
--for string
The condition to wait on: [delete|condition=condition-name].
-h, --help
help for wait
-o, --output string
Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
-R, --recursive     Default: true
Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--timeout duration     Default: 30s
The length of time to wait before giving up. Zero means check once and don't wait, negative means wait for a week.
+ + + +### Options inherited from parent commands + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--allow-verification-with-non-compliant-keys
Allow a SignatureVerifier to use keys which are technically non-compliant with RFC6962.
--alsologtostderr
log to standard error as well as files
--application-metrics-count-limit int     Default: 100
Max number of application metrics to store (per container)
--as string
Username to impersonate for the operation
--as-group stringArray
Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--azure-container-registry-config string
Path to the file containing Azure container registry configuration information.
--boot-id-file string     Default: "/proc/sys/kernel/random/boot_id"
Comma-separated list of files to check for boot-id. Use the first one that exists.
--cache-dir string     Default: "/home/tengqm/.kube/http-cache"
Default HTTP 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-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 LB traffic proxy & health checks
--cluster string
The name of the kubeconfig cluster to use
--container-hints string     Default: "/etc/cadvisor/container_hints.json"
location of the container hints file
--containerd string     Default: "unix:///var/run/containerd.sock"
containerd endpoint
--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.
--docker string     Default: "unix:///var/run/docker.sock"
docker endpoint
--docker-env-metadata-whitelist string
a comma-separated list of environment variable keys that needs to be collected for docker containers
--docker-only
Only report docker containers in addition to root stats
--docker-root string     Default: "/var/lib/docker"
DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)
--docker-tls
use TLS to connect to docker
--docker-tls-ca string     Default: "ca.pem"
path to trusted CA
--docker-tls-cert string     Default: "cert.pem"
path to client certificate
--docker-tls-key string     Default: "key.pem"
path to private key
--enable-load-reader
Whether to enable cpu load reader
--event-storage-age-limit string     Default: "default=0"
Max length of time for which to store events (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is a duration. Default is applied to all non-specified event types
--event-storage-event-limit string     Default: "default=0"
Max number of events to store (per type). Value is a comma separated list of key values, where the keys are event types (e.g.: creation, oom) or "default" and the value is an integer. Default is applied to all non-specified event types
--global-housekeeping-interval duration     Default: 1m0s
Interval between global housekeepings
--housekeeping-interval duration     Default: 10s
Interval between container housekeepings
--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.
--log-backtrace-at traceLocation     Default: :0
when logging hits line file:N, emit a stack trace
--log-cadvisor-usage
Whether to log the usage of the cAdvisor container
--log-dir string
If non-empty, write log files in this directory
--log-flush-frequency duration     Default: 5s
Maximum number of seconds between log flushes
--logtostderr     Default: true
log to standard error instead of files
--machine-id-file string     Default: "/etc/machine-id,/var/lib/dbus/machine-id"
Comma-separated list of files to check for machine-id. Use the first one that exists.
--match-server-version
Require server version to match client version
-n, --namespace string
If present, the namespace scope for this CLI request
--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
--stderrthreshold severity     Default: 2
logs at or above this threshold go to stderr
--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
--token string
Bearer token for authentication to the API server
--user string
The name of the kubeconfig user to use
-v, --v Level
log level for V logs
--version version[=true]
Print version information and quit
--vmodule moduleSpec
comma-separated list of pattern=N settings for file-filtered logging
+ + + +### SEE ALSO +* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager +