infrastructure/k8s.tjo.cloud/kubeconfig.tftpl

27 lines
583 B
Text
Raw Normal View History

2024-08-04 17:50:50 +00:00
apiVersion: v1
kind: Config
clusters:
- name: ${cluster.name}
cluster:
server: ${cluster.endpoint}
certificate-authority-data: ${cluster.ca}
contexts:
- name: oidc@${cluster.name}
context:
cluster: ${cluster.name}
namespace: default
user: oidc
current-context: oidc@${cluster.name}
users:
- name: oidc
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: kubectl
args:
- oidc-login
- get-token
- --oidc-issuer-url=${oidc.issuer}
- --oidc-client-id=${oidc.id}
- --oidc-extra-scope=profile