forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# IPVS 服务负载均衡 | ||
|
||
kube-proxy 组件监听 API server 中 service 和 endpoint 的变化情况,从而为 k8s 集群内部的 service 提供动态负载均衡。在v1.10之前主要通过 iptables来实现,是稳定、推荐的方式,但是当服务多的时候会产生太多的 iptables 规则,大规模情况下有明显的性能问题;在v1.11 GA的 ipvs高性能负载模式,采用增量式更新,并可以保证 service 更新期间连接的保持。 | ||
|
||
## 启用 ipvs | ||
|
||
k8s v1.11 版本启用 ipvs 十分方便,只要在 kube-proxy 启动参数(或者配置文件中)中增加 `--proxy-mode=ipvs`: | ||
|
||
``` bash | ||
[Unit] | ||
Description=Kubernetes Kube-Proxy Server | ||
After=network.target | ||
|
||
[Service] | ||
WorkingDirectory=/var/lib/kube-proxy | ||
ExecStart=/opt/kube/bin/kube-proxy \ | ||
--bind-address={{ NODE_IP }} \ | ||
--hostname-override={{ NODE_IP }} \ | ||
--kubeconfig=/etc/kubernetes/kube-proxy.kubeconfig \ | ||
--logtostderr=true \ | ||
--proxy-mode=ipvs | ||
Restart=on-failure | ||
RestartSec=5 | ||
LimitNOFILE=65536 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
|
||
目前 kubeasz 0.2.2 支持两种方式集成使用 ipvs:一种是使用kube-proxy 自带的ipvs 实现;另一种是使用 kube-router网络插件带的ipvs service-proxy; | ||
|
||
- v1.11, v1.10 版本启用 kube-proxy的 ipvs 模式:只需要在 `roles/kube-node/defaults/main.yml` 配置 `PROXY_MODE: "ipvs"` | ||
- 启用 kube-router 的 ipvs service-proxy:需在 ansible hosts 配置选择 `CLUSTER_NETWORK="kube-router"`;另外在 `roles/kube-router/defaults/main.yml` 配置 `SERVICE_PROXY: "true"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## kubeasz-0.2.2 发布说明 | ||
|
||
CHANGELOG: | ||
- 组件更新: | ||
- k8s v1.11.0 | ||
- etcd v3.3.8 | ||
- docker 18.03.1-ce | ||
- 功能更新: | ||
- 更新使用ipvs 配置及[说明文档](https://github.com/gjmzj/kubeasz/blob/master/docs/guide/ipvs.md) | ||
- 更新lb节点keepalived使用单播发送vrrp报文,预期兼容公有云上自建LB(待测试) | ||
- 废弃原 ansible hosts 中变量SERVICE_PROXY | ||
- 更新haproxy负载均衡算法配置 | ||
- 其他修复: | ||
- fix 变更集群网络的脚本和[文档](https://github.com/gjmzj/kubeasz/blob/master/docs/op/change_k8s_network.md) | ||
- fix 脚本99.clean.yml清理环境变量 | ||
- fix metrics-server允许的client cert问题 | ||
- fix #242: 添加CA有效期参数,设定CA有效期为15年(131400h) (#245) | ||
- fix helm安装出现Error: transport is closing (#248) | ||
- fix harbor点击tag界面出现\"发生未知错误,请稍后再试" (#250) | ||
- fix 脚本99.clean.yml清理 services softlink (#253) | ||
- fix kube-apiserver-v1.8 使用真实数量的 apiserver-count (#254) | ||
- fix 清理ipvs产生的网络接口 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters