Challenge - 5 Problems
Base64 Secrets Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Base64 encoding of a secret string
What is the output of the following command?
echo -n 'mypassword' | base64
Kubernetes
echo -n 'mypassword' | base64
Attempts:
2 left
💡 Hint
Remember that base64 output includes padding with '=' characters.
✗ Incorrect
The base64 encoding of 'mypassword' is 'bXlwYXNzd29yZA=='. The '==' are padding characters to complete the encoding block.
🧠 Conceptual
intermediate1:30remaining
Why encode secrets in base64 in Kubernetes?
Why does Kubernetes require secret data to be base64 encoded in Secret manifests?
Attempts:
2 left
💡 Hint
Think about what base64 does to data and what YAML supports.
✗ Incorrect
Kubernetes requires base64 encoding because YAML files must contain valid ASCII characters. Base64 encoding safely represents binary or special characters in ASCII.
❓ Configuration
advanced2:00remaining
Correct base64 encoding in a Kubernetes Secret manifest
Which Secret manifest correctly encodes the password 'admin123' in base64?
Attempts:
2 left
💡 Hint
Check if the field is 'data' or 'stringData' and whether the value is base64 encoded or plain text.
✗ Incorrect
'data' field requires base64 encoded values. 'stringData' accepts plain text and encodes it automatically. Option D uses 'data' with correct base64 encoding.
❓ Troubleshoot
advanced1:30remaining
Error decoding secret data in Kubernetes
You applied a Secret manifest with this data field:
What error will Kubernetes report when trying to decode this secret?
password: YWRtaW4xMjM
What error will Kubernetes report when trying to decode this secret?
Attempts:
2 left
💡 Hint
Check if the base64 string is properly padded.
✗ Incorrect
The base64 string 'YWRtaW4xMjM' is missing padding '=' characters, causing a decoding error.
✅ Best Practice
expert2:00remaining
Secure handling of base64 encoded secrets in Kubernetes
Which practice is the most secure when managing base64 encoded secrets in Kubernetes?
Attempts:
2 left
💡 Hint
Think about how to avoid exposing secrets in source control.
✗ Incorrect
Using external secret management tools or sealed-secrets keeps secrets encrypted and out of source control, improving security.