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
相关推荐
A ?Charis2 小时前
Gitlab-runner running on Kubernetes - hostAliases
容器·kubernetes·gitlab
wclass-zhengge2 小时前
Docker篇(Docker Compose)
运维·docker·容器
茶馆大橘2 小时前
微服务系列五:避免雪崩问题的限流、隔离、熔断措施
java·jmeter·spring cloud·微服务·云原生·架构·sentinel
北漂IT民工_程序员_ZG3 小时前
k8s集群安装(minikube)
云原生·容器·kubernetes
coding侠客3 小时前
揭秘!微服务架构下,Apollo 配置中心凭啥扮演关键角色?
微服务·云原生·架构
梦魇梦狸º6 小时前
腾讯轻量云服务器docker拉取不到镜像的问题:拉取超时
docker·容器·github
南猿北者8 小时前
docker镜像仓库常用命令
运维·docker·容器
2301_806131369 小时前
Kubernetes的基本构建块和最小可调度单元pod-0
云原生·容器·kubernetes
SilentCodeY10 小时前
containerd配置私有仓库registry
容器·kubernetes·containerd·镜像·crictl
微刻时光10 小时前
Docker镜像分成
java·运维·开发语言·docker·容器·镜像