一、kube-scheduler组件部署
### --- kube-scheduler
~~~ 所有Master节点配置kube-scheduler service
二、创建kube-scheduler配置文件
### --- 创建kube-scheduler配置文件
[root@k8s-master01 ~]# vim /usr/lib/systemd/system/kube-scheduler.service
[Unit]
Description=Kubernetes Scheduler
Documentation=https://github.com/kubernetes/kubernetes
After=network.target
[Service]
ExecStart=/usr/local/bin/kube-scheduler \
--v=2 \
--logtostderr=true \
--address=127.0.0.1 \
--leader-elect=true \
--kubeconfig=/etc/kubernetes/scheduler.kubeconfig
Restart=always
RestartSec=10s
[Install]
WantedBy=multi-user.target
三、启动并查看状态
### --- 启动kube-scheduler
[root@k8s-master01 ~]# systemctl daemon-reload
[root@k8s-master01 ~]# systemctl enable --now kube-scheduler
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-scheduler.service to /usr/lib/systemd/system/kube-scheduler.service.
### --- 查看kube-scheduler状态
[root@k8s-master01 ~]# systemctl status kube-scheduler
Active: active (running) since Wed 2021-05-12 20:37:43 CST; 7s ago