liveBook · Manning

Service account

As explained in Road to Kubernetes

A Kubernetes service account is an identity for processes running in a cluster that can be granted permissions to access Kubernetes resources.

A Kubernetes service account is an identity used to authenticate with the Kubernetes API and access or manage cluster resources. Kubernetes uses service accounts instead of traditional user accounts. Permissions belong to the account, so a newly provisioned root account can have unrestricted cluster access and must be treated as sensitive. section 8.1.3 section 8.6

Using a service account with kubectl requires:

GitHub Actions deployment

A deployment workflow stores the service account’s kubeconfig as the KUBECONFIG_SA secret, writes it to ~/.kube/config, verifies access with kubectl get pods and kubectl get deployments, applies manifests, and restarts deployments. Keep infrastructure automation separate from application repositories when practical, and never commit kubeconfig credentials to Git. section 8.5.2 section 8.1.3

How Road to Kubernetes covers it

How deep it goes
Defines authentication, kubeconfig use, and deployment prerequisites, but defers service-account creation and advanced security management.
Examples
Demonstrates a GitHub Actions workflow that loads kubeconfig, verifies access, applies manifests, and restarts Deployments.
What it assumes
Assumes a running Kubernetes cluster and introduces service-account, kubeconfig, and kubectl relationships without teaching account creation.
What you can do after
Operate/configure kubectl and GitHub Actions with a service account, kubeconfig file, and appropriate cluster permissions.
How it connects
Connects service accounts to Kubernetes API, kubeconfig, kubectl, permissions, GitHub Actions, and cluster resources.

Also explained in

Compare how 10 books explain service account →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.