一、在master上安裝apiserver元件:
1、編寫apiserver指令碼:
vim /root/scripts/apiserver.sh
#!/bin/bash
#編寫apiserver配置檔案
2、執行指令碼:
sh /root/scripts/apiserver.sh
二、在master上安裝controller-manager元件:
1、編寫controller-manager指令碼:
vim /root/scripts/controller-manager.sh
#!/bin/bash
master_address=$
cat cat [service]
environmentfile=-/opt/kubernetes/cfg/kube-controller-manager
execstart=/opt/kubernetes/bin/kube-controller-manager $kube_controller_manager_opts
restart=on-failure
[install]
wantedby=multi-user.target
eofsystemctl daemon-reload
systemctl restart kube-controller-manager
systemctl enable kube-controller-manager
2、執行controller-manager指令碼:
sh /root/scripts/controller-manager.sh
三、在master上安裝scheduler元件:
1、編寫scheduler指令碼:
vim /root/scripts/scheduler.sh
#!/bin/bash
master_address=$
cat cat [service]
environmentfile=-/opt/kubernetes/cfg/kube-scheduler
execstart=/opt/kubernetes/bin/kube-scheduler $kube_scheduler_opts
restart=on-failure
[install]
wantedby=multi-user.target
eofsystemctl daemon-reload
systemctl restart kube-scheduler
systemctl enable kube-scheduler
2、執行scheduler指令碼:
sh /root/scripts/scheduler.sh
二進位制安裝K8S(四) 部署flannel網路
執行指令碼 sh root scripts flannel.sh 檢視新增的子網 如果返回error 100 key not found coreos.com 11 則代表沒有設定網路 二 node節點編寫flannel指令碼 三颱node節點指令碼內容相同 vim root scripts fla...
二進位制部署K8s集群 二 docker部署
etcd集群部署 proxy cd web site vim hostlist docker2 192.168.1.40 42 docker3 192.168.1.39 42 vim ansible.cfg cat ansible.cfg grep v grep v defaults invento...
二進位制安裝K8S(三) 部署Etcd資料庫集群
list item 一 master節點上部署etcd 1 編寫指令碼 vim root scripts etcd master install.sh bin bash master ip cat etc hosts grep master awk node01 ip cat etc hosts g...