kubeasz一键部署k8s集群

下载程序

部署说明

部署文档

root@iZj6cd9joygowsf7am5hryZ:~# apt-get  update
root@iZj6cd9joygowsf7am5hryZ:~# apt-get  upgrade
root@iZj6cd9joygowsf7am5hryZ:~# export release=3.6.2
root@iZj6cd9joygowsf7am5hryZ:~# wget https://github.com/easzlab/kubeasz/releases/download/${release}/ezdown
root@iZj6cd9joygowsf7am5hryZ:~# chmod +x ./ezdown
root@iZj6cd9joygowsf7am5hryZ:~# ./ezdown
root@iZj6cd9joygowsf7am5hryZ:~# ./ezdown -D -m standard
root@iZj6cd9joygowsf7am5hryZ:~# cd /etc/kubeasz/
root@iZj6cd9joygowsf7am5hryZ:~# vim ansible.cfg 
root@iZj6cd9joygowsf7am5hryZ:~# ./ezdown -S
root@iZj6cd9joygowsf7am5hryZ:~# docker exec -it kubeasz ezctl new biking-test
root@iZj6cd9joygowsf7am5hryZ:~# cd /etc/kubeasz/clusters/biking-test/
root@iZj6cd9joygowsf7am5hryZ:~# vim config.yml 
# nfs部分根据自己的配置更改配置
***
# nfs-provisioner 自动安装
nfs_provisioner_install: "no"
nfs_provisioner_namespace: "kube-system"
nfs_provisioner_ver: "v4.0.2"
nfs_storage_class: "managed-nfs-storage"
nfs_server: "172.16.10.20"
nfs_path: "/data/nfs"
***
root@iZj6cd9joygowsf7am5hryZ:~# vim hosts 
***
# 'etcd' cluster should have odd member(s) (1,3,5,...)
[etcd]
172.16.10.202
172.16.10.203
172.16.10.204

# master node(s), set unique 'k8s_nodename' for each node
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
# and must start and end with an alphanumeric character
[kube_master]
172.16.10.200 k8s_nodename='biking-test-master'

# work node(s), set unique 'k8s_nodename' for each node
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
# and must start and end with an alphanumeric character
[kube_node]
172.16.10.202 k8s_nodename='biking-test-node01'
172.16.10.203 k8s_nodename='biking-test-node02'
172.16.10.204 k8s_nodename='biking-test-node03'
***
root@iZj6cd9joygowsf7am5hryZ:~# docker exec -it kubeasz ezctl setup biking-test all

你可能感兴趣的:(kubernetes,k8s,kubernetes,容器,云原生)