Setup of keycloak¶
The Kubernetes API server OIDC is not configured (since the apiServer migration, see .archive/.plans/superpowers/specs/2026-10-05-talos-apiserver-documents-design.md): kubectl uses the Talos-generated kubeconfig. The steps below are the old manifest-based setup; to bring OIDC back, add a jwt entry to provision/talos/patches/controlplane/24-apiserver-authentication.yaml (issuer url, audiences, claim mappings) instead of API server flags.
Using KC in k8s kubectl.
Add new clientId into KC named k8s.
Add configuration to /etc/kubernetes/manifests/kube-apiserver.yaml:
- --oidc-issuer-url=https://l.{DOMAIN}/realms/home
- --oidc-client-id=k8s
- --oidc-username-claim=email
- "--oidc-username-prefix=oidc:"
- --oidc-groups-claim=groups
- "--oidc-groups-prefix=oidc:"
Bind the OIDC groups with RBAC (a ClusterRoleBinding or per-namespace RoleBinding whose subject is the group, with the oidc: prefix); the old example manifests were removed because nothing used them.
Konfigure kubectl:
- name: oidc
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- oidc-login
- get-token
- --oidc-issuer-url=https://l.{DOMAIN}/realms/home
- --oidc-client-id=k8s
- --oidc-client-secret=secret-from-oidc
command: kubectl
env:
provideClusterInfo: false
_[VIP]: Virtual IP (Used for high-availability controlplanes)
_[HA]: High Availability (often reduntant hardware/software)
_[PVC]: k8s resource - Persistent Volume Claim
_[PV]: k8s resource - Persistent Volume
_[CNI]: k8s networking - Container Network Interface
_[k8s]: Shortening of Kurbenetes
_[CRD]: Custom Resource Definitions
_[S3]: Simple Storage Service
_[NFS]: Network File System
_[DR]: Disaster Recovery