mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-10 09:56:34 +00:00
25 lines
539 B
Markdown
25 lines
539 B
Markdown
## Authenticated with the OpenID Connect Provider
|
|
|
|
You got the token with the following claims:
|
|
|
|
```
|
|
{{ .IDTokenPrettyJSON }}
|
|
```
|
|
|
|
## Set up the kubeconfig
|
|
|
|
You can run the following command to set up the kubeconfig:
|
|
|
|
```
|
|
kubectl config set-credentials oidc \
|
|
--exec-api-version=client.authentication.k8s.io/v1 \
|
|
--exec-interactive-mode=Never \
|
|
--exec-command=kubectl \
|
|
--exec-arg=oidc-login \
|
|
--exec-arg=get-token \
|
|
{{- range $index, $flag := .Flags }}
|
|
{{- if $index}} \{{end}}
|
|
--exec-arg={{ $flag | quote }}
|
|
{{- end }}
|
|
```
|