# kubeadm-highavailiability (English / 中文) - kubernetes high availiability deployment based on kubeadm, for Kubernetes version v1.11.x/v1.9.x/v1.7.x/v1.6.x
![k8s logo](images/Kubernetes.png)
- [中文文档(for v1.11.x版本)](README_CN.md)
- [English document(for v1.11.x version)](README.md)
- [中文文档(for v1.9.x版本)](v1.9/README_CN.md)
- [English document(for v1.9.x version)](v1.9/README.md)
- [中文文档(for v1.7.x版本)](v1.7/README_CN.md)
- [English document(for v1.7.x version)](v1.7/README.md)
- [中文文档(for v1.6.x版本)](v1.6/README_CN.md)
- [English document(for v1.6.x version)](v1.6/README.md)
---
- [GitHub project URL](https://github.com/cookeem/kubeadm-ha/)
- [OSChina project URL](https://git.oschina.net/cookeem/kubeadm-ha/)
---
- This operation instruction is for version v1.11.x kubernetes cluster
> v1.11.x version now support deploy tls etcd cluster in control plane
### category
1. [deployment architecture](#deployment-architecture)
1. [deployment architecture summary](#deployment-architecture-summary)
1. [detail deployment architecture](#detail-deployment-architecture)
1. [hosts list](#hosts-list)
1. [prerequisites](#prerequisites)
1. [version info](#version-info)
1. [required docker images](#required-docker-images)
1. [system configuration](#system-configuration)
1. [kubernetes installation](#kubernetes-installation)
1. [firewalld and iptables settings](#firewalld-and-iptables-settings)
1. [kubernetes and related services installation](#kubernetes-and-related-services-installation)
1. [master hosts mutual trust](#master-hosts-mutual-trust)
1. [masters high availiability installation](#masters-high-availiability-installation)
1. [create configuration files](#create-configuration-files)
1. [kubeadm initialization](#kubeadm-initialization)
1. [high availiability configuration](#high-availiability-configuration)
1. [masters load balance settings](#masters-load-balance-settings)
1. [keepalived installation](#keepalived-installation)
1. [nginx load balance settings](#nginx-load-balance-settings)
1. [kube-proxy HA settings](#kube-proxy-ha-settings)
1. [high availiability verify](#high-availiability-verify)
1. [kubernetes addons installation](#kubernetes-addons-installation)
1. [workers join kubernetes cluster](#workers-join-kubernetes-cluster)
1. [workers join HA cluster](#workers-join-ha-cluster)
1. [verify kubernetes cluster installation](#verify-kubernetes-cluster-installation)
1. [verify kubernetes cluster high availiablity installation](#verify-kubernetes-cluster-high-availiablity-installation)
1. [cluster upgrade](#cluster-upgrade)
1. [kubernetes cluster upgrade from v1.11.1 to v1.11.5](#kubernetes-cluster-upgrade-from-v1-11-1-to-v1-11-5)
### deployment architecture
#### deployment architecture summary
![ha logo](images/ha.png)
---
[category](#category)
#### detail deployment architecture
![k8s ha](images/k8s-ha.png)
- kubernetes components:
> kube-apiserver: exposes the Kubernetes API. It is the front-end for the Kubernetes control plane. It is designed to scale horizontally – that is, it scales by deploying more instances.
> etcd: is used as Kubernetes’ backing store. All cluster data is stored here. Always have a backup plan for etcd’s data for your Kubernetes cluster.
> kube-scheduler: watches newly created pods that have no node assigned, and selects a node for them to run on.
> kube-controller-manager: runs controllers, which are the background threads that handle routine tasks in the cluster. Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.
> kubelet: is the primary node agent. It watches for pods that have been assigned to its node (either by apiserver or via local configuration file)
> kube-proxy: enables the Kubernetes service abstraction by maintaining network rules on the host and performing connection forwarding.
- load balancer
> keepalived cluster config a virtual IP address (192.168.20.10), this virtual IP address point to k8s-master01, k8s-master02, k8s-master03.
> nginx service as the load balancer of k8s-master01, k8s-master02, k8s-master03's apiserver. The other nodes kubernetes services connect the keepalived virtual ip address (192.168.20.10) and nginx exposed port (16443) to communicate with the master cluster's apiservers.
---
[category](#category)
#### hosts list
HostName | IPAddress | Notes | Components
:--- | :--- | :--- | :---
k8s-master01 ~ 03 | 192.168.20.20 ~ 22 | master nodes * 3 | keepalived, nginx, etcd, kubelet, kube-apiserver
k8s-master-lb | 192.168.20.10 | keepalived virtual IP | N/A
k8s-node01 ~ 08 | 192.168.20.30 ~ 37 | worker nodes * 8 | kubelet
---
[category](#category)
### prerequisites
#### version info
- Linux version: CentOS 7.4.1708
- Core version: 4.6.4-1.el7.elrepo.x86_64
```sh
$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
$ uname -r
4.6.4-1.el7.elrepo.x86_64
```
- docker version: 17.12.0-ce-rc2
```sh
$ docker version
Client:
Version: 17.12.0-ce-rc2
API version: 1.35
Go version: go1.9.2
Git commit: f9cde63
Built: Tue Dec 12 06:42:20 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce-rc2
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: f9cde63
Built: Tue Dec 12 06:44:50 2017
OS/Arch: linux/amd64
Experimental: false
```
- kubeadm version: v1.11.1
```sh
$ kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:50:16Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
```
- kubelet version: v1.11.1
```sh
$ kubelet --version
Kubernetes v1.11.1
```
- networks addons
> calico
---
[category](#category)
#### required docker images
- required docker images and tags
```sh
# kuberentes basic components
# use kubeadm to list all required docker images
$ kubeadm config images list --kubernetes-version=v1.11.1
k8s.gcr.io/kube-apiserver-amd64:v1.11.1
k8s.gcr.io/kube-controller-manager-amd64:v1.11.1
k8s.gcr.io/kube-scheduler-amd64:v1.11.1
k8s.gcr.io/kube-proxy-amd64:v1.11.1
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd-amd64:3.2.18
k8s.gcr.io/coredns:1.1.3
# use kubeadm to pull all required docker images
$ kubeadm config images pull --kubernetes-version=v1.11.1
# kubernetes networks addons
$ docker pull quay.io/calico/typha:v0.7.4
$ docker pull quay.io/calico/node:v3.1.3
$ docker pull quay.io/calico/cni:v3.1.3
# kubernetes metrics server
$ docker pull gcr.io/google_containers/metrics-server-amd64:v0.2.1
# kubernetes dashboard
$ docker pull gcr.io/google_containers/kubernetes-dashboard-amd64:v1.8.3
# kubernetes heapster
$ docker pull k8s.gcr.io/heapster-amd64:v1.5.4
$ docker pull k8s.gcr.io/heapster-influxdb-amd64:v1.5.2
$ docker pull k8s.gcr.io/heapster-grafana-amd64:v5.0.4
# kubernetes apiserver load balancer
$ docker pull nginx:latest
# prometheus
$ docker pull prom/prometheus:v2.3.1
# traefik
$ docker pull traefik:v1.6.3
# istio
$ docker pull docker.io/jaegertracing/all-in-one:1.5
$ docker pull docker.io/prom/prometheus:v2.3.1
$ docker pull docker.io/prom/statsd-exporter:v0.6.0
$ docker pull gcr.io/istio-release/citadel:1.0.0
$ docker pull gcr.io/istio-release/galley:1.0.0
$ docker pull gcr.io/istio-release/grafana:1.0.0
$ docker pull gcr.io/istio-release/mixer:1.0.0
$ docker pull gcr.io/istio-release/pilot:1.0.0
$ docker pull gcr.io/istio-release/proxy_init:1.0.0
$ docker pull gcr.io/istio-release/proxyv2:1.0.0
$ docker pull gcr.io/istio-release/servicegraph:1.0.0
$ docker pull gcr.io/istio-release/sidecar_injector:1.0.0
$ docker pull quay.io/coreos/hyperkube:v1.7.6_coreos.0
```
---
[category](#category)
#### system configuration
- on all kubernetes nodes: add kubernetes' repository
```sh
$ cat <<EOF > /etc/yum.repos.d/
没有合适的资源?快使用搜索试试~ 我知道了~
基于kubeadm的kubernetes高可用集群部署
共174个文件
yaml:94个
png:24个
tpl:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 186 浏览量
2023-05-23
11:32:42
上传
评论
收藏 26.77MB ZIP 举报
温馨提示
基于kubeadm的kubernetes高可用集群部署,包含 stacked loadbalancer;包含load balancer的高可用master架构,以keepalived和nginx-lb作为高可用集群的load balancer。需要为keepalived分配一个vip(虚拟浮动ip)作为kubernetes高可用集群的访问入口。nginx-lb和keepalived以pod形式直接托管在kubernetes集群中,当出现故障的情况下可以实现自动恢复,提高集群可靠性。
资源推荐
资源详情
资源评论
收起资源包目录
基于kubeadm的kubernetes高可用集群部署 (174个子文件)
nginx-default.conf 1012B
nginx-default.conf 1012B
nginx-lb.conf 836B
.gitignore 10B
helm-v2.17.0-linux-amd64.tar.gz 23.93MB
.helmignore 342B
kubernetes-cluster-monitoring-via-prometheus_rev3.json 58KB
kubernetes-cluster-monitoring.json 55KB
kubernetes-cluster-monitoring.json 55KB
kubernetes-apps_rev1.json 41KB
settings.json 40B
LICENSE 1KB
README.md 46KB
README_CN.md 46KB
README.md 45KB
README_CN.md 43KB
README.md 43KB
README_CN.md 40KB
README.md 40KB
README.md 36KB
README.md 35KB
README_CN.md 34KB
k8s-deployment-strategies.md 2KB
README.md 163B
kubernetes-dashboard-pods.png 405KB
kubernetes-ha-architecture.png 244KB
prometheus.png 224KB
grafana-app.png 209KB
grafana-datasource.png 174KB
grafana-import.png 146KB
grafana-cluster.png 135KB
heapster.png 124KB
k8s-ha.png 123KB
dashboard.png 122KB
kubernetes-dashboard-login.png 122KB
dashboard.png 114KB
heapster-dashboard.png 102KB
dashboard-login.png 94KB
dashboard-login.png 94KB
traefik.png 81KB
heapster.png 80KB
heapster.png 80KB
dashboard.png 66KB
dashboard.png 66KB
ha.png 64KB
Kubernetes.png 12KB
kubernetes.png 12KB
kubernetes.png 12KB
create-config.sh 7KB
create-config.sh 5KB
create-config.sh 4KB
create-config.sh 2KB
check_apiserver.sh 493B
check_apiserver.sh 488B
check_apiserver.sh 488B
check_apiserver.sh 471B
kubeadm-ha.svg 26KB
calico.yaml.tpl 19KB
calico.yaml.tpl 13KB
canal.yaml.tpl 10KB
nginx-lb.conf.tpl 1024B
nginx-lb.conf.tpl 1024B
nginx-lb.conf.tpl 1024B
docker-compose.yaml.tpl 906B
keepalived.conf.tpl 565B
keepalived.conf.tpl 562B
keepalived.conf.tpl 562B
kubeadm-init.yaml.tpl 425B
kubeadm-config.yaml.tpl 372B
metrics-server-deployment.yaml.txt 815B
resource-reader.yaml.txt 502B
aggregated-metrics-reader.yaml.txt 388B
auth-reader.yaml.txt 329B
auth-delegator.yaml.txt 308B
metrics-apiservice.yaml.txt 298B
metrics-server-service.yaml.txt 249B
istio-demo.yaml 413KB
tigera-operator.yaml 235KB
istio-demo.yaml 130KB
crds.yaml 22KB
fluentd.yaml 18KB
calico.yaml 17KB
config-map.yaml 11KB
prometheus.yaml 10KB
prometheus.yaml 10KB
kubernetes-dashboard.yaml 8KB
kube-state-metrics.yaml 5KB
kubernetes-dashboard.yaml 5KB
kubernetes-dashboard.yaml 5KB
kube-state-metrics.yaml 5KB
kubernetes-dashboard.yaml 5KB
kubernetes-dashboard.yaml 5KB
metrics-server.yaml 4KB
elasticsearch.yaml 4KB
metrics-server.yaml 3KB
alertmanager.yaml 3KB
alertmanager.yaml 3KB
kubernetes-dashboard-1.6.1.yaml 3KB
kubernetes-dashboard-1.6.1.yaml 3KB
grafana.yaml 3KB
共 174 条
- 1
- 2
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7361
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于C语言的系统服务框架.zip
- (源码)基于Spring MVC和MyBatis的选课管理系统.zip
- (源码)基于ArcEngine的GIS数据处理系统.zip
- (源码)基于JavaFX和MySQL的医院挂号管理系统.zip
- (源码)基于IdentityServer4和Finbuckle.MultiTenant的多租户身份认证系统.zip
- (源码)基于Spring Boot和Vue3+ElementPlus的后台管理系统.zip
- (源码)基于C++和Qt框架的dearoot配置管理系统.zip
- (源码)基于 .NET 和 EasyHook 的虚拟文件系统.zip
- (源码)基于Python的金融文档智能分析系统.zip
- (源码)基于Java的医药管理系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功