mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Fix formatting for kubeconfig file documentation
This commit is contained in:
parent
715f2c488f
commit
c4c4e173a5
@ -43,7 +43,7 @@ https://github.com/GoogleCloudPlatform/kubernetes/issues/1755
|
||||
|
||||
## Example kubeconfig file
|
||||
|
||||
```
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
@ -125,7 +125,7 @@ See [kubectl/kubectl_config.md](kubectl/kubectl_config.md) for help.
|
||||
|
||||
### Example
|
||||
|
||||
```
|
||||
```console
|
||||
$ kubectl config set-credentials myself --username=admin --password=secret
|
||||
$ kubectl config set-cluster local-server --server=http://localhost:8080
|
||||
$ kubectl config set-context default-context --cluster=local-server --user=myself
|
||||
@ -136,7 +136,7 @@ $kubectl config view
|
||||
|
||||
produces this output
|
||||
|
||||
```
|
||||
```yaml
|
||||
clusters:
|
||||
local-server:
|
||||
server: http://localhost:8080
|
||||
@ -156,7 +156,7 @@ users:
|
||||
|
||||
and a kubeconfig file that looks like this
|
||||
|
||||
```
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
- cluster:
|
||||
@ -180,7 +180,7 @@ users:
|
||||
|
||||
#### Commands for the example file
|
||||
|
||||
```
|
||||
```console
|
||||
$ kubectl config set preferences.colors true
|
||||
$ kubectl config set-cluster cow-cluster --server=http://cow.org:8080 --api-version=v1
|
||||
$ kubectl config set-cluster horse-cluster --server=https://horse.org:4443 --certificate-authority=path/to/my/cafile
|
||||
|
Loading…
Reference in New Issue
Block a user