Federate a kubeadm cluster with Microsoft Entra ID so one login gives kubectl access, bind RBAC to group IDs, then measure what offboarding revokes and what it doesn’t.
A person joins a project. They get access to the application through Entra ID, and that part is a single onboarding step. Then they ask for access to the Kubernetes cluster that runs on an on-prem server, and a second onboarding starts. Someone creates a client certificate, or hands over a shared admin kubeconfig, or creates a ServiceAccount token for them. That second path lives outside the identity system, so nobody reviews it, nobody expires it, and nobody remembers it when the person leaves.
The consequences are easy to predict. Leavers keep cluster access. The audit log shows a shared identity such as kubernetes-admin instead of a person. Laptops hold credentials that stay valid for a year or more.
This lab removes the second path. The Kubernetes API server trusts Entra ID as an OpenID Connect (OIDC) provider. Users sign in with their normal Entra account (and MFA), and Kubernetes RBAC is bound to Entra group object IDs. Adding someone to a group gives them cluster access, and removing them takes it away. No Kubernetes user is ever created.
To keep the cost low, the cluster is a single kubeadm node on one Linux server, and the identity side runs on the free tier of Microsoft Entra ID. If the server is a local machine, nothing is billed. If you use a cloud VM as a stand-in for the on-prem server, only that VM costs money (see Prerequisites).
k8s-lab-developers bound to the edit role in one namespace is something a reviewer understands in ten seconds.kubectl too.| Item | What you need |
|---|---|
| Entra ID tenant | An account that can create apps and grant admin consent (Application Administrator or Global Administrator). The free tier is enough, and no Azure subscription is needed. Leave security defaults on, because the lab relies on MFA registration. |
| Server | One Ubuntu Server 24.04 LTS machine with 2 CPUs, 4 GiB RAM (8 GiB is comfortable), 20 GiB disk and a fixed IP. A physical box, a local VM or a cloud VM all work. You need sudo and SSH access from your laptop. |
| Network | Server to internet: outbound HTTPS to login.microsoftonline.com, pkgs.k8s.io, registry.k8s.io, github.com and ghcr.io. Entra is the one that matters, and Step 6 tests it. Laptop to server: TCP 6443 and 22. |
| Laptop | A bash-style terminal (Git Bash on Windows was tested) with ssh, scp, kubectl 1.36 or newer, grep, cut, tr, awk, base64 and date, plus krew and the oidc-login plugin from Step 12. No Python is needed. |
The step by step build and conclusion are part of a ByteLabs bundle. Enrol once to unlock every gated section in it for 3 months.
Enrol in "Azure Operations Labs" · ₹767Already bought this? Sign in to open it.
The step by step build and conclusion are part of a ByteLabs bundle. Enrol once to unlock every gated section in it for 3 months.
Enrol in "Azure Operations Labs" · ₹767Already bought this? Sign in to open it.