appendix D Solving the practice exercises
This appendix provides guided solutions to the practice exercises found at the end of each section, organized by chapter, starting with chapter 1. Rather than jumping straight to the answers, I encourage you to simulate the exam environment. Work through each problem as if it were a real CKA exam question. If you’ve studied the material, many solutions should be come naturally, but if you encounter challenges, this appendix will help you get unstuck.
D.1 Chapter 1 practice exercises
There were fewer exam exercises in this chapter, as this was an introductory chapter, and the exercises are more exploratory.
D.1.1 SWAPI API similarities
In chapter 1, we highlighted the similarities between the SWAPI (https://swapi.info/playground) and the Kubernetes API. If we send the GET request to https://swapi.info/api/starships/9/, it returns the object representing the “Death Star.” This includes fields such as name, model, and manufacturer. In a similar way, retrieving a Deployment object in Kubernetes, typically using kubectl, involves sending a GET request to an endpoint like https://kind-control-plane:6443/apis/apps/v1/namespaces/default/deployments.