зеркало из https://github.com/Azure/aks-engine.git
57 строки
2.2 KiB
SYSTEMD
57 строки
2.2 KiB
SYSTEMD
[Unit]
|
|
Description=Kubelet
|
|
Requires=docker.service
|
|
After=docker.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
EnvironmentFile=/etc/default/kubelet
|
|
SuccessExitStatus=143
|
|
ExecStartPre=/bin/bash /opt/azure/containers/kubelet.sh
|
|
ExecStartPre=/bin/mkdir -p /var/lib/kubelet
|
|
ExecStartPre=/bin/bash -c "if [ $(mount | grep \"/var/lib/kubelet\" | wc -l) -le 0 ] ; then /bin/mount --bind /var/lib/kubelet /var/lib/kubelet ; fi"
|
|
ExecStartPre=/bin/mount --make-shared /var/lib/kubelet
|
|
# This is a partial workaround to this upstream Kubernetes issue:
|
|
# https://github.com/kubernetes/kubernetes/issues/41916#issuecomment-312428731
|
|
ExecStartPre=/sbin/sysctl -w net.ipv4.tcp_retries2=8
|
|
ExecStartPre=-/sbin/ebtables -t nat --list
|
|
ExecStartPre=-/sbin/iptables -t nat --list
|
|
ExecStart=/usr/bin/docker run \
|
|
--net=host \
|
|
--pid=host \
|
|
--privileged \
|
|
--rm \
|
|
--volume=/dev:/dev \
|
|
--volume=/sys:/sys:ro \
|
|
--volume=/var/run:/var/run:rw \
|
|
--volume=/var/lib/docker/:/var/lib/docker:rw \
|
|
--volume=/var/lib/kubelet/:/var/lib/kubelet:shared \
|
|
--volume=/var/log:/var/log:rw \
|
|
--volume=/etc/kubernetes/:/etc/kubernetes:ro \
|
|
--volume=/srv/kubernetes/:/srv/kubernetes:ro $DOCKER_OPTS \
|
|
--volume=/var/lib/waagent/ManagedIdentity-Settings:/var/lib/waagent/ManagedIdentity-Settings:ro \
|
|
${KUBELET_IMAGE} \
|
|
/hyperkube kubelet \
|
|
--kubeconfig=/var/lib/kubelet/kubeconfig \
|
|
--require-kubeconfig \
|
|
--pod-infra-container-image="${KUBELET_POD_INFRA_CONTAINER_IMAGE}" \
|
|
--address=0.0.0.0 \
|
|
--allow-privileged=true \
|
|
--enable-server \
|
|
--enable-debugging-handlers \
|
|
--pod-manifest-path=/etc/kubernetes/manifests \
|
|
--cluster-dns=${KUBELET_CLUSTER_DNS} \
|
|
--cluster-domain=cluster.local \
|
|
--register-schedulable=${KUBELET_REGISTER_SCHEDULABLE} \
|
|
--node-labels="${KUBELET_NODE_LABELS}" \
|
|
--cloud-provider=azure \
|
|
--cloud-config=/etc/kubernetes/azure.json \
|
|
--azure-container-registry-config=/etc/kubernetes/azure.json \
|
|
--hairpin-mode=promiscuous-bridge \
|
|
--network-plugin=${KUBELET_NETWORK_PLUGIN} \
|
|
--node-status-update-frequency=${KUBELET_NODE_STATUS_UPDATE_FREQUENCY} \
|
|
--v=2 ${KUBELET_FEATURE_GATES}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|