此项目包含大文件,故需安装git lfs,参考:https://git-lfs.github.com/
git clone [email protected]:yonyoucloud/install_k8s.git
cd install_k8s
git lfs pull # 下载大文件
也可以直接从百度网盘下载安装包: 链接: https://pan.baidu.com/s/1pLdsbhD 密码: cq28
注意: 下载下来的压缩包336M, 解压后大小1.2G; git clone下来目录大概2.3G, 需要注意大小, 确保大文件二进制文件及镜像文件都在
本安装包,运行在centos7上,包含的服务有:
etcd集群
kubernets master集群
kubernets node集群
flannel 网络
docker 私有镜像仓库
ipvsadm(lvs) 负载均衡
bind 私有dns服务,方便内网域名拦截解析
镜像服务包括:
kube-dns
kubernetes-dashboard k8s UI
heapster 监控
测试例子微服务(golang写的一个小的输出服务):
web_test
第一步, 说明:
└── install_k8s 安装包
├── fabfile.py 基于fabric实现自动化安装k8s集群脚本
├── install.sh 安装shell脚本,里面会调用fabfile.py中函数
├── README 说明文件
├── source 源文件目录,也包括配置
└── ssh 直连容器需要的秘钥
└── uninstall.sh 卸载脚本
第二步, 修改fabfile.py文件中主机登录密码及安装目的主机地址:
注意: 整个集群支持安装到一台主机上面, 需要注意vip要在同一网段, 且etcd和master的vip必须不同
特别注意三项:
1、修改脚本中的主机密码信息
2、修改脚本中的主机地址信息
3、确保系统是centos7,并且网口名字是eth0
编辑脚本配置信息, vim fabfile.py:
env.user = 'root'
env.password = '123456' # 注意这里需要修改服务器密码,集群密码要统一,也可以用下面秘钥文件的方式
#env.key_filename = "~/.ssh/id_rsa"
env.port = 22
env.abort_on_prompts = True
env.colors = True
env.roledefs = {
# 次发布脚本运行主机,需要把地址加到master证书,否则后面执行kubectl认证不通过,此机可做发布机用
'publish': {
'hosts': [
'10.211.55.25:22',
],
},
# etcd节点安装主机(支持集群)
'etcd': {
'hosts': [
'10.211.55.25:22',
],
# 负载均衡etcd入口ip(虚ip)
'vip': '10.211.55.201'
},
# master节点安装主机(支持集群)
'master': {
'hosts': [
'10.211.55.25:22',
],
# 负载均衡master入口ip(虚ip)
'vip': '10.211.55.202'
},
# node节点安装主机(支持集群)
'node': {
'hosts': [
'10.211.55.25:22',
]
},
# lvs负载均衡安装主机(暂不支持集群)
'lvs': {
'hosts': [
'10.211.55.25:22',
]
},
# 私有docker镜像仓库安装主机(暂不支持集群)
'pridocker': {
'hosts': [
'10.211.55.25:22',
]
},
# 私有dns服务器安装主机(暂不支持集群)
'pridns': {
'hosts': [
'10.211.55.25:22',
]
},
第三步:
只需执行install.sh文件
cd install_k8s
./install.sh
install_k8s's Introduction
install_k8s's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.