K8S集群安装部署controller-manag的步骤
本篇内容主要讲解“K8S集群安装部署controller-manag的步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“K8S集群安装部署controller-manag的步骤”吧!
公司专注于为企业提供成都网站建设、成都网站制作、微信公众号开发、商城开发,小程序开发,软件按需制作网站等一站式互联网企业服务。凭借多年丰富的经验,我们会仔细了解各客户的需求而做出多方面的分析、设计、整合,为客户设计出具风格及创意性的商业解决方案,成都创新互联公司更提供一系列网站制作和网站推广的服务。
一、在两个nodes节点上安装controller-manager服务
# 221/222机器: bin]# vi /opt/kubernetes/server/bin/kube-controller-manager.sh #!/bin/sh ./kube-controller-manager \ --cluster-cidr 172.7.0.0/16 \ --leader-elect true \ --log-dir /data/logs/kubernetes/kube-controller-manager \ --master http://127.0.0.1:8080 \ --service-account-private-key-file ./cert/ca-key.pem \ --service-cluster-ip-range 192.168.0.0/16 \ --root-ca-file ./cert/ca.pem \ --v 2 bin]# chmod +x /opt/kubernetes/server/bin/kube-controller-manager.sh bin]# mkdir -p /data/logs/kubernetes/kube-controller-manager # 注意22机器,下面要改成7-22,一处修改 bin]# vi /etc/supervisord.d/kube-conntroller-manager.ini [program:kube-controller-manager-7-21] command=/opt/kubernetes/server/bin/kube-controller-manager.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-controller-manager/controller.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) bin]# supervisorctl update [root@test-nodes1 etcd]# supervisorctl status |grep kube-controller-manager kube-controller-manager-7-21 RUNNING pid 14868, uptime 1 day, 1:53:42 [root@test-nodes1 etcd]# netstat -tlunp | grep kube-contro tcp6 0 0 :::10252 :::* LISTEN 14869/./kube-contro tcp6 0 0 :::10257 :::* LISTEN 14869/./kube-contro
到此,相信大家对“K8S集群安装部署controller-manag的步骤”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
网页标题:K8S集群安装部署controller-manag的步骤
文章位置:http://myzitong.com/article/jdghoo.html