Skip to content

Instantly share code, notes, and snippets.

@jkanclerz
Created July 1, 2025 08:36
Show Gist options
  • Select an option

  • Save jkanclerz/0f5af67839b7f4756ad4227ef6c3ed68 to your computer and use it in GitHub Desktop.

Select an option

Save jkanclerz/0f5af67839b7f4756ad4227ef6c3ed68 to your computer and use it in GitHub Desktop.
SOPS

SOPS values encription

Private key retreival

Option 1 - bitwarden share

get base64 encoded key from

echo 'my' | base64 -d

Option 2 - fetch directly from the cluster

kubectl -n flux-system get secret sops-age -o jsonpath='{.data.age\.agekey}' | base64 -d

Add to user sops private key files

  • linux: ~/config/sops/age/keys.txt
  • macos ~/Library/Application\ Support/sops/age/keys.txt
echo "sopsPrivateKey" >> ~/config/sops/age/keys.txt

Encrypt file

sops -i -e $(pwd)/values.sops.yaml

Decrypt file

sops -i -d $(pwd)/values.sops.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment