kubeasz一键部署k8s集群

下载程序

部署说明

部署文档

powershell 复制代码
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
相关推荐
年薪丰厚15 分钟前
如何在K8S集群中查看和操作Pod内的文件?
docker·云原生·容器·kubernetes·k8s·container
zhangj112516 分钟前
K8S Ingress 服务配置步骤说明
云原生·容器·kubernetes
岁月变迁呀18 分钟前
kubeadm搭建k8s集群
云原生·容器·kubernetes
墨水\\18 分钟前
二进制部署k8s
云原生·容器·kubernetes
Source、19 分钟前
k8s-metrics-server
云原生·容器·kubernetes
上海运维Q先生20 分钟前
面试题整理15----K8s常见的网络插件有哪些
运维·网络·kubernetes
颜淡慕潇24 分钟前
【K8S问题系列 |19 】如何解决 Pod 无法挂载 PVC问题
后端·云原生·容器·kubernetes
ProtonBase30 分钟前
如何从 0 到 1 ,打造全新一代分布式数据架构
java·网络·数据库·数据仓库·分布式·云原生·架构
大熊程序猿3 小时前
K8s证书过期
云原生·容器·kubernetes
摸鱼也很难6 小时前
Docker 镜像加速和配置的分享 && 云服务器搭建beef-xss
运维·docker·容器