horizontalpodautoscalers (hpa), resourcequotas (quota) or secrets.
options:
- name: all
default_value: "false"
usage: |
select all resources in the namespace of the specified resource types
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to a file identifying the resource to update the annotation
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: overwrite
default_value: "false"
usage: |
If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: resource-version
usage: |
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.
- name: selector
shorthand: l
usage: Selector (label query) to filter on
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: template
usage: |
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].
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# 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
Auto-scale a Deployment, ReplicaSet, or ReplicationController
description:|-
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.
options:
- name: cpu-percent
default_value: "-1"
usage: |
The target average CPU utilization (represented as a percent of requested CPU) over all the pods. If it's not specified or negative, the server will apply a default value.
- name: dry-run
default_value: "false"
usage: |
If true, only print the object that would be sent, without creating it.
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to a file identifying the resource to autoscale.
- name: generator
default_value: horizontalpodautoscaler/v1beta1
usage: |
The name of the API generator to use. Currently there is only 1 generator.
- name: max
default_value: "-1"
usage: |
The upper limit for the number of pods that can be set by the autoscaler. Required.
- name: min
default_value: "-1"
usage: |
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: name
usage: |
The name for the newly created object. If not specified, the name of the input resource will be used.
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: save-config
default_value: "false"
usage: |
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: template
usage: |
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].
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization at a default value that server applies:
kubectl autoscale deployment foo --min=2 --max=10
# Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%:
config modifies 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 together. 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.
options:
-name:kubeconfig
usage:use a particular kubeconfig file
inherited_options:
-name:alsologtostderr
default_value:"false"
usage:log to standard error as well as files
-name:api-version
usage:|
DEPRECATED: The API version to use when talking to the server
-name:certificate-authority
usage:Path to a cert. file for the certificate authority.
-name:client-certificate
usage:Path to a client certificate file for TLS.
-name:client-key
usage:Path to a client key file for TLS.
-name:cluster
usage:The name of the kubeconfig cluster to use
-name:context
usage:The name of the kubeconfig context to use
-name:insecure-skip-tls-verify
default_value:"false"
usage:|
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
-name:log-backtrace-at
default_value::0
usage:when logging hits line file:N, emit a stack trace
-name:log-dir
usage:If non-empty, write log files in this directory
-name:log-flush-frequency
default_value:5s
usage:Maximum number of seconds between log flushes
-name:logtostderr
default_value:"true"
usage:log to standard error instead of files
-name:match-server-version
default_value:"false"
usage:Require server version to match client version
-name:namespace
usage:If present, the namespace scope for this CLI request.
-name:password
usage:Password for basic authentication to the API server.
-name:server
shorthand:s
usage:The address and port of the Kubernetes API server
-name:stderrthreshold
default_value:"2"
usage:logs at or above this threshold go to stderr
-name:token
usage:Bearer token for authentication to the API server.
-name:user
usage:The name of the kubeconfig user to use
-name:username
usage:Username for basic authentication to the API server.
-name:v
default_value:"0"
usage:log level for V logs
-name:vmodule
usage:|
comma-separated list of pattern=N settings for file-filtered logging
synopsis:Convert config files between different API versions
description:|
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.
options:
-name:filename
shorthand:f
default_value:'[]'
usage:|
Filename, directory, or URL to file to need to get converted.
-name:local
default_value:"true"
usage:|
If true, convert will NOT try to contact api-server but run locally.
-name:no-headers
default_value:"false"
usage:When using the default output, don't print headers.
-name:output
shorthand:o
usage:|
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
-name:output-version
usage:|
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
-name:schema-cache-dir
default_value:~/.kube/schema
usage:|
If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
-name:show-all
shorthand:a
default_value:"false"
usage:|
When printing, show all resources (default hide terminated pods.)
-name:show-labels
default_value:"false"
usage:|
When printing, show all labels as the last column (default hide labels column)
-name:sort-by
usage:|
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.
-name:template
usage:|
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].
-name:validate
default_value:"true"
usage:|
If true, use a schema to validate the input before sending it
inherited_options:
-name:alsologtostderr
default_value:"false"
usage:log to standard error as well as files
-name:api-version
usage:|
DEPRECATED: The API version to use when talking to the server
-name:certificate-authority
usage:Path to a cert. file for the certificate authority.
-name:client-certificate
usage:Path to a client certificate file for TLS.
-name:client-key
usage:Path to a client key file for TLS.
-name:cluster
usage:The name of the kubeconfig cluster to use
-name:context
usage:The name of the kubeconfig context to use
-name:insecure-skip-tls-verify
default_value:"false"
usage:|
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
-name:kubeconfig
usage:Path to the kubeconfig file to use for CLI requests.
-name:log-backtrace-at
default_value::0
usage:when logging hits line file:N, emit a stack trace
-name:log-dir
usage:If non-empty, write log files in this directory
-name:log-flush-frequency
default_value:5s
usage:Maximum number of seconds between log flushes
-name:logtostderr
default_value:"true"
usage:log to standard error instead of files
-name:match-server-version
default_value:"false"
usage:Require server version to match client version
-name:namespace
usage:If present, the namespace scope for this CLI request.
-name:password
usage:Password for basic authentication to the API server.
-name:server
shorthand:s
usage:The address and port of the Kubernetes API server
-name:stderrthreshold
default_value:"2"
usage:logs at or above this threshold go to stderr
-name:token
usage:Bearer token for authentication to the API server.
-name:user
usage:The name of the kubeconfig user to use
-name:username
usage:Username for basic authentication to the API server.
-name:v
default_value:"0"
usage:log level for V logs
-name:vmodule
usage:|
comma-separated list of pattern=N settings for file-filtered logging
example:|
# 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.
Filename, directory, or URL to file to use to create the resource
- name: output
shorthand: o
usage: |
Output mode. Use "-o name" for shorter output (resource/name).
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: save-config
default_value: "false"
usage: |
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
- name: schema-cache-dir
default_value: ~/.kube/schema
usage: |
If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
- name: validate
default_value: "true"
usage: |
If true, use a schema to validate the input before sending it
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# Create a pod using the data in pod.json.
kubectl create -f ./pod.json
# Create a pod based on the JSON passed into stdin.
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.
The files to edit will be output in the default API version, or a version specified
by --output-version. The default format is YAML - if you would like to edit in JSON
pass -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.
options:
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to file to use to edit the resource
- name: output
shorthand: o
default_value: yaml
usage: 'Output format. One of: yaml|json.'
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: save-config
default_value: "false"
usage: |
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
- name: windows-line-endings
default_value: "false"
usage: Use Windows line-endings (default Unix line-endings)
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
If true, create an external load balancer for this service (trumped by --type). Implementation is cloud provider dependent. Default is 'false'.
-name:dry-run
default_value:"false"
usage:|
If true, only print the object that would be sent, without creating it.
-name:external-ip
usage:|
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.
-name:filename
shorthand:f
default_value:'[]'
usage:|
Filename, directory, or URL to a file identifying the resource to expose a service
-name:generator
default_value:service/v2
usage:|
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'.
-name:labels
shorthand:l
usage:Labels to apply to the service created by this call.
-name:load-balancer-ip
usage:|
IP to assign to to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).
-name:name
usage:The name for the newly created object.
-name:no-headers
default_value:"false"
usage:When using the default output, don't print headers.
-name:output
shorthand:o
usage:|
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
-name:output-version
usage:|
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
-name:overrides
usage:|
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.
-name:port
usage:|
The port that the service should serve on. Copied from the resource being exposed, if unspecified
-name:protocol
default_value:TCP
usage:|
The network protocol for the service to be created. Default is 'tcp'.
-name:record
default_value:"false"
usage:Record current kubectl command in the resource annotation.
-name:save-config
default_value:"false"
usage:|
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
-name:selector
usage:|
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.
-name:session-affinity
usage:|
If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'
-name:show-all
shorthand:a
default_value:"false"
usage:|
When printing, show all resources (default hide terminated pods.)
-name:show-labels
default_value:"false"
usage:|
When printing, show all labels as the last column (default hide labels column)
-name:sort-by
usage:|
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.
-name:target-port
usage:|
Name or number for the port on the container that the service should direct traffic to. Optional.
-name:template
usage:|
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].
-name:type
usage:|
Type for this service: ClusterIP, NodePort, or LoadBalancer. Default is 'ClusterIP'.
inherited_options:
-name:alsologtostderr
default_value:"false"
usage:log to standard error as well as files
-name:api-version
usage:|
DEPRECATED: The API version to use when talking to the server
-name:certificate-authority
usage:Path to a cert. file for the certificate authority.
-name:client-certificate
usage:Path to a client certificate file for TLS.
-name:client-key
usage:Path to a client key file for TLS.
-name:cluster
usage:The name of the kubeconfig cluster to use
-name:context
usage:The name of the kubeconfig context to use
-name:insecure-skip-tls-verify
default_value:"false"
usage:|
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
-name:kubeconfig
usage:Path to the kubeconfig file to use for CLI requests.
-name:log-backtrace-at
default_value::0
usage:when logging hits line file:N, emit a stack trace
-name:log-dir
usage:If non-empty, write log files in this directory
-name:log-flush-frequency
default_value:5s
usage:Maximum number of seconds between log flushes
-name:logtostderr
default_value:"true"
usage:log to standard error instead of files
-name:match-server-version
default_value:"false"
usage:Require server version to match client version
-name:namespace
usage:If present, the namespace scope for this CLI request.
-name:password
usage:Password for basic authentication to the API server.
-name:server
shorthand:s
usage:The address and port of the Kubernetes API server
-name:stderrthreshold
default_value:"2"
usage:logs at or above this threshold go to stderr
-name:token
usage:Bearer token for authentication to the API server.
-name:user
usage:The name of the kubeconfig user to use
-name:username
usage:Username for basic authentication to the API server.
-name:v
default_value:"0"
usage:log level for V logs
-name:vmodule
usage:|
comma-separated list of pattern=N settings for file-filtered logging
example:|-
# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on 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.
componentstatuses (cs), endpoints (ep), and secrets.
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 resource(s).
options:
- name: all-namespaces
default_value: "false"
usage: |
If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
- name: export
default_value: "false"
usage: |
If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to a file identifying the resource to get from a server.
- name: label-columns
shorthand: L
default_value: '[]'
usage: |
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 statements like -L label1 -L label2...
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: selector
shorthand: l
usage: Selector (label query) to filter on
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: template
usage: |
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].
- name: watch
shorthand: w
default_value: "false"
usage: |
After listing/getting the requested object, watch for changes.
- name: watch-only
default_value: "false"
usage: |
Watch for changes to the requested object(s), without listing/getting first.
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# 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 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
A label must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters.
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.
options:
- name: all
default_value: "false"
usage: |
select all resources in the namespace of the specified resource types
- name: dry-run
default_value: "false"
usage: |
If true, only print the object that would be sent, without sending it.
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to a file identifying the resource to update the labels
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: overwrite
default_value: "false"
usage: |
If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: resource-version
usage: |
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.
- name: selector
shorthand: l
usage: Selector (label query) to filter on
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: template
usage: |
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].
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# 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.
synopsis:Update field(s) of a resource using strategic merge patch.
description:|-
Update field(s) of a resource using strategic merge 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.
options:
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to a file identifying the resource to update
- name: output
shorthand: o
usage: |
Output mode. Use "-o name" for shorter output (resource/name).
- name: patch
shorthand: p
usage: The patch to be applied to the resource JSON file.
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: type
default_value: strategic
usage: |
The type of patch being provided; one of [json merge strategic]
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |2-
# Partially update a node using strategic merge patch
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.
options:
- name: cascade
default_value: "false"
usage: |
Only relevant during a force replace. If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController).
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename, directory, or URL to file to use to replace the resource.
- name: force
default_value: "false"
usage: Delete and re-create the specified resource
- name: grace-period
default_value: "-1"
usage: |
Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
- name: output
shorthand: o
usage: |
Output mode. Use "-o name" for shorter output (resource/name).
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: save-config
default_value: "false"
usage: |
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
- name: schema-cache-dir
default_value: ~/.kube/schema
usage: |
If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
- name: timeout
default_value: "0"
usage: |
Only relevant during a force replace. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object
- name: validate
default_value: "true"
usage: |
If true, use a schema to validate the input before sending it
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |-
# 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
synopsis:Perform a rolling update of the given ReplicationController.
description:|-
Perform a rolling update of the given ReplicationController.
Replaces the specified replication controller with a new replication controller by updating one pod at a time to use the
new PodTemplate. The new-controller.json must specify the same namespace as the
existing replication controller and overwrite at least one (common) label in its replicaSelector.
options:
- name: container
usage: |
Container name which will have its image upgraded. Only relevant when --image is specified, ignored otherwise. Required when using --image on a multi-container pod
- name: deployment-label-key
default_value: deployment
usage: |
The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when --image is specified, ignored otherwise
- name: dry-run
default_value: "false"
usage: |
If true, print out the changes that would be made, but don't actually make them.
- name: filename
shorthand: f
default_value: '[]'
usage: |
Filename or URL to file to use to create the new replication controller.
- name: image
usage: |
Image to use for upgrading the replication controller. Must be distinct from the existing image (either new image or new image tag). Can not be used with --filename/-f
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: poll-interval
default_value: 3s
usage: "Time delay between polling for replication controller status after the update.
Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n"
- name: rollback
default_value: "false"
usage: |
If true, this is a request to abort an existing rollout that is partially rolled out. It effectively reverses current and next and runs a rollout
- name: schema-cache-dir
default_value: ~/.kube/schema
usage: |
If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: template
usage: |
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].
- name: timeout
default_value: 5m0s
usage: "Max time to wait for a replication controller to update before giving up.
Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n"
- name: update-period
default_value: 1m0s
usage: "Time to wait between updating pods. Valid time units are \"ns\", \"us\"
(or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\n"
- name: validate
default_value: "true"
usage: |
If true, use a schema to validate the input before sending it
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: |
# Update pods of frontend-v1 using new replication controller data in frontend-v2.json.
Create and run a particular image, possibly replicated.
Creates a deployment or job to manage the created container(s).
options:
- name: attach
default_value: "false"
usage: |
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/--interactive' is set, in which case the default is true.
- name: command
default_value: "false"
usage: |
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.
- name: dry-run
default_value: "false"
usage: |
If true, only print the object that would be sent, without sending it.
- name: env
default_value: '[]'
usage: Environment variables to set in the container
- name: expose
default_value: "false"
usage: |
If true, a public, external service is created for the container(s) which are run
- name: generator
usage: |
The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, otherwise the default is 'job/v1'. This will happen only for cluster version at least 1.2, for olders we will fallback to 'run/v1' for --restart=Always, 'run-pod/v1' for others.
- name: hostport
default_value: "-1"
usage: |
The host port mapping for the container port. To demonstrate a single-machine container.
- name: image
usage: The image for the container to run.
- name: labels
shorthand: l
usage: Labels to apply to the pod(s).
- name: leave-stdin-open
default_value: "false"
usage: |
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.
- name: limits
usage: |
The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'
- name: no-headers
default_value: "false"
usage: When using the default output, don't print headers.
- name: output
shorthand: o
usage: |
Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
- name: output-version
usage: |
Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
- name: overrides
usage: |
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.
- name: port
default_value: "-1"
usage: |
The port that this container exposes. If --expose is true, this is also the port used by the service that is created.
- name: record
default_value: "false"
usage: Record current kubectl command in the resource annotation.
- name: replicas
shorthand: r
default_value: "1"
usage: |
Number of replicas to create for this container. Default is 1.
- name: requests
usage: |
The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'
- name: restart
default_value: Always
usage: |
The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created for this pod, if set to OnFailure or Never, a job is created for this pod and --replicas must be 1. Default 'Always'
- name: rm
default_value: "false"
usage: |
If true, delete resources created in this command for attached containers.
- name: save-config
default_value: "false"
usage: |
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
- name: service-generator
default_value: service/v2
usage: |
The name of the generator to use for creating a service. Only used if --expose is true
- name: service-overrides
usage: |
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.
- name: show-all
shorthand: a
default_value: "false"
usage: |
When printing, show all resources (default hide terminated pods.)
- name: show-labels
default_value: "false"
usage: |
When printing, show all labels as the last column (default hide labels column)
- name: sort-by
usage: |
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.
- name: stdin
shorthand: i
default_value: "false"
usage: |
Keep stdin open on the container(s) in the pod, even if nothing is attached.
- name: template
usage: |
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].
- name: tty
default_value: "false"
usage: |
Allocated a TTY for each container in the pod. Because -t is currently shorthand for --template, -t is not supported for --tty. This shorthand is deprecated and we expect to adopt -t for --tty soon.
inherited_options:
- name: alsologtostderr
default_value: "false"
usage: log to standard error as well as files
- name: api-version
usage: |
DEPRECATED: The API version to use when talking to the server
- name: certificate-authority
usage: Path to a cert. file for the certificate authority.
- name: client-certificate
usage: Path to a client certificate file for TLS.
- name: client-key
usage: Path to a client key file for TLS.
- name: cluster
usage: The name of the kubeconfig cluster to use
- name: context
usage: The name of the kubeconfig context to use
- name: insecure-skip-tls-verify
default_value: "false"
usage: |
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
- name: kubeconfig
usage: Path to the kubeconfig file to use for CLI requests.
- name: log-backtrace-at
default_value: :0
usage: when logging hits line file:N, emit a stack trace
- name: log-dir
usage: If non-empty, write log files in this directory
- name: log-flush-frequency
default_value: 5s
usage: Maximum number of seconds between log flushes
- name: logtostderr
default_value: "true"
usage: log to standard error instead of files
- name: match-server-version
default_value: "false"
usage: Require server version to match client version
- name: namespace
usage: If present, the namespace scope for this CLI request.
- name: password
usage: Password for basic authentication to the API server.
- name: server
shorthand: s
usage: The address and port of the Kubernetes API server
- name: stderrthreshold
default_value: "2"
usage: logs at or above this threshold go to stderr
- name: token
usage: Bearer token for authentication to the API server.
- name: user
usage: The name of the kubeconfig user to use
- name: username
usage: Username for basic authentication to the API server.
- name: v
default_value: "0"
usage: log level for V logs
- name: vmodule
usage: |
comma-separated list of pattern=N settings for file-filtered logging
example: "# Start a single instance of nginx.\nkubectl run nginx --image=nginx\n\n#
Start a single instance of hazelcast and let the container expose port 5701 .\nkubectl
run hazelcast --image=hazelcast --port=5701\n\n# Start a single instance of hazelcast
and set environment variables \"DNS_DOMAIN=cluster\" and \"POD_NAMESPACE=default\"
in the container.\nkubectl run hazelcast --image=hazelcast --env=\"DNS_DOMAIN=cluster\"
--env=\"POD_NAMESPACE=default\"\n\n# Start a replicated instance of nginx.\nkubectl
run nginx --image=nginx --replicas=5\n\n# Dry run. Print the corresponding API objects
without creating them.\nkubectl run nginx --image=nginx --dry-run\n\n# Start a single
instance of nginx, but overload the spec of the deployment with a partial set of
values parsed from JSON.\nkubectl run nginx --image=nginx --overrides='{ \"apiVersion\":
\"v1\", \"spec\": { ... } }'\n\n# Start a single instance of busybox and keep it
in the foreground, don't restart it if it exits.\nkubectl run -i --tty busybox --image=busybox
--restart=Never\n\n# Start the nginx container using the default command, but use
custom arguments (arg1 .. argN) for that command.\nkubectl run nginx --image=nginx
-- <arg1> <arg2> ... <argN>\n\n# Start the nginx container using a different command
and custom arguments.\nkubectl run nginx --image=nginx --command -- <cmd> <arg1>
... <argN>\n\n# Start the perl container to compute π to 2000 places and print it
out.\nkubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle