kubeasz/roles/kube-node/templates/kubelet.service.j2

37 lines
1.1 KiB
Plaintext
Raw Normal View History

2017-11-11 19:14:21 +08:00
[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.service
Requires=docker.service
[Service]
WorkingDirectory=/var/lib/kubelet
ExecStart={{ bin_dir }}/kubelet \
--address={{ inventory_hostname }} \
2018-09-11 20:46:46 +08:00
--allow-privileged=true \
--anonymous-auth=false \
--authentication-token-webhook \
--authorization-mode=Webhook \
2018-05-17 22:51:15 +08:00
--client-ca-file={{ ca_dir }}/ca.pem \
2017-11-11 19:14:21 +08:00
--cluster-dns={{ CLUSTER_DNS_SVC_IP }} \
--cluster-domain={{ CLUSTER_DNS_DOMAIN }} \
2018-09-11 20:46:46 +08:00
--cni-bin-dir={{ bin_dir }} \
--cni-conf-dir=/etc/cni/net.d \
--fail-swap-on=false \
2018-09-11 20:46:46 +08:00
--hairpin-mode hairpin-veth \
--hostname-override={{ inventory_hostname }} \
--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
--max-pods={{ MAX_PODS }} \
--network-plugin=cni \
--pod-infra-container-image={{ SANDBOX_IMAGE }} \
2018-09-11 20:46:46 +08:00
--register-node=true \
2018-08-29 22:16:50 +08:00
--root-dir={{ KUBELET_ROOT_DIR }} \
2018-09-11 20:46:46 +08:00
--tls-cert-file={{ ca_dir }}/kubelet.pem \
--tls-private-key-file={{ ca_dir }}/kubelet-key.pem \
2017-11-11 19:14:21 +08:00
--v=2
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target