Reputation: 47
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
Reputation: 47
Solution:
kubectl get secret mysecret -o json | jq '.data["secrect_to_change"] = "base64-encoded_password"' | kubectl apply -f
Upvotes: 1