Re-seal with new key sealed-secrets
Fetch decrypted secret and re-encrypt with current key
kubectl get secret mysecret -o yaml | kubeseal --format yaml > sealed-new.yaml
more sealed-secrets
all 11 commands →
Seal a secret
kubectl create secret generic mysecret --dry-run=client -n <ns> --from-literal=key=value -o yaml | kubeseal -o yaml > sealed.yaml
Fetch public cert
kubeseal --fetch-cert --controller-name=sealed-secrets > pub-cert.pem
Seal with offline cert
kubeseal --cert pub-cert.pem -o yaml < secret.yaml > sealed.yaml
List SealedSecrets
kubectl get sealedsecret -A
Seal a secret from file
kubeseal --format=yaml < secret.yaml > sealed-secret.yaml