KubeZero/charts/kubeadm/templates/admin-kubectl.yaml

28 lines
672 B
YAML
Raw Normal View History

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