Skip to main content
mastering ckad certified kubernetes application developer

Solutions: Configuration Exercises

2 min read Chapter 55 of 87
Summary

Complete solutions for all four exercises from Chapter...

Complete solutions for all four exercises from Chapter 18, covering ConfigMap consumption via volume mounts and environment variables, TLS Secret mounting in nginx, locked-down SecurityContext configuration, and ServiceAccount with RBAC Role and RoleBinding.

Solutions: Configuration Exercises

This chapter provides complete, verified solutions for the four exercises at the end of Chapter 18. These exercises span the Configuration and Security domains — ConfigMap consumption, Secret management, SecurityContext hardening, and ServiceAccount RBAC configuration.

How to use these solutions:

  1. Attempt the exercise first. Spend at least 15 minutes on each exercise before looking at the solution. The struggle of debugging a misconfigured YAML manifest or tracing a permission denied error is where the deepest learning happens.

  2. Compare your approach. Multiple valid approaches exist. Your Deployment might use a different image tag, your Role might list resources in a different order. Focus on whether your result meets the stated requirements rather than matching these solutions line by line.

  3. Run the verification steps. Every solution ends with specific verification commands and expected output. Run these against your own cluster to confirm your implementation works as described.

  4. Study the troubleshooting notes. Common mistakes — wrong key names, missing labels, incorrect RBAC subject format — are documented with their error messages. If you encountered an error during the exercise, check the troubleshooting section before starting over.

The solutions are organized into two sections: the first covers ConfigMap and Secret exercises (Exercises 1–2), and the second covers SecurityContext and RBAC exercises (Exercises 3–4).