安装ansible
yum install -y ansible
查看ansible版本
ansible --version
运维主机目录
mkdir -p /opt/kubernetes \
/opt/kubernetes/etcd \
/opt/kubernetes/bin \
/opt/kubernetes/ssl \
/opt/kubernetes/ssl/ca \
/opt/kubernetes/ssl/etcd \
/opt/kubernetes/ssl/admin \
/opt/kubernetes/ssl/kube-apiserver \
/opt/kubernetes/ssl/kube-controller-manager \
/opt/kubernetes/ssl/kubelet \
/opt/kubernetes/ssl/kube-proxy \
/opt/kubernetes/ssl/kube-scheduler \
/opt/kubernetes/ssl/proxy-client \
/opt/kubernetes/ssl/calico \
/opt/kubernetes/config \
/opt/kubernetes/config/admin \
/opt/kubernetes/config/kube-controller-manager \
/opt/kubernetes/config/kube-scheduler \
/opt/kubernetes/config/kubelet \
/opt/kubernetes/config/kube-proxy \
/opt/kubernetes/yaml \
/opt/kubernetes/yaml/calico \
/opt/kubernetes/yaml/coredns \
/opt/kubernetes/yaml/traefik \
/opt/kubernetes/yaml/kuboard \
根据自己的服务器IP 修改hosts文件
根据ansible test.yaml 中进行一步一步安装
ansible-playbook test.yml