kubeadm offline installer
Release 始终无法上传成功,改用百度盘发布:
链接: https://pan.baidu.com/s/1ODiTjL4ECFDkr4nWEMPz6A
密码: nk58
- Kubernetes 1.11
- Calico 3.1.3 (Without ETCD)
- Docker-ce 18.03
- CoreDNS 1.1.3
没有好的完整的网络连接,Kubernetes 是很难搞的。
这里给出一个离线安装的 Release,尽量跟踪更新最新版本,给网络没那么方便的朋友们拿来玩。
Kubeadm 是一个很方便的搭建 Kubernetes 集群的方法。
每次部署一个新集群,按照官网文档一次一次的 cat xxx EOF
, yum install xxx
,非常低效,
所以我做了这个 Playbook。目前仅在 CentOS 7 Minimal 版本上运行测试过,并且可以在没有互联网的
情况完成部署。
不喜欢或者不会使用的朋友也可以在 Files 目录中找到所需要的镜像或 rpm 包。
用法
ansible-playbook -i hosts/hosts.sample -u root cluster.yml
- 需要 2.4.0 以上版本的 ansible,CentOS 7.x Minimal 版本。
- 从 Releases 页 下载和解压所需版本。
- 编写 Host 文件,分组方式可以参考
hosts/hosts.sample
。 group_vars/all
中有部分可以修改的变量。- 运行脚本。
/usr/local/bin
目录下会生成初始化和加入集群的脚本。/etc/kubernetes
目录中包含证书和配置文件。- 玩去吧您。
特点
- 离线、离线,还是离线。
- 支持不同设置的 lvm 设置。
- 包含了 Calico 网络插件。
Setup a cluster with kubeadm, without internet connections.
Can't upload release file to github for a few months. You can download new releases here:
Link: https://pan.baidu.com/s/1ODiTjL4ECFDkr4nWEMPz6A
Passcode: nk58
- Kubernetes v1.10.0
- Kubernetes 1.11
- Calico 3.1.3 (Without ETCD)
- Docker-ce 18.03
- CoreDNS 1.1.3
Kubeadm is a great way to set up a kubernetes cluster.
But every time I'm setting up a new cluster with it, I have to keep the internet
connection, and do something like
cat xxx EOF
, yum install xxx
, when kubeadm finished, I still have to copy
config file, ca certs and save the tokens. this is boring, so I composed this
playbook, working for minimal CentOS 7, can install a cluster without internet.
Usage
ansible-playbook -i hosts/hosts.sample -u root cluster.yml
- install ansible version >= 2.4.0,CentOS 7.x Minimal
- Download and extract bin package from Releases tab
- Write down ip in the hosts file, here is a sample in
hosts/hosts.sample
. - Change the variables in
group_vars/all
. - Run the playbook.
- You can find init/join script in
/usr/local/bin
. - Configuration files are stored in Master node's
/etc/kubernetes
- Enjoy it.
Features
- Offline.
- Support for different lvm configuration in CentOS.
- Calico plugins included.