dex icon indicating copy to clipboard operation
dex copied to clipboard

Helm charts for 'dex' and 'dex-k8s-authenticator' available

Open whereisaaron opened this issue 7 years ago • 13 comments
trafficstars

I've made Helm charts for both dex and dex-k8s-authenticator. You can deploy just dex, or deploy it together with the dex-k8s-authenticator helper UI. dex can be deployed into kube-system or into its own namespace with appropriate RBAC.

https://github.com/mintel/dex-k8s-authenticator/tree/master/charts

The chart settings support multiple connectors, including multiple of the same type. The helper app supports multiple clusters using dex.

These charts make install and using dex with Kubernetes very easy. Can we add references to these charts in the Kubernetes page?

Installing dex with web UI for configuring 'kubectl'

git clone [email protected]:mintel/dex-k8s-authenticator.git
helm inspect values charts/dex > dex.yaml
helm inspect values charts/dex-k8s-authenticator > dex-k8s-authenticator.yaml

Edit the values files for your environment and requirements (dex.yaml and dex-k8s-authenticator.yaml).

Create the DNS names for your dex (e.g. 'dex.example.com') and dex-k8s-authenticator (e.g. 'login.example.com') pointed at the ingress controller you are using. Be sure to enable HTTPS. You can install cert-manager to automatically issue Lets Encrypt certificates.

You also need to configure each Kubernetes cluster to use dex at e.g. 'dex.example.com' by setting the OIDC parameters for the Kubernetes API server.

helm install --namespace dex --values dex.yaml charts/dex
helm install --namespace dex --values dex-k8s-authenticator charts/dex-k8s-authenticator

Navigate to https://login.example.com and follow the instructions to authenticate using dex and configure kubectl.

whereisaaron avatar Feb 19 '18 15:02 whereisaaron

Why does it include both a RoleBinding and a ClusterRoleBinding for the ServiceAccount?

colemickens avatar Jun 28 '18 07:06 colemickens

Hi @colemickens the RoleBinding and a ClusterRoleBinding are binding different permissions (check the roleRef). dex need minimal permissions across the whole cluster, but more permissions in the namespace where it is running.

There is a ClusterRole and ClusterRoleBinding for the minimal whole cluster permissions, and the Role and Rolebinding for the extra permission needed just in the namespace where dex is actually running.

Does that make sense?

whereisaaron avatar Jun 30 '18 01:06 whereisaaron

Any chance we can we merge your dex chart into the official helm/charts for dex? https://github.com/helm/charts/tree/master/stable/dex

Adding your dex-k8s-authenticator chart to helm/charts would also be awesome.

I am happy to assist with that.

rendhalver avatar Sep 26 '18 15:09 rendhalver

Hi @rendhalver, please do!

whereisaaron avatar Sep 26 '18 17:09 whereisaaron

Ok awesome. I will see what's different in your chart and see about getting the changes added.

rendhalver avatar Sep 26 '18 19:09 rendhalver

+1 I've been using mintel/dex-k8s-authenticator with great results

christianh814 avatar Feb 12 '19 23:02 christianh814

@whereisaaron @rendhalver Any update on getting these charts merged into the official helm charts?

rmb938 avatar Mar 08 '19 17:03 rmb938

@rendhalver I'm currently maintaining dex-k8s-authenticator.

I'd like to help out with this - essentially we should remove the existing mintel dex helm chart that is currently here and contribute to the official one.

Some differences I've spotted in the charts are:

  • Support for nodeSelector/toleration/affinity (could just raise a case on the official dex chart repo to support this if not already).
  • Some differences in how we manage tls certs (end result should be the same though).

I've created a case for this here: https://github.com/mintel/dex-k8s-authenticator/issues/73

I can spend time (after next week) to progress this.

Regarding getting dex-k8s-authenticator into the official helm-charts, I'll take a look at the contributing guide and make sure we're following the guidelines. :+1:

nabadger avatar Mar 22 '19 08:03 nabadger

Sure @nabadger. Ping my on Kube slack and we can work something out.

rendhalver avatar Mar 22 '19 15:03 rendhalver

@rendhalver great will do - I'll be away for a week, so will get in touch soon. Thanks again

nabadger avatar Mar 22 '19 17:03 nabadger

Cheers people. I haven't done much more with the helm charts I made because I have been using EKS more and they block the use of OIDC, you have to use AWS IAM 😢. Though there is a request to try and allow OIDC on EKS so I can use dex+dex-k8s-authenticator again. 🙏

whereisaaron avatar Mar 22 '19 18:03 whereisaaron

It would be nice to try and make this an operator

christianh814 avatar Mar 22 '19 18:03 christianh814

Hello everyone,

I'm doing a project to administer a kubernetes cluster from scratch using kubeadm. I would like to use dex and dex_k8s_autheticator for authentication on my api server. Can this documentation still be implemented in a kubernetes cluster?

michaelRanivoEpitech avatar Jun 28 '24 08:06 michaelRanivoEpitech