How to migrate Sealed Secrets from a k8s cluster to another

This is a short blog post about, how to migrate sealed secrets when using Flux to another cluster.

I have created sealed secrets with Flux. And i wanted to migrate them to a new cluster. The process is quite simple if you know how. You need access to the old cluster!

On your old cluster:

kubectl get secret -n flux-system -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml > keys.secret

On your new cluster:

kubectl apply -f keys.secret

Save this file somewhere save! If you loose it you will not be able to decrypt the secrets again. Also it seems like you have to make this backup regularly as it seems like sealed secrets are adding things to this secrets sometimes.

Impressum/Legal Disclosure Datenschutzerklärung/Privacy Policy Firefish