Set and Use Secrets in a Kubernetes Deployment
Configure a Kubernetes Deployment to consume Secrets as environment variables and volume mounts.
Focused, hands-on problems for sharpening your DevOps and server-side skills. Some teach specific concepts while others mirror real-world scenarios. Every challenge includes hints, feedback, and automated solution checks.
Challenges contributed by the community members sharing their knowledge and expertise.
Configure a Kubernetes Deployment to consume Secrets as environment variables and volume mounts.
A Deployment is failing because application configuration is missing. Mount only specific keys from an existing ConfigMap as files inside the Pod at the correct path so the application can start successfully.
Configure a Vertical Pod Autoscaler (VPA) with a per-container resource policy that provides recommendations for the main container while excluding the sidecar container from any VPA-managed scaling.
Create a PriorityClass for production workloads and patch an existing deployment to use it, ensuring critical services get scheduled first during resource contention.
A service in the mesh namespace returns only a single IP during DNS lookup, preventing the peer-server pods from finding each other. Investigate why DNS does not return one address per pod and change the service configuration so that peer discovery works correctly.
Update a production NGINX ConfigMap to restrict TLS to v1.3 only, then verify the change enforces the security policy.
A Deployment is using a disk-backed emptyDir volume. Convert it to a memory-backed tmpfs volume for better performance — but make sure to set a size limit to prevent the Pod from exhausting the node's RAM.
Troubleshoot a Deployment where containers are repeatedly OOMKilled. Inspect Vertical Pod Autoscaler (VPA) recommendations and manually apply the recommended memory request and memory limit to stabilize the workload.
Deploy a multi-container Kubernetes Deployment and ensure that no more than one Pod runs on the same worker node, without using a DaemonSet.
Update container images, container names, update strategy, and replica count in an existing multi-container Kubernetes Deployment.