Can minikube handle oidc authentication? Can minikube handle oidc authentication? kubernetes kubernetes

Can minikube handle oidc authentication?


Now that I have spent time on this, I am answering this question so that it can help someone. The answer is YES. Minikube provides a k8s setup which supports the OIDC based authentication. I have been able to configure it. So here is some details on how I configured the kube-apiserver parameters.

minikube start \ --extra-config=apiserver.Authorization.Mode=RBAC \ --extra-config=apiserver.Authentication.OIDC.IssuerURL=https://accounts.google.com \ --extra-config=apiserver.Authentication.OIDC.UsernameClaim=email \ --extra-config=apiserver.Authentication.OIDC.ClientID="client_id"

Also use the k8s-oidc-helper tool and get the refresh-token, id_token and other essential parameters. Then append the contents to the ~/.kube/config file, add the path for the api-server certificate and key. The user is now registered and can use Gmail id to login to k8s