A simple CLI tool to encrypt a string using Bitnami's Sealed Secrets for Kubernetes. This tool provides a simple way to encrypt sensitive data that can be safely stored in Git repositories and decrypted only within your Kubernetes cluster.
kubeseal-encrypt-string.mov
Before using this tool, ensure you have the following installed:
- kubectl (v1.29+)
Installing kubectl
- kubeseal (v0.24.0+)
Installing kubeseal
- Automatic validation of encrypted secrets
- Namespace-scoped encryption
- Labels and annotations
//TODO
git clone https://github.com/mataberat/kubeseal-encrypt-string.git
cd kubeseal-encrypt-string
make build
# Basic usage with required flags
kubeseal-encrypt-string --key mysecret --value supersecret --namespace production --secret-name my-secret
# Using custom controller namespace
kubeseal-encrypt-string --key mysecret --value supersecret --namespace production --controller-namespace sealed-secrets --secret-name my-secret
# Using custom controller name and namespace
kubeseal-encrypt-string --key mysecret --value supersecret --namespace production --controller-namespace sealed-secrets --controller-name sealed-secrets --secret-name my-secret
# Using environment variables for controller config
export SEALED_SECRETS_CONTROLLER_NAMESPACE=sealed-secrets
export SEALED_SECRETS_CONTROLLER_NAME=sealed-secrets
kubeseal-encrypt-string --key mysecret --value supersecret --namespace production