Jasmine Tutt
Jasmine Tutt

Reputation: 47

Edit a microk8s secret using kubectl in airflow

I am trying to edit a secret that we have stored in airflow server using microk8s kubectl.

At the moment all I can do is find the coded secret using:

microk8s kubectl get secrets/MySecret -o jsonpath='{data}'

I want to edit the secret called 'host' within MySecret. Any advice on how to do this using the command line? I have tried edit secret command but I can't seem to interact and amend the code. I know I have done this before using the command line but can't remember how unfortunately.

Thanks in advance for any help on this!

Upvotes: 0

Views: 243

Answers (1)

Jasmine Tutt
Jasmine Tutt

Reputation: 47

Solution:

kubectl get secret mysecret -o json | jq '.data["secrect_to_change"] = "base64-encoded_password"' | kubectl apply -f

Upvotes: 1

Related Questions