Re-seal with the new key
Take the decrypted Secret from the cluster and seal it again with the current key
kubectl get secret mysecret -o yaml | kubeseal --format yaml > sealed-new.yaml
- tool
- sealed-secrets11 commands
More sealed-secrets commands
-
kubectl create secret generic mysecret --dry-run=client -n <ns> --from-literal=key=value -o yaml | kubeseal -o yaml > sealed.yamlCreate a Kubernetes Secret and seal it in one pipeline
-
kubeseal --fetch-cert --controller-name=sealed-secrets > pub-cert.pemDownload the sealing certificate to seal secrets without cluster access
-
kubeseal --cert pub-cert.pem -o yaml < secret.yaml > sealed.yamlSeal without cluster access, using a saved certificate
-
kubectl get sealedsecret -AShow all SealedSecrets and their sync status
-
kubeseal --format=yaml < secret.yaml > sealed-secret.yamlEncrypt a Kubernetes Secret YAML into a SealedSecret