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.shnode

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}api

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的ipbash


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

 

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

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


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


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
修改了實例名字致使的token


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

相關文章
相關標籤/搜索