Challenge - 5 Problems
Secret Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of creating an Opaque secret with kubectl
What is the output of the following command when creating an Opaque secret named
mysecret with a literal key-value pair username=admin?Kubernetes
kubectl create secret generic mysecret --from-literal=username=adminAttempts:
2 left
💡 Hint
Think about the normal success message when creating a secret with kubectl.
✗ Incorrect
The command creates an Opaque secret named 'mysecret' with the given literal data. On success, kubectl outputs 'secret/mysecret created'.
🧠 Conceptual
intermediate1:30remaining
Purpose of docker-registry secret type
What is the main purpose of a Kubernetes secret of type
kubernetes.io/dockerconfigjson (docker-registry)?Attempts:
2 left
💡 Hint
Think about what is needed to pull images from private Docker registries.
✗ Incorrect
The docker-registry secret type stores credentials in a special JSON format that Kubernetes uses to authenticate with private container registries when pulling images.
❓ Configuration
advanced2:00remaining
Correct YAML for TLS secret
Which YAML snippet correctly defines a TLS secret named
mytlssecret with certificate and key files?Attempts:
2 left
💡 Hint
TLS secrets require a specific type and base64 encoded data keys named tls.crt and tls.key.
✗ Incorrect
TLS secrets must have type 'kubernetes.io/tls' and contain base64 encoded certificate and key under keys 'tls.crt' and 'tls.key'.
❓ Troubleshoot
advanced2:00remaining
Error when pulling image with docker-registry secret
You created a docker-registry secret and referenced it in your Pod spec, but the Pod fails to pull the private image with an 'unauthorized' error. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check if the Pod knows to use the secret for pulling images.
✗ Incorrect
Even if the secret is correct, the Pod must reference it in the imagePullSecrets field to use it for pulling private images.
✅ Best Practice
expert2:30remaining
Best practice for managing TLS secrets in Kubernetes
Which practice is considered best for managing TLS secrets securely in Kubernetes clusters?
Attempts:
2 left
💡 Hint
Think about automation and security combined for TLS management.
✗ Incorrect
Using the TLS secret type with automation tools like cert-manager ensures secure storage and automatic renewal of certificates, which is best practice.