Kubernetes authentication and authorization
In Chapter 1, Kubernetes Overview, we talked about a typical workflow of Kubernetes components collaborating with each other. In this workflow, when a request comes through the Kubernetes API server, it invokes an API call. This API request now needs to be authenticated and authorized by the API server before a request is made to a Kubernetes API resource. As a result, the request can either be allowed or denied. The authentication process can be depicted as in Figure 6.2:
Figure 6.2 – API Kubernetes authentication
You can refer to the following article to get an overview of how the Kubernetes authentication process works: https://kubernetes.io/docs/reference/access-authn-authz/authentication/.
Before getting into authentication and authorization, let’s take a look at the user accounts and service accounts in Kubernetes.
Service accounts versus user accounts
In Kubernetes, we have a distinction...