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

posted @ 2017-10-18 11:01  深空灰  阅读(4923)  评论(1编辑  收藏  举报