How to update the configuration for add-on secrets in Tanzu Kubernetes Grid
search cancel

How to update the configuration for add-on secrets in Tanzu Kubernetes Grid

book

Article ID: 316949

calendar_today

Updated On:

Products

Tanzu Kubernetes Grid

Issue/Introduction

This article provides instructions for updating the configuration of add-on secrets in Tanzu Kubernetes Grid (TKG) to make changes persistent through upgrades.

Environment

VMware Tanzu Kubernetes Grid 1.x

Resolution

  1. Issue a command similar to the following to switch to the TKG management cluster context:

kubectl config use-context <MGMT-CLUSTER>-admin@<MGMT-CLUSTER>

  1. Issue a command similar to the following to export the add-on secret to be modified (pinniped in this example) to a text file: 

kubectl get secret  <MGMT-CLUSTER>-pinniped-addon -n tkg-system -o jsonpath="{.data.values\.yaml}" | base64 --decode > values.yaml

  1. Open the values.yaml file with a text editor and make any needed changes. Save and close the file.
  2. Issue the following command encode the contents of the values.yaml file:
base64 -w 0 values.yaml

Note: Make a note of the encoded value as it will be used in a future step.
  1. Issue a command similar to the following to open the secret for editing:

kubectl edit secret MGMT-CLUSTER-pinniped-addon -n tkg-system

  1. Replace the encoded values.yaml data with the value noted in Step 4.
  2. Type :wq to close the editor.