Update CLI help text for grammar and consistency
Kubernetes-commit: a86380c7813a6d0cfa248c9165c878038730526a
This commit is contained in:
parent
dfcbd3349e
commit
b676723184
|
@ -160,7 +160,7 @@ var (
|
|||
# Apply the JSON passed into stdin to a pod
|
||||
cat pod.json | kubectl apply -f -
|
||||
|
||||
# Apply the configuration from all files that end with '.json' - i.e. expand wildcard characters in file names
|
||||
# Apply the configuration from all files that end with '.json'
|
||||
kubectl apply -f '*.json'
|
||||
|
||||
# Note: --prune is still in Alpha
|
||||
|
|
|
@ -29,7 +29,7 @@ func NewCmdAuth(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Co
|
|||
cmds := &cobra.Command{
|
||||
Use: "auth",
|
||||
Short: "Inspect authorization",
|
||||
Long: `Inspect authorization`,
|
||||
Long: `Inspect authorization.`,
|
||||
Run: cmdutil.DefaultSubCommandRun(streams.ErrOut),
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ func NewCmdCertificate(restClientGetter genericclioptions.RESTClientGetter, ioSt
|
|||
cmd := &cobra.Command{
|
||||
Use: "certificate SUBCOMMAND",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Modify certificate resources."),
|
||||
Short: i18n.T("Modify certificate resources"),
|
||||
Long: i18n.T("Modify certificate resources."),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
cmd.Help()
|
||||
|
@ -132,7 +132,7 @@ func NewCmdCertificateApprove(restClientGetter genericclioptions.RESTClientGette
|
|||
|
||||
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.
|
||||
issue a certificate to the requester with the attributes requested in the CSR.
|
||||
|
||||
SECURITY NOTICE: Depending on the requested attributes, the issued certificate
|
||||
can potentially grant a requester access to cluster resources or to authenticate
|
||||
|
@ -180,7 +180,7 @@ func NewCmdCertificateDeny(restClientGetter genericclioptions.RESTClientGetter,
|
|||
|
||||
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.
|
||||
not to issue a certificate to the requester.
|
||||
`)),
|
||||
Example: templates.Examples(i18n.T(`
|
||||
# Deny CSR 'csr-sqgzp'
|
||||
|
|
|
@ -82,7 +82,7 @@ var (
|
|||
## Write bash completion code to a file and source it from .bash_profile
|
||||
kubectl completion bash > ~/.kube/completion.bash.inc
|
||||
printf "
|
||||
# Kubectl shell completion
|
||||
# kubectl shell completion
|
||||
source '$HOME/.kube/completion.bash.inc'
|
||||
" >> $HOME/.bash_profile
|
||||
source $HOME/.bash_profile
|
||||
|
@ -95,7 +95,7 @@ var (
|
|||
|
||||
# Load the kubectl completion code for fish[2] into the current shell
|
||||
kubectl completion fish | source
|
||||
# To load completions for each session, execute once:
|
||||
# To load completions for each session, execute once:
|
||||
kubectl completion fish > ~/.config/fish/completions/kubectl.fish
|
||||
|
||||
# Load the kubectl completion code for powershell into the current shell
|
||||
|
|
|
@ -41,7 +41,7 @@ func NewCmdConfig(pathOptions *clientcmd.PathOptions, streams genericiooptions.I
|
|||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Modify kubeconfig files"),
|
||||
Long: templates.LongDesc(i18n.T(`
|
||||
Modify kubeconfig files using subcommands like "kubectl config set current-context my-context"
|
||||
Modify kubeconfig files using subcommands like "kubectl config set current-context my-context".
|
||||
|
||||
The loading order follows these rules:
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ var (
|
|||
# Disable cert checking for the e2e cluster entry
|
||||
kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
|
||||
# Set custom TLS server name to use for validation for the e2e cluster entry
|
||||
# Set the custom TLS server name to use for validation for the e2e cluster entry
|
||||
kubectl config set-cluster e2e --tls-server-name=my-cluster-name
|
||||
|
||||
# Set proxy url for the e2e cluster entry
|
||||
# Set the proxy URL for the e2e cluster entry
|
||||
kubectl config set-cluster e2e --proxy-url=https://1.2.3.4`)
|
||||
)
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ var (
|
|||
# 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
|
||||
# Enable the OpenID Connect auth provider for the "cluster-admin" entry with additional arguments
|
||||
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
|
||||
|
@ -105,7 +105,7 @@ var (
|
|||
# Enable new exec auth plugin for the "cluster-admin" entry
|
||||
kubectl config set-credentials cluster-admin --exec-command=/path/to/the/executable --exec-api-version=client.authentication.k8s.io/v1beta1
|
||||
|
||||
# Define new exec auth plugin args for the "cluster-admin" entry
|
||||
# Define new exec auth plugin arguments for the "cluster-admin" entry
|
||||
kubectl config set-credentials cluster-admin --exec-arg=arg1 --exec-arg=arg2
|
||||
|
||||
# Create or update exec auth plugin environment variables for the "cluster-admin" entry
|
||||
|
|
|
@ -61,7 +61,7 @@ var (
|
|||
# Show merged kubeconfig settings
|
||||
kubectl config view
|
||||
|
||||
# Show merged kubeconfig settings and raw certificate data and exposed secrets
|
||||
# Show merged kubeconfig settings, raw certificate data, and exposed secrets
|
||||
kubectl config view --raw
|
||||
|
||||
# Get the password for the e2e user
|
||||
|
|
|
@ -63,7 +63,7 @@ var (
|
|||
|
||||
ingressExample = templates.Examples(i18n.T(`
|
||||
# Create a single ingress called 'simple' that directs requests to foo.com/bar to svc
|
||||
# svc1:8080 with a tls secret "my-cert"
|
||||
# svc1:8080 with a TLS secret "my-cert"
|
||||
kubectl create ingress simple --rule="foo.com/bar=svc1:8080,tls=my-cert"
|
||||
|
||||
# Create a catch all ingress of "/path" pointing to service svc:port and Ingress Class as "otheringress"
|
||||
|
|
|
@ -54,7 +54,7 @@ var (
|
|||
by creating a dockercfg secret and attaching it to your service account.`))
|
||||
|
||||
secretForDockerRegistryExample = templates.Examples(i18n.T(`
|
||||
# If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using:
|
||||
# If you do not already have a .dockercfg file, create a dockercfg secret directly
|
||||
kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
|
||||
|
||||
# Create a new secret named my-secret from ~/.docker/config.json
|
||||
|
|
|
@ -89,7 +89,7 @@ var (
|
|||
# Request a token bound to an instance of a Secret object
|
||||
kubectl create token myapp --bound-object-kind Secret --bound-object-name mysecret
|
||||
|
||||
# Request a token bound to an instance of a Secret object with a specific uid
|
||||
# Request a token bound to an instance of a Secret object with a specific UID
|
||||
kubectl create token myapp --bound-object-kind Secret --bound-object-name mysecret --bound-object-uid 0d4691ed-659b-4935-a832-355f77ee47cc
|
||||
`)
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ var (
|
|||
# Delete resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml
|
||||
kubectl delete -k dir
|
||||
|
||||
# Delete resources from all files that end with '.json' - i.e. expand wildcard characters in file names
|
||||
# Delete resources from all files that end with '.json'
|
||||
kubectl delete -f '*.json'
|
||||
|
||||
# Delete a pod based on the type and name in the JSON passed into stdin
|
||||
|
|
|
@ -62,9 +62,9 @@ var (
|
|||
kubectl describe pods
|
||||
|
||||
# Describe pods by label name=myLabel
|
||||
kubectl describe po -l name=myLabel
|
||||
kubectl describe pods -l name=myLabel
|
||||
|
||||
# Describe all pods managed by the 'frontend' replication controller
|
||||
# Describe all pods managed by the 'frontend' replication controller
|
||||
# (rc-created pods get the name of the rc as a prefix in the pod name)
|
||||
kubectl describe pods frontend`))
|
||||
)
|
||||
|
|
|
@ -138,10 +138,10 @@ var (
|
|||
`))
|
||||
|
||||
drainExample = templates.Examples(i18n.T(`
|
||||
# Drain node "foo", even if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set on it
|
||||
# Drain node "foo", even if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set on it
|
||||
kubectl drain foo --force
|
||||
|
||||
# As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set, and use a grace period of 15 minutes
|
||||
# As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set, or stateful set, and use a grace period of 15 minutes
|
||||
kubectl drain foo --grace-period=900`))
|
||||
)
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ var (
|
|||
# Edit the deployment 'mydeployment' in YAML and save the modified config in its annotation
|
||||
kubectl edit deployment/mydeployment -o yaml --save-config
|
||||
|
||||
# Edit the deployment/mydeployment's status subresource
|
||||
# Edit the 'status' subresource for the 'mydeployment' deployment
|
||||
kubectl edit deployment mydeployment --subresource='status'`))
|
||||
)
|
||||
|
||||
|
|
|
@ -49,26 +49,26 @@ import (
|
|||
|
||||
var (
|
||||
eventsLong = templates.LongDesc(i18n.T(`
|
||||
Display events
|
||||
Display events.
|
||||
|
||||
Prints a table of the most important information about events.
|
||||
You can request events for a namespace, for all namespace, or
|
||||
filtered to only those pertaining to a specified resource.`))
|
||||
|
||||
eventsExample = templates.Examples(i18n.T(`
|
||||
# List recent events in the default namespace.
|
||||
# List recent events in the default namespace
|
||||
kubectl events
|
||||
|
||||
# List recent events in all namespaces.
|
||||
# List recent events in all namespaces
|
||||
kubectl events --all-namespaces
|
||||
|
||||
# List recent events for the specified pod, then wait for more events and list them as they arrive.
|
||||
# List recent events for the specified pod, then wait for more events and list them as they arrive
|
||||
kubectl events --for pod/web-pod-13je7 --watch
|
||||
|
||||
# List recent events in given format. Supported ones, apart from default, are json and yaml.
|
||||
# List recent events in YAML format
|
||||
kubectl events -oyaml
|
||||
|
||||
# List recent only events in given event types
|
||||
# List recent only events of type 'Warning' or 'Normal'
|
||||
kubectl events --types=Warning,Normal`))
|
||||
)
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ var (
|
|||
# List one or more resources by their type and names
|
||||
kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
|
||||
# List status subresource for a single pod.
|
||||
# List the 'status' subresource for a single pod
|
||||
kubectl get pod web-pod-13je7 --subresource status`))
|
||||
)
|
||||
|
||||
|
|
|
@ -101,8 +101,8 @@ var (
|
|||
|
||||
# Update a container's image using a JSON patch with positional arrays
|
||||
kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'
|
||||
|
||||
# Update a deployment's replicas through the scale subresource using a merge patch.
|
||||
|
||||
# Update a deployment's replicas through the 'scale' subresource using a merge patch
|
||||
kubectl patch deployment nginx-deployment --subresource='scale' --type='merge' -p '{"spec":{"replicas":2}}'`))
|
||||
)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ var (
|
|||
# Restart a deployment
|
||||
kubectl rollout restart deployment/abc
|
||||
|
||||
# Restart deployments with the app=nginx label
|
||||
# Restart deployments with the 'app=nginx' label
|
||||
kubectl rollout restart deployment --selector=app=nginx`)
|
||||
|
||||
rolloutValidResources = dedent.Dedent(`
|
||||
|
|
|
@ -58,7 +58,7 @@ var (
|
|||
kubectl scale --current-replicas=2 --replicas=3 deployment/mysql
|
||||
|
||||
# Scale multiple replication controllers
|
||||
kubectl scale --replicas=5 rc/foo rc/bar rc/baz
|
||||
kubectl scale --replicas=5 rc/example1 rc/example2 rc/example3
|
||||
|
||||
# Scale stateful set named 'web' to 3
|
||||
kubectl scale --replicas=3 statefulset/web`))
|
||||
|
|
|
@ -89,7 +89,7 @@ var (
|
|||
# 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
|
||||
# Add a taint with key 'dedicated' on nodes having label myLabel=X
|
||||
kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule
|
||||
|
||||
# Add to node 'foo' a taint with key 'bar' and no value
|
||||
|
|
|
@ -37,7 +37,7 @@ var (
|
|||
"v1beta1",
|
||||
}
|
||||
topLong = templates.LongDesc(i18n.T(`
|
||||
Display Resource (CPU/Memory) usage.
|
||||
Display resource (CPU/memory) usage.
|
||||
|
||||
The top command allows you to see the resource consumption for nodes or pods.
|
||||
|
||||
|
|
|
@ -68,10 +68,10 @@ var (
|
|||
# Wait for the pod "busybox1" to contain the status condition of type "Ready"
|
||||
kubectl wait --for=condition=Ready pod/busybox1
|
||||
|
||||
# The default value of status condition is true; you can wait for other targets after an equal delimiter (compared after Unicode simple case folding, which is a more general form of case-insensitivity):
|
||||
# The default value of status condition is true; you can wait for other targets after an equal delimiter (compared after Unicode simple case folding, which is a more general form of case-insensitivity)
|
||||
kubectl wait --for=condition=Ready=false pod/busybox1
|
||||
|
||||
# Wait for the pod "busybox1" to contain the status phase to be "Running".
|
||||
# Wait for the pod "busybox1" to contain the status phase to be "Running"
|
||||
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/busybox1
|
||||
|
||||
# Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command
|
||||
|
|
Loading…
Reference in New Issue