Re-seal with new key

Fetch decrypted secret and re-encrypt with current key

kubectl get secret mysecret -o yaml | kubeseal --format yaml > sealed-new.yaml

tool
sealed-secrets11 commands
tags
sealed-secretssecurity

More sealed-secrets commands

  • kubectl create secret generic mysecret --dry-run=client -n <ns> --from-literal=key=value -o yaml | kubeseal -o yaml > sealed.yaml

    Create and seal a k8s secret in one pipeline

  • kubeseal --fetch-cert --controller-name=sealed-secrets > pub-cert.pem

    Download the sealing certificate for offline operations

  • kubeseal --cert pub-cert.pem -o yaml < secret.yaml > sealed.yaml

    Seal without cluster access using pre-fetched certificate

  • kubectl get sealedsecret -A

    Show all SealedSecrets and their sync status

  • kubeseal --format=yaml < secret.yaml > sealed-secret.yaml

    Encrypt a Kubernetes Secret YAML into a SealedSecret

all 11 sealed-secrets commands