Recall & Review
beginner
What is a Kubernetes Secret?
A Kubernetes Secret is a way to store and manage sensitive information like passwords, tokens, or keys securely within a cluster.
Click to reveal answer
beginner
How do you use a Secret as a mounted volume in a pod?
You define a volume in the pod spec that uses the Secret, then mount that volume into a container's file system at a specific path.
Click to reveal answer
intermediate
What is the benefit of mounting Secrets as volumes instead of environment variables?
Mounting Secrets as volumes allows the container to read secret data as files, which can be more secure and flexible, especially for certificates or keys.
Click to reveal answer
intermediate
What happens if the Secret data changes after the pod is running?
The mounted Secret volume is updated automatically, so the container can see the new secret data without restarting the pod.
Click to reveal answer
beginner
Show a simple YAML snippet to mount a Secret named 'my-secret' as a volume at '/etc/secret'.
volumes:
- name: secret-volume
secret:
secretName: my-secret
containers:
- name: my-container
volumeMounts:
- name: secret-volume
mountPath: /etc/secret
Click to reveal answer
What Kubernetes object stores sensitive data like passwords?
✗ Incorrect
Secrets are designed to store sensitive data securely, unlike ConfigMaps which store non-sensitive configuration.
How do you make a Secret available inside a container as files?
✗ Incorrect
Mounting a Secret as a volume makes its data available as files inside the container.
If a Secret changes, how does the mounted volume behave?
✗ Incorrect
Kubernetes updates the mounted Secret volume automatically when the Secret changes.
Which path is commonly used to mount Secrets as volumes?
✗ Incorrect
A common convention is to mount Secrets under /etc/secret or similar secure paths.
What is the key difference between Secrets and ConfigMaps?
✗ Incorrect
Secrets are intended for sensitive data, while ConfigMaps are for non-sensitive configuration.
Explain how to mount a Kubernetes Secret as a volume inside a pod and why you might do this.
Think about how files inside a container can hold secret data securely.
You got /4 concepts.
Describe what happens when the data in a Kubernetes Secret changes while a pod is running with that Secret mounted as a volume.
Consider how Kubernetes keeps the secret data fresh inside the container.
You got /4 concepts.