Summary

In this chapter, we took a closer look at the Kubernetes API server, the way that Kubernetes uses the RESTful API, and how API resources are defined. We learned that all commands from the kubectl command-line utility are translated into RESTful HTTP API calls and are sent to the API server. We learned that API calls go through multiple stages, including authentication, authorization, and admission control. We also had a closer look at each stage and some of the modules involved.

Then, we learned about some API resources, how they are categorized as namespace-scoped or cluster-scoped resources, and their API group and API version. We then learned how we can use this information to build an API path for interacting with the Kubernetes API.

We also applied what we learned by making an API call directly to the API server, using the curl HTTP client to interact with objects by using different authentication methods, such as ServiceAccounts and an X.509 certificate.

In the next few chapters, we will inspect most of the commonly used API objects more closely, mainly focusing on the different functionalities offered by these objects to enable us to deploy and maintain our application in a Kubernetes cluster. We will begin this series of chapters by taking a look at the basic unit of deployment in Kubernetes (pods) in the next chapter.