mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Fix md generation for kubectl docs
Display usage string, not long help, as code, remove angle brackets from output (.md interprets as tags and hides).
This commit is contained in:
@@ -13,11 +13,8 @@ kubectl config set\-cluster \- Sets a cluster entry in .kubeconfig
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Sets a cluster entry in .kubeconfig
|
||||
Specifying a name that already exists will merge new fields on top of existing values for those fields.
|
||||
e.g.
|
||||
kubectl config set\-cluster e2e \-\-certificate\-authority=\~/.kube/e2e/.kubernetes.ca.cert
|
||||
only sets the certificate\-authority field on the e2e cluster entry without touching other values.
|
||||
Sets a cluster entry in .kubeconfig.
|
||||
Specifying a name that already exists will merge new fields on top of existing values for those fields.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
@@ -144,6 +141,24 @@ Sets a cluster entry in .kubeconfig
|
||||
comma\-separated list of pattern=N settings for file\-filtered logging
|
||||
|
||||
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
// 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
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBkubectl\-config(1)\fP,
|
||||
|
@@ -14,10 +14,7 @@ kubectl config set\-context \- Sets a context entry in .kubeconfig
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Sets a context entry in .kubeconfig
|
||||
Specifying a name that already exists will merge new fields on top of existing values for those fields.
|
||||
e.g.
|
||||
kubectl config set\-context gce \-\-user=cluster\-admin
|
||||
only sets the user field on the gce context entry without touching other values.
|
||||
Specifying a name that already exists will merge new fields on top of existing values for those fields.
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
@@ -138,6 +135,18 @@ Sets a context entry in .kubeconfig
|
||||
comma\-separated list of pattern=N settings for file\-filtered logging
|
||||
|
||||
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
// Set the user field on the gce context entry without touching other values
|
||||
$ kubectl config set\-context gce \-\-user=cluster\-admin
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBkubectl\-config(1)\fP,
|
||||
|
@@ -14,20 +14,7 @@ kubectl config set\-credentials \- Sets a user entry in .kubeconfig
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Sets a user entry in .kubeconfig
|
||||
|
||||
.PP
|
||||
Specifying a name that already exists will merge new fields on top of existing
|
||||
values. For example, the following only sets the "client\-key" field on the
|
||||
"cluster\-admin" entry, without touching other values:
|
||||
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
set\-credentials cluster\-admin \-\-client\-key=\~/.kube/admin.key
|
||||
|
||||
.fi
|
||||
.RE
|
||||
Specifying a name that already exists will merge new fields on top of existing values.
|
||||
|
||||
.PP
|
||||
Client\-certificate flags:
|
||||
@@ -169,6 +156,25 @@ Bearer token and basic auth are mutually exclusive.
|
||||
comma\-separated list of pattern=N settings for file\-filtered logging
|
||||
|
||||
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
// Set only the "client\-key" field on the "cluster\-admin"
|
||||
// entry, without touching other values:
|
||||
$ kubectl set\-credentials cluster\-admin \-\-client\-key=\~/.kube/admin.key
|
||||
|
||||
// Set basic auth for the "cluster\-admin" entry
|
||||
$ kubectl set\-credentials cluster\-admin \-\-username=admin \-\-password=uXFGweU9l35qcif
|
||||
|
||||
// Embed client certificate data in the "cluster\-admin" entry
|
||||
$ kubectl set\-credentials cluster\-admin \-\-client\-certificate=\~/.kube/admin.crt \-\-embed\-certs=true
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBkubectl\-config(1)\fP,
|
||||
|
@@ -14,16 +14,8 @@ kubectl config set \- Sets an individual value in a .kubeconfig file
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Sets an individual value in a .kubeconfig file
|
||||
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
property\-name is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
property\-value is the new value you wish to set.
|
||||
|
||||
.fi
|
||||
.RE
|
||||
PROPERTY\_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
PROPERTY\_VALUE is the new value you wish to set.
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
@@ -14,15 +14,7 @@ kubectl config unset \- Unsets an individual value in a .kubeconfig file
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Unsets an individual value in a .kubeconfig file
|
||||
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
property\-name is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
|
||||
.fi
|
||||
.RE
|
||||
PROPERTY\_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
@@ -15,6 +15,9 @@ kubectl config view \- displays merged .kubeconfig settings or a specified .kube
|
||||
.PP
|
||||
displays merged .kubeconfig settings or a specified .kubeconfig file.
|
||||
|
||||
.PP
|
||||
You can use \-\-output=template \-\-template=TEMPLATE to extract specific values.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
@@ -168,6 +171,9 @@ $ kubectl config view
|
||||
// Show only local ./.kubeconfig settings
|
||||
$ kubectl config view \-\-local
|
||||
|
||||
// Get the password for the e2e user
|
||||
$ kubectl config view \-o template \-\-template='\{\{ index . "users" "e2e" "password" \}\}'
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
@@ -133,17 +133,18 @@ Forward 1 or more local ports to a pod.
|
||||
.RS
|
||||
|
||||
.nf
|
||||
|
||||
// listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod
|
||||
$ kubectl port\-forward \-p mypod 5000 6000
|
||||
<listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod>
|
||||
|
||||
// listens on port 8888 locally, forwarding to 5000 in the pod
|
||||
$ kubectl port\-forward \-p mypod 8888:5000
|
||||
<listens on port 8888 locally, forwarding to 5000 in the pod>
|
||||
|
||||
// listens on a random port locally, forwarding to 5000 in the pod
|
||||
$ kubectl port\-forward \-p mypod :5000
|
||||
<listens on a random port locally, forwarding to 5000 in the pod>
|
||||
|
||||
// listens on a random port locally, forwarding to 5000 in the pod
|
||||
$ kubectl port\-forward \-p mypod 0:5000
|
||||
<listens on a random port locally, forwarding to 5000 in the pod>
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
@@ -140,6 +140,22 @@ Run a proxy to the Kubernetes API server.
|
||||
comma\-separated list of pattern=N settings for file\-filtered logging
|
||||
|
||||
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
// 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, changing the api prefix to k8s\-api
|
||||
// This makes e.g. the pods api available at localhost:8011/k8s\-api/v1beta1/pods/
|
||||
$ kubectl proxy \-\-api\-prefix=k8s\-api
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBkubectl(1)\fP,
|
||||
|
Reference in New Issue
Block a user