Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request kubernetes-retired#1118 from whereisaaron/patch-5
Browse files Browse the repository at this point in the history
Tidy up markdown
  • Loading branch information
mumoshu authored Jan 29, 2018
2 parents e5b6b99 + 41158d0 commit 0d26618
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions contrib/dex/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
## Configure Dex as a custom provider in cluster.yaml

Example:

```
oidc:
enabled: true
issuerUrl: "https://dex.example.com"
clientId: "example-app"
usernameClaim: "email"
groupsClaim: "groups"

```

## Deploy Dex

1. Edit the configMap `contrib/dex/dex.cm.yaml` according to your setup. By default only the GitHub provider and static clients are enabled.
If you have a different setup, please check [Dex's documentation](https://github.com/coreos/dex/tree/master/Documentation)

2. Create a secret containing your [GitHub OAuth2 client credentials](https://github.com/settings/applications/new)

```
kubectl create secret \
generic github-client \
--from-literal=client-id=$GITHUB_CLIENT_ID \
--from-literal=client-secret=$GITHUB_CLIENT_SECRET

```
3. Deploy Dex: `kubectl apply -f contrib/dex/dex.de.yaml`

**Deploy Dex using Helm**
Expand All @@ -45,11 +45,11 @@ Examples are provided in `contrib/dex/elb` directory.
An example that works with [nginx-controller](https://github.com/nginxinc/kubernetes-ingress/tree/master/nginx-controller) + [kube-lego](https://github.com/jetstack/kube-lego) is provided in `contrib/dex/ingress`.


##Configure `kubectl` for token authentication
## Configure `kubectl` for token authentication

* `kubectl` config using command line example:


```
kubectl config set-credentials [email protected] \
--auth-provider=oidc \
--auth-provider-arg=idp-issuer-url=https://dex.example.com \
Expand All @@ -59,10 +59,11 @@ An example that works with [nginx-controller](https://github.com/nginxinc/kubern
--auth-provider-arg=idp-certificate-authority=/etc/kubernetes/ssl/ca.pem \
--auth-provider-arg=id-token=id_token \
--auth-provider-arg=extra-scopes=groups
```

* `kubectl` config file example:


```
apiVersion: v1
clusters:
- cluster:
Expand Down Expand Up @@ -90,4 +91,4 @@ An example that works with [nginx-controller](https://github.com/nginxinc/kubern
idp-issuer-url: https://dex.example.com
refresh-token: refresh_token
name: oidc
```

0 comments on commit 0d26618

Please sign in to comment.