### 创建 Service
```
vi /usr/lib/systemd/system/kubelet.service
[Unit]
Description=Kubernetes Kubelet
After=docker.service
Requires=docker.service
[Service]
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) \
/usr/local/bin/kubelet \
--kubeconfig='/opt/k8s/config' \
--address='0.0.0.0' \
--node-ip='10.10.10.231' \
--hostname-override='10.10.10.231' \
--cluster-dns='10.253.0.2' \
--cluster-domain='cbxhome.local' \
--tls-cert-file='/opt/ssl/k8s/k8s_server.pem' \
--tls-private-key-file='/opt/ssl/k8s/k8s_server-key.pem' \
--runtime-cgroups='/systemd/system.slice' \
--kubelet-cgroups='/systemd/system.slice' \
--logtostderr=true \
--v=2 \
"
Restart=on-failure
KillMode=process
RestartSec=15s
[Install]
WantedBy=multi-user.target
```
*****
### 启动及创建自启动服务
```
systemctl daemon-reload
systemctl start kubelet && systemctl enable kubelet
```