在auto_k8s_2019-04-13目录下,执行脚本editimage_ubuntu.sh,完成私有化定制修改
~~~
bash -x editimage_ubuntu.sh
~~~
在auto_k8s_2019-04-13目录下,初始化集群参数hosst.ini、all.yml、k8s-cluster.yml
~~~
ansible-playbook -i inventory/sinux_ubuntu/hosts.ini --become --become-user=root cluster.yml -vvv
~~~
污染策略删除
~~~
kubectl taint node --all node.cloudprovider.kubernetes.io/uninitialized:NoSchedule-
~~~
检查集群是否部署成功,登录master01,运行以下命令查看所有pod是否为running
~~~
kubectl get pod -n kube-system
~~~
启动 Nginx 支持TCP
~~~
kubectl run nginx --image=nginx --port=80
~~~
拓展node节点:添加新的node到hosts.ini分组,运行scale.yml
~~~
ansible-playbook -i inventory/sinux/hosts.ini scale.yml -b -v
~~~