-
Notifications
You must be signed in to change notification settings - Fork 509
Expand file tree
/
Copy pathkubelet.service.yaml
More file actions
52 lines (48 loc) · 1.94 KB
/
Copy pathkubelet.service.yaml
File metadata and controls
52 lines (48 loc) · 1.94 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: kubelet.service
enabled: true
contents: |
[Unit]
Description=Kubernetes Kubelet
Requires=crio.service kubelet-dependencies.target
After=kubelet-dependencies.target
After=ostree-finalize-staged.service
[Service]
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/mkdir --parents /etc/openshift/kubelet.conf.d
ExecStartPre=-/usr/sbin/restorecon -ri /var/lib/kubelet/pod-resources /usr/local/bin/kubenswrapper /usr/bin/kubensenter
{{- if or (eq .IPFamilies "IPv6") (eq .IPFamilies "DualStackIPv6Primary") }}
Environment="KUBELET_NODE_IP=::"
Environment="KUBELET_NODE_IPS=::"
{{- else}}
Environment="KUBELET_NODE_IP=0.0.0.0"
Environment="KUBELET_NODE_IPS=0.0.0.0"
{{- end}}
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env
ExecStart=/usr/local/bin/kubenswrapper \
/usr/bin/kubelet \
--config=/etc/kubernetes/kubelet.conf \
--config-dir=/etc/openshift/kubelet.conf.d \
--bootstrap-kubeconfig=/etc/kubernetes/kubeconfig \
--kubeconfig=/var/lib/kubelet/kubeconfig \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--runtime-cgroups=/system.slice/crio.service \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=${ID},${CUSTOM_KUBELET_LABELS} \
{{- if or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary") }}
--node-ip=${KUBELET_NODE_IPS} \
{{- else}}
--node-ip=${KUBELET_NODE_IP} \
{{- end}}
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--cloud-provider={{cloudProvider .}} \
{{credentialProviderConfigFlag . }} \
--hostname-override=${KUBELET_NODE_NAME} \
--provider-id=${KUBELET_PROVIDERID} \
--v=${KUBELET_LOG_LEVEL}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target