Copy Config Files from a Running Pod
A Deployment is running in the platform namespace with 3 replicas. Each pod has configuration files at /app/config/. Copy those files to /home/laborant/config/ on the local machine.
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.
A Deployment is running in the platform namespace with 3 replicas. Each pod has configuration files at /app/config/. Copy those files to /home/laborant/config/ on the local machine.
Create a Pod that uses a generic ephemeral volume backed by a dynamic StorageClass. Unlike emptyDir, ephemeral volumes are provisioned as PersistentVolumeClaims and support storage requests and access modes.
A webapp deployment in the prod namespace is stuck in CrashLoopBackOff. The application's startup probe checks that its existing config directory is intact before the container is marked healthy. Fix the deployment so configuration is injected correctly and the pod reaches Running state with its health check endpoint responding on port 8080.
A MariaDB deployment and its PVC were accidentally deleted. The PersistentVolume survived due to its Retain policy. Restore the database by rebinding the existing PV without losing any data.
A deployment is running without health probes or graceful shutdown configuration. Add startup, liveness, and readiness probes plus a preStop hook and terminationGracePeriodSeconds to make it ready for real traffic.
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.
Add a new, separate Service CIDR range for the dev team using the ServiceCIDR API object — without touching or restarting the cluster's default Service CIDR — then create a Service with an explicit ClusterIP inside that new range and verify DNS resolution.
Configure a Kubernetes Service so that requests from the same client IP are always routed to the same backend Pod for a sustained period, using ClientIP-based session affinity.
Combine an existing ConfigMap and Secret into one volume and mount them at a single path inside a Pod — using only one volume definition.
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.