kubernetes 阿里雲安裝(kubeadm方式)


注意:不能修改hostname
curl -sSL http://aliacs-k8s.oss-cn-hangzhou.aliyuncs.com/installer/kubemgr-1.6.1.sh >kubemgr-aliyun-1.6.1.sh
chmod +x kubemgr-aliyun-1.6.1.sh

master:
export ACCESS_KEY_ID=
export ACCESS_KEY_SECRET=
./kubemgr-aliyun-1.6.1.sh -s nice --node-type master --key-id ${ACCESS_KEY_ID} --key-secret ${ACCESS_KEY_SECRET}

node:
export ACCESS_KEY_ID=
export ACCESS_KEY_SECRET=


./kubemgr-aliyun-1.6.1.sh -s nice --node-type node --key-id ${ACCESS_KEY_ID} --key-secret ${ACCESS_KEY_SECRET} --token 3dc851.9cc9f65cf3191c47 --endpoint kubernetes.default.svc:6443
token 使用master最后打印出的(或者master執行kubeadm token list查看),endpoint使用master的ip


kubeadm join --skip-preflight-checks --token 3dc851.9cc9f65cf3191c47 kubernetes.default.svc:6443

 

卸載:
kubectl delete -f http://aliacs-k8s.oss-cn-hangzhou.aliyuncs.com/conf/ingress-controller-summary.yml

curl -sSL http://aliacs-k8s.oss-cn-hangzhou.aliyuncs.com/installer/kubemgr-1.6.1.sh \ | bash -s nice --node-type down


環境變量
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile
source /etc/profile


Created API client, waiting for the control plane to become ready
unable to connect to Rkt api service: rkt: cannot tcp Dial rkt api servic
修改了實例名字導致的


如果遇到不是同一個node上的pod與pod內無法訪問的問題,設置安全組
cni網卡ping不通,注意不能設置外網IP


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM