Created
February 9, 2022 12:32
-
-
Save abarrak/84752c698fa27403a2293026860f7b04 to your computer and use it in GitHub Desktop.
A .kube config file for auto authentication to Kubernetes Cluster using OIDC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
clusters: | |
- cluster: | |
server: https://my-cluster.net | |
name: cluster-net | |
contexts: | |
- context: | |
cluster: my-cluster.net | |
user: oidc | |
name: cluster-user | |
current-context: cluster-user | |
kind: Config | |
preferences: {} | |
users: | |
- name: oidc | |
user: | |
exec: | |
apiVersion: client.authentication.k8s.io/v1beta1 | |
args: | |
- get-token | |
- --oidc-issuer-url=<oidc-issuer-url>/auth/realms/<REALM> | |
- --oidc-client-id=kube-apiserver | |
- --oidc-client-secret=<OIDC-CLIENT-SECRET> | |
command: kubelogin | |
env: null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment