forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubelet-kubeconfig
39 lines (39 loc) · 990 Bytes
/
kubelet-kubeconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
apiVersion: v1
kind: Config
clusters:
- cluster:
{{#if settings.kubernetes.api-server}}
certificate-authority: "/etc/kubernetes/pki/ca.crt"
server: "{{settings.kubernetes.api-server}}"
{{/if}}
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: kubelet
name: kubelet
current-context: kubelet
users:
- name: kubelet
{{#if (eq settings.kubernetes.authentication-mode "aws")}}
{{#if settings.kubernetes.cluster-name}}
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: "/usr/bin/aws-iam-authenticator"
args:
- token
- "-i"
- "{{settings.kubernetes.cluster-name}}"
{{#if settings.aws.region}}
- "--region"
- "{{settings.aws.region}}"
{{/if}}
{{/if}}
{{/if}}
{{#if (eq settings.kubernetes.authentication-mode "tls")}}
user:
client-certificate: "/var/lib/kubelet/pki/kubelet-client-current.pem"
client-key: "/var/lib/kubelet/pki/kubelet-client-current.pem"
{{/if}}