From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

API access and ServiceAccounts

API access and ServiceAccounts

- So all actions in the Kubernetes cluster need to be authenticated and authorized. ServiceAccounts are used for basic authentication from within the Kubernetes cluster, and a role-based access control or RBAC is used to connect a ServiceAccount to a specific role. Every pod uses the default ServiceAccount to connect to the API server. And this default ServiceAccount allows a resource to get information from the API server, but not much else. Each ServiceAccount uses a secret to automount API credentials within the application. In some cases, you will need custom ServiceAccount. Do remember that most bots do fine with a default ServiceAccount, however, and if a pod needs access to resources in the cluster, a custom ServiceAccount that uses our RoleBinding to connect to a specific role is needed. For instance, this is needed for network plugins, monitoring software, and other additional components that are installed in Kubernetes. Let's have a look at these ServiceAccounts. So let's…

Contents