How do you seal a secret and verify the controller decrypted it?
BeginnerConceptRapid-Fire Commands
Answer
kubeseal --fetch-cert > pub-cert.pem
kubectl create secret generic api-key --from-literal=key=abc123 -n web --dry-run=client -o yaml \
| kubeseal --cert pub-cert.pem --format yaml > api-key-sealed.yaml
git add api-key-sealed.yaml && git commit -m "Add sealed api-key" && git push
kubectl -n web get sealedsecret api-key -o jsonpath='{.status.conditions}'
kubectl -n web get secret api-key
A Synced: True condition on the SealedSecret and the presence of the Secret confirm decryption.
More on Rapid-Fire Commands
How do you get the initial admin password and log in from the CLI?BeginnerHow do you create an Application from the CLI with auto-sync?BeginnerHow do you see exactly what would change before syncing?BeginnerHow do you force Argo CD to re-render manifests ignoring its cache?BeginnerHow do you wait in a pipeline until an app is synced and healthy?IntermediateHow do you register a new cluster and list clusters?Beginner