Skip to content
Theory · Security basics · lesson 4 of 6

ServiceAccounts, Roles, RoleBindings

Sometimes a program in a Pod needs to talk to Kubernetes itself. A metrics collector asks for the list of Pods, a backup service creates jobs, a dashboard reads logs. Each such request arrives at the API server, which decides two things: who is asking, and whether they are allowed to.

In this lesson

  • A ServiceAccount is the badge
  • A Role is the list of doors
  • A RoleBinding is the security-system entry
  • Checking: kubectl auth can-i
  • ClusterRoles and ClusterRoleBindings
  • Common mistake
  • Key points