Skip to content

Commit

Permalink
minor 文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Jun 23, 2018
1 parent 211ffb7 commit 2662384
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/00-集群规划和基础参数设定.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

### 1.基础系统配置

+ 推荐内存2G/硬盘20G以上
+ 推荐内存2G/硬盘30G以上
+ 最小化安装`Ubuntu 16.04 server`或者`CentOS 7 Minimal`
+ 配置基础网络、更新源、SSH登陆等

Expand Down
2 changes: 1 addition & 1 deletion docs/02-安装etcd集群.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ https://192.168.1.3:2379 is healthy: successfully committed proposal: took = 3.2
三台 etcd 的输出均为 healthy 时表示集群服务正常。


[前一篇](01-创建CA证书和环境配置.md) -- [后一篇](04-安装docker服务.md)
[前一篇](01-创建CA证书和环境配置.md) -- [后一篇](03-安装docker服务.md)
2 changes: 1 addition & 1 deletion docs/03-安装docker服务.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ iptables-save|grep FORWARD
-A FORWARD -j ACCEPT
```

[前一篇](02-安装etcd集群.md) -- [后一篇](05-安装kube-master节点.md)
[前一篇](02-安装etcd集群.md) -- [后一篇](04-安装kube-master节点.md)
2 changes: 1 addition & 1 deletion docs/04-安装kube-master节点.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ etcd-2 Healthy {"health": "true"}
etcd-1 Healthy {"health": "true"}
```

[前一篇](04-安装docker服务.md) -- [后一篇](06-安装kube-node节点.md)
[前一篇](03-安装docker服务.md) -- [后一篇](05-安装kube-node节点.md)
2 changes: 1 addition & 1 deletion docs/05-安装kube-node节点.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ NAME STATUS ROLES AGE VERSION
```


[前一篇](05-安装kube-master节点.md) -- [后一篇](07-安装calico网络组件.md)
[前一篇](04-安装kube-master节点.md) -- [后一篇](06-安装网络组件.md)
3 changes: 3 additions & 0 deletions docs/06-安装网络组件.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ Kubernetes Pod的网络是这样创建的:
### 参考
- [kubernetes.io networking docs](https://kubernetes.io/docs/concepts/cluster-administration/networking/)
- [feiskyer-kubernetes指南网络章节](https://github.com/feiskyer/kubernetes-handbook/blob/master/zh/network/network.md)


[前一篇](05-安装kube-node节点.md) -- [后一篇](07-安装集群插件.md)
4 changes: 4 additions & 0 deletions docs/07-安装集群插件.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
- 1.根据hosts文件中配置的`CLUSTER_DNS_SVC_IP` `CLUSTER_DNS_DOMAIN`等参数生成kubedns.yaml和coredns.yaml文件
- 2.注册变量pod_info,pod_info用来判断现有集群是否已经运行各种插件
- 3.根据pod_info和[配置开关](../roles/cluster-addon/defaults/main.yml)逐个进行/跳过插件安装



[前一篇](06-安装网络组件.md) --
1 change: 0 additions & 1 deletion docs/guide/dashboard.1.6.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ subjects:
+ 由于还未部署 Heapster 插件,当前 dashboard 不能展示 Pod、Nodes 的 CPU、内存等 metric 图形,后续部署 heapster后自然能够看到
+ 本文中的权限设置仅供演示用,生产环境请在此基础上修改成适合你安全需求的方式

[前一篇](kubedns.md) -- [目录](index.md) -- [后一篇](heapster.md)
1 change: 0 additions & 1 deletion docs/guide/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,3 @@ subjects:
+ 由于还未部署 Heapster 插件,当前 dashboard 不能展示 Pod、Nodes 的 CPU、内存等 metric 图形,后续部署 heapster后自然能够看到
+ 本文中的权限设置仅供演示用,生产环境请在此基础上修改成适合你安全需求的方式

[前一篇](kubedns.md) -- [目录](index.md) -- [后一篇](heapster.md)
1 change: 0 additions & 1 deletion docs/guide/efk.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,3 @@ kube-system-elasticsearch-logging-elasticsearch-logging-1-pvc-5b105ee6-358b-11e8
1. [storage-classes](https://kubernetes.io/docs/concepts/storage/storage-classes/)


[前一篇](ingress.md) -- [目录](index.md) -- [后一篇](harbor.md)
3 changes: 1 addition & 2 deletions docs/guide/harbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,4 @@ docker run -it --rm -e DB_USR=root -e DB_PWD=xxxx -v /data/database:/var/lib/mys
cd /data/harbor
vi harbor.cfg
./install.sh

[前一篇]() -- [目录](index.md) -- [后一篇]()
```
1 change: 0 additions & 1 deletion docs/guide/heapster.1.4.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ monitoring-influxdb NodePort 10.68.195.193 <none> 8086:3382/TCP,8
![influxdb](../../pics/influxdb.png)


[前一篇](dashboard.md) -- [目录](index.md) -- [后一篇](ingress.md)
1 change: 0 additions & 1 deletion docs/guide/heapster.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,3 @@ kubectl create -f /etc/ansible/manifests/heapster/influxdb-with-pv/influxdb.yaml
```


[前一篇](dashboard.md) -- [目录](index.md) -- [后一篇](ingress.md)
2 changes: 1 addition & 1 deletion docs/guide/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ $ ansible-playbook /etc/ansible/roles/helm/helm.yml

## 使用helm安装应用到k8s上


请阅读本项目文档[helm安装prometheus监控](prometheus.md)
1 change: 1 addition & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- 安装 [kubedns](kubedns.md)
- 安装 [dashboard](dashboard.md)
- 安装 [metrics-server](metrics-server.md)
- 安装 [heapster](heapster.md)
- 安装 [ingress](ingress.md)
- 安装 [efk](efk.md)
Expand Down
1 change: 0 additions & 1 deletion docs/guide/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,3 @@ listen kube-node
打开浏览器输入域名 `http://hello.test.com``http://traefik-ui.test.com`可以正常访问。


[前一篇](heapster.md) -- [目录](index.md) -- [后一篇](efk.md)
1 change: 0 additions & 1 deletion docs/guide/kubedns.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ Address 2: 180.97.33.107
/ #
```
[前一篇](index.md) -- [目录](index.md) -- [后一篇](dashboard.md)
4 changes: 2 additions & 2 deletions docs/op/op-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- [集群添加NODE 节点](AddNode.md)
- [集群添加MASTER 节点](AddMaster.md)
- [升级K8S 版本](upgrade.md)
- [修改集群VIP地址](ChangeVIP.md)
- [修改多主集群VIP地址](ChangeVIP.md)
- [修改AIO部署的系统IP](change_ip_allinone.md)
- [删除集群某一节点](del_one_node.md)
- [集群删除单个节点](del_one_node.md)
6 changes: 3 additions & 3 deletions docs/op/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

集群更新存在一定风险,请谨慎操作。

- 项目分支1.8安装的集群目前只能进行小版本1.8.x的升级
- 项目分支1.9和master安装的集群可以任意小版本、大版本的升级,即1.9.x升级至1.10.x也可以
- 项目分支`master`安装的集群可以在k8s 1.8/1.9/1.10任意小版本、大版本间升级(特别注意如果跨大版本升级需要修改/etc/ansible/hosts文件中的参数K8S_VER)
- 项目分支`closed`(已停止更新)安装的集群目前只能进行小版本1.8.x的升级

### 备份etcd数据

Expand All @@ -19,7 +19,7 @@ $ ETCDCTL_API=3 etcdctl --write-out=table snapshot status backup.db
### 升级步骤

- 1.下载最新项目代码 `git pull origin master`
- 2.下载新的二进制解压并覆盖 `/etc/ansible/bin/` 目录下文件
- 2.下载新的二进制解压并替换 `/etc/ansible/bin/` 目录下文件
- 3a.如果可以接受短暂业务中断,执行 `ansible-playbook -t upgrade_k8s,restart_dockerd 22.upgrade.yml` 即可
- 3b.如果要求零中断升级集群
- 首先执行 `ansible-playbook -t upgrade_k8s 22.upgrade.yml` (该步骤不会影响k8s上的业务应用)
Expand Down
5 changes: 2 additions & 3 deletions roles/cluster-addon/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ metricsserver_install: "yes"
# dashboard 自动安装
dashboard_install: "yes"

# ingress 自动安装
#ingress_install: "no"
#ingress_backend: "traefik"
# traefik-ingress 自动安装
ingress_install: "no"

# heapster 自动安装
heapster_install: "no"
Expand Down
5 changes: 5 additions & 0 deletions roles/cluster-addon/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
when: '"kubernetes-dashboard" not in pod_info.stdout and dashboard_install == "yes"'
ignore_errors: true

- name: 创建 traefik-ingress部署
shell: "sleep 5; {{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/ingress/traefik-ingress.yaml"
when: '"traefik-ingress-controller" not in pod_info.stdout and ingress_install == "yes"'
ignore_errors: true

- name: 创建 heapster部署
shell: "sleep 5; {{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/heapster"
when: '"heapster" not in pod_info.stdout and heapster_install == "yes"'
Expand Down

0 comments on commit 2662384

Please sign in to comment.