You want to authenticate Kubernetes users by integrating it with Azure AD using OIDC. This setup involves configuring the following components:
👉 Not a Medium member? You can read it here. Also, a fully automated script to set up everything described in this article is available on my GitHub.
1️⃣ OIDC Provider (in your Azure AD => Microsoft Entra ID),
2️⃣ kube-api-server (in your K8s cluster),
3️⃣ kubeconfig in ~/.kube/config (in your local machine).
💡After you done with the integration, the authentication flow will be something like this:
Before you begin, ensure you have the following installed:
- Kind
- kubectl
- krew
- kubectl oidc-login
- Azure CLI (az) — as we are going to interact with Azure via cli, not its UI.