mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #10188 from fabianofranz/fix_kubectl_set_credentials_example
Fixes wrong "kubectl config set-credentials" examples
This commit is contained in:
commit
838ddba1d9
@ -29,13 +29,13 @@ kubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--c
|
||||
```
|
||||
// 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
|
||||
$ kubectl config 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
|
||||
$ kubectl config 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
|
||||
$ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true
|
||||
```
|
||||
|
||||
### Options
|
||||
@ -77,6 +77,6 @@ $ kubectl set-credentials cluster-admin --client-certificate=~/.kube/admin.crt -
|
||||
### SEE ALSO
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.22419139 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-06-22 20:33:35.307768646 +0000 UTC
|
||||
|
||||
[]()
|
||||
|
@ -147,13 +147,13 @@ Bearer token and basic auth are mutually exclusive.
|
||||
.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
|
||||
$ kubectl config 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
|
||||
$ kubectl config 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
|
||||
$ kubectl config set\-credentials cluster\-admin \-\-client\-certificate=\~/.kube/admin.crt \-\-embed\-certs=true
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
@ -59,13 +59,13 @@ Specifying a name that already exists will merge new fields on top of existing v
|
||||
|
||||
const create_authinfo_example = `// 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
|
||||
$ kubectl config 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
|
||||
$ kubectl config 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`
|
||||
$ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true`
|
||||
|
||||
func NewCmdConfigSetAuthInfo(out io.Writer, configAccess ConfigAccess) *cobra.Command {
|
||||
options := &createAuthInfoOptions{configAccess: configAccess}
|
||||
|
Loading…
Reference in New Issue
Block a user