简体   繁体   中英

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!

Solution:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM