码迷,mamicode.com
首页 > 其他好文 > 详细

二进制部署K8s集群第8节Master节点之kube-scheduler集群部署

时间:2020-10-05 21:45:12      阅读:22      评论:0      收藏:0      [点我收藏+]

标签:ecs   pid   before   stat   scheduler   检查   stderr   集群部署   none   

上一章:二进制部署K8s集群第7节Master节点之kube-apiserver集群部署
架构图
技术图片
目录
1、本节架构
2、创建启动脚本
3、创建supervisor配置
4、启动服务并检查

1、本节架构
技术图片

2、创建启动脚本

cat > /opt/kubernetes/server/bin/kube-scheduler.sh <<eof
#!/bin/sh
./kube-scheduler   --leader-elect    --log-dir /data/logs/kubernetes/kube-scheduler   --master http://127.0.0.1:8080   --v 2
eof
chmod +x  /opt/kubernetes/server/bin/kube-scheduler.sh
mkdir -p /data/logs/kubernetes/kube-scheduler

3、创建supervisor配置

cat > /etc/supervisord.d/kube-scheduler.ini <<eof
[program:kube-scheduler-7-21]
command=/opt/kubernetes/server/bin/kube-scheduler.sh                     ; the program (relative uses PATH, can take args)
numprocs=1                                                               ; number of processes copies to start (def 1)
directory=/opt/kubernetes/server/bin                                     ; directory to cwd to before exec (def no cwd)
autostart=true                                                           ; start at supervisord start (default: true)
autorestart=true                                                         ; retstart at unexpected quit (default: true)
startsecs=30                                                             ; number of secs prog must stay running (def. 1)
startretries=3                                                           ; max # of serial start failures (default 3)
exitcodes=0,2                                                            ; ‘expected‘ exit codes for process (default 0,2)
stopsignal=QUIT                                                          ; signal used to kill process (default TERM)
stopwaitsecs=10                                                          ; max num secs to wait b4 SIGKILL (default 10)
user=root                                                                ; setuid to this UNIX account to run the program
redirect_stderr=true                                                     ; redirect proc stderr to stdout (default false)
stdout_logfile=/data/logs/kubernetes/kube-scheduler/scheduler.stdout.log ; stderr log path, NONE for none; default AUTO
stdout_logfile_maxbytes=64MB                                             ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=4                                                 ; # of stdout logfile backups (default 10)
stdout_capture_maxbytes=1MB                                              ; number of bytes in ‘capturemode‘ (default 0)
stdout_events_enabled=false                                              ; emit events on stdout writes (default false)
eof

技术图片

4、启动服务并检查

supervisorctl update
supervisorctl status
etcd-server-7-21                 RUNNING   pid 12115, uptime 12:52:08
kube-apiserver-7-21              RUNNING   pid 12981, uptime 1:27:27
kube-scheduler-7-21              RUNNING   pid 14276, uptime 0:02:10
netstat -tulnp | grep kube-sch
tcp6       0      0 :::10259                :::*                    LISTEN      14559/./kube-schedu 
tcp6       0      0 :::10251                :::*                    LISTEN      14559/./kube-schedu 

下一章:二进制部署K8s集群第9节Master节点之controller-manager集群部署

二进制部署K8s集群第8节Master节点之kube-scheduler集群部署

标签:ecs   pid   before   stat   scheduler   检查   stderr   集群部署   none   

原文地址:https://blog.51cto.com/yht1990/2539604

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!