Home

Awesome

sample-kubernetes-secret

  1. Generate key pair
make key
  1. Set key

.secret.env

SOPS_AGE_KEY=AGE-SECRET-KEY-xxxxx
PUBLIC_KEY=xxxxx
  1. Create secret
make secret secret=${xxx}
  1. Set secret
echo xxx > ./kubernetes/${xxx}.in.txt
  1. Encrypt secret
make encrypt secret=${xxx}
  1. Generate manifest
make sops secret=${xxx}

※ If you use it in production, please .gitignore the secret manifest.

  1. Decrypt secret
make decrypt secret=${xxx}