Closed
Description
Hi
What we try to achieve is to be able to manually update the key on the controller and not rely on the automatic key renewal. We have our own credentials cycling process and we want to know what key pair is used to encrypt the sealed secrets.
We setup the controller with the --key-renew-period=0
flag to disable the key renewal. We then retrieve the current key pair via this command and store them in our infrastructure.
Now we see the following workaround to make the manual key renewal working:
- Backup the key as described here
- Create a new key pair and add the Base64 encoded private and public key pair to the
tls.key
andtls.crt
entries of the backupedmaster.json
- Reencrypt all sealed secrets via
kubeseal --cert new-key-pair.pub --re-encrypt < old-sealed-secret.json > new-sealed-secret.json
- Restore the
master.json
with the new key pair, restart the controller and then push all new encrypted sealed secrets.
Would that process work or do you see a better solution? Does step 3. work with reencrypting a sealed secret with a specified certificate via --cert
?
Thanks in advance!