December 02, 2022 (2) - Encoding secrets for Kubernetes
Kubernetes uses base64 encoded secrets, but it’s important to make sure that when encoding the secrets, you don’t include any extra newlines - tldr; use echo -n instead of echo # Works > echo -n "my secret" | base64 bXkgc2VjcmV0 # Doesn't work > echo "my secret" | base64 bXkgc2VjcmV0Cg== Otherwise, you could be in for a world of pain :)