From 6b96b010fd80c70af4040a182d124df73fbc82e5 Mon Sep 17 00:00:00 2001 From: Peter Matseykanets Date: Thu, 26 Jun 2025 08:15:34 -0400 Subject: [PATCH] Change Updating a kubeconfig section --- docs/api/workflows/kubeconfigs.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/api/workflows/kubeconfigs.md b/docs/api/workflows/kubeconfigs.md index 5965fccbc5e..e46fdd6d71a 100644 --- a/docs/api/workflows/kubeconfigs.md +++ b/docs/api/workflows/kubeconfigs.md @@ -156,16 +156,10 @@ kubectl delete --raw /apis/ext.cattle.io/v1/kubeconfigs?labelSelector=foo%3Dbar #### 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 -kubectl patch kubeconfig kubeconfig-zp786 -p '{"metadata":{"labels":{"foo":"bar"}}}' -``` - -To change the description of a Kubeconfig: - -```sh -kubectl patch kubeconfig kubeconfig-zp786 -p '{"spec":{"description":"Updated description"}}' +kubectl edit kubeconfig kubeconfig-zp786 ```