Seal with cluster-wide scope

Create a secret and seal it with cluster-wide scope, so it can be unsealed in any namespace

kubectl create secret generic mysecret --dry-run=client --from-literal=token=abc123 -o yaml | kubeseal --scope cluster-wide -o yaml

tool
sealed-secrets11 commands
tags
sealed-secretssecurity

More sealed-secrets commands

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

    Save the sealing certificate to encrypt secrets offline

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

    Encrypt without cluster access, using a saved cert

  • kubectl logs -n kube-system -l app.kubernetes.io/name=sealed-secrets -f

    Follow the controller logs to debug problems with unsealing

  • kubectl get sealedsecrets -A

    Show all SealedSecrets in all namespaces

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

    Take the decrypted Secret from the cluster and seal it again with the current key

all 11 sealed-secrets commands