mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-27 05:28:22 +00:00
Change Updating a kubeconfig section
This commit is contained in:
@@ -156,16 +156,10 @@ kubectl delete --raw /apis/ext.cattle.io/v1/kubeconfigs?labelSelector=foo%3Dbar
|
|||||||
|
|
||||||
#### Updating a Kubeconfig
|
#### Updating a Kubeconfig
|
||||||
|
|
||||||
Only the metadata and the `spec.description` field can be updated. All other `spec` fields are immutable.
|
Only the `metadata`, e.g. adding a label or an annotation, and the `spec.description` field can be updated. All other `spec` fields are immutable.
|
||||||
|
|
||||||
To add a label to a Kubeconfig:
|
To edit a Kubeconfig:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
kubectl patch kubeconfig kubeconfig-zp786 -p '{"metadata":{"labels":{"foo":"bar"}}}'
|
kubectl edit kubeconfig kubeconfig-zp786
|
||||||
```
|
|
||||||
|
|
||||||
To change the description of a Kubeconfig:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
kubectl patch kubeconfig kubeconfig-zp786 -p '{"spec":{"description":"Updated description"}}'
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user