KubeZero/charts/kubeadm/templates/admin-aws-iam.yaml

28 lines
726 B
YAML
Raw Permalink Normal View History

2021-12-01 12:33:11 +00:00
{{- if .Values.api.awsIamAuth.enabled }}
apiVersion: v1
kind: Config
clusters:
- cluster:
2021-05-28 15:16:36 +00:00
server: https://{{ .Values.api.endpoint }}
name: {{ .Values.global.clusterName }}
contexts:
- context:
cluster: {{ .Values.global.clusterName }}
user: kubernetes-admin
name: kubernetes-admin@{{ .Values.global.clusterName }}
current-context: kubernetes-admin@{{ .Values.global.clusterName }}
preferences: {}
users:
- name: kubernetes-admin
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "{{ .Values.global.clusterName }}"
- "-r"
2021-12-01 12:33:11 +00:00
- "{{ .Values.api.awsIamAuth.kubeAdminRole }}"
{{- end }}