{"id":23655795,"url":"https://github.com/cby-chen/kubernetes","last_synced_at":"2025-05-14T20:04:25.520Z","repository":{"id":37488563,"uuid":"459090658","full_name":"cby-chen/Kubernetes","owner":"cby-chen","description":"kubernetes (k8s) 二进制高可用安装，Binary installation of kubernetes (k8s)  --- 开源不易，帮忙点个star，谢谢了🌹","archived":false,"fork":false,"pushed_at":"2025-03-23T09:37:42.000Z","size":1646,"stargazers_count":1022,"open_issues_count":28,"forks_count":348,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-04-06T13:04:29.647Z","etag":null,"topics":["binary","calico","centos","containerd","coredns","dashboard","docker","etcd","etcd-cluster","ingress","install","ipv4","ipv6","ipvs","k8s","kernel","kernel-module","kubernetes","metrics-server","ubuntu"],"latest_commit_sha":null,"homepage":"https://www.oiox.cn","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cby-chen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-14T09:15:25.000Z","updated_at":"2025-04-04T06:14:50.000Z","dependencies_parsed_at":"2023-12-07T10:29:46.211Z","dependency_job_id":"803b59ae-21cb-4931-a3ed-ac5c07d4a027","html_url":"https://github.com/cby-chen/Kubernetes","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cby-chen%2FKubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cby-chen%2FKubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cby-chen%2FKubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cby-chen%2FKubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cby-chen","download_url":"https://codeload.github.com/cby-chen/Kubernetes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741159,"owners_count":21154252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","calico","centos","containerd","coredns","dashboard","docker","etcd","etcd-cluster","ingress","install","ipv4","ipv6","ipvs","k8s","kernel","kernel-module","kubernetes","metrics-server","ubuntu"],"created_at":"2024-12-28T20:15:49.768Z","updated_at":"2025-04-13T15:57:22.712Z","avatar_url":"https://github.com/cby-chen.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubernetes (k8s) 二进制高可用安装\n\n[Kubernetes](https://github.com/cby-chen/Kubernetes) 开源不易，帮忙点个star，谢谢了🌹\n\nGitHub访问不通畅可以访问国内GitEE https://gitee.com/cby-inc/Kubernetes\n\n##  ⚠️ 中国大陆地区 Docker 以及其他仓库镜像已被 GFW 完全封锁！！！\n##  ⚠️ 现镜像已无法直接拉取，需要通过一些特殊方式进行！！！\n\n# 一、写在前面\n\n打开文档，使用全文替换，全局替换主机IP即可。\n\n各位仁兄，手动方式部署，没必要折磨自己。\n\n能用自动部署就用自动部署吧。推荐：https://github.com/easzlab/kubeasz\n\n也可以用 [kubeadm-install.md](./doc/kubeadm-install-V1.32.md)\n\n# 二、介绍\n\n我使用IPV6的目的是在公网进行访问，所以我配置了IPV6静态地址。\n若您没有IPV6环境，或者不想使用IPv6，不对主机进行配置IPv6地址即可。\n不配置IPV6，不影响后续，不过集群依旧是支持IPv6的。为后期留有扩展可能性。\n若不要IPv6 ，不给网卡配置IPv6即可，不要对IPv6相关配置删除或操作，否则会出问题。\n如果本地没有IPv6，那么Calico需要使用IPv4的yaml配置文件。\n后续尽可能第一时间更新新版本文档，更新后内容在GitHub。\n\n最新版本的文档对于IPv6方面的写的比较详细。\n\n不要删除 IPv6 相关配置！！！\n\n不要删除 IPv6 相关配置！！！\n\n不要删除 IPv6 相关配置！！！\n\n# 三、当前文档版本\n\n- 1.32.x\n- 1.31.x\n- 1.30.x\n- 1.29.x\n- 1.28.x\n- 1.27.x\n- 1.26.x\n- 1.25.x\n- 1.24.x\n- 1.23.x\n- 1.22.x\n- 1.21.x\n\n大版本之间是通用的，比如使用 1.26.0 的文档可以安装 1.26.x 各种版本，只是安装过程中的下载新的包即可。\n\n# 四、访问地址\n\n手动项目地址：  \nhttps://github.com/cby-chen/Kubernetes\n\n脚本项目地址（已停更）：  \nhttps://github.com/cby-chen/Binary_installation_of_Kubernetes  \nhttps://github.com/cby-chen/kube_ansible  \n\n# 五、文档\n\n### 最新版本文档\n- [kubeadm-install.md](./doc/kubeadm-install-V1.32.md)\n- [v1.32.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.32.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n## 安装文档\n###  1.32.x版本\n- [v1.32.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.32.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n  \n###  1.31.x版本\n- [v1.31.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.31.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.30.x版本\n- [v1.30.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.30.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n- [v1.30.2-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.30.2-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.29.x版本\n- [v1.29.2-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.29.2-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.28.x版本\n- [v1.28.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.28.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n- [v1.28.3-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.28.3-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.27.x版本\n- [v1.27.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.27.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n- [v1.27.3-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.27.3-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.26.x版本\n- [v1.26.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md](./doc/v1.26.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md)\n- [v1.26.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md](./doc/v1.26.1-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md)\n\n###  1.25.x版本\n- [v1.25.0-CentOS-binary-install-IPv6-IPv4.md](./doc/v1.25.0-CentOS-binary-install-IPv6-IPv4.md)\n- [v1.25.4-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md](./doc/v1.25.4-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md)\n\n###  1.24.x版本\n- [v1.24.0-CentOS-binary-install-IPv6-IPv4.md](./doc/v1.24.0-CentOS-binary-install-IPv6-IPv4.md)\n- [v1.24.1-CentOS-binary-install-IPv6-IPv4.md](./doc/v1.24.1-CentOS-binary-install-IPv6-IPv4.md)\n- [v1.24.2-CentOS-binary-install-IPv6-IPv4.md](./doc/v1.24.2-CentOS-binary-install-IPv6-IPv4.md)\n- [v1.24.3-CentOS-binary-install-IPv6-IPv4.md](./doc/v1.24.3-CentOS-binary-install-IPv6-IPv4.md)\n\n###  1.23.x版本\n- [v1.23.3-CentOS-binary-install](./doc/v1.23.3-CentOS-binary-install.md)\n- [v1.23.4-CentOS-binary-install](./doc/v1.23.4-CentOS-binary-install.md)\n- [v1.23.5-CentOS-binary-install](./doc/v1.23.5-CentOS-binary-install.md)\n- [v1.23.6-CentOS-binary-install](./doc/v1.23.6-CentOS-binary-install.md)\n\n###  1.22.x版本\n- [v1.22.10-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md](./doc/v1.22.10-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md)\n\n###  1.21.x版本\n- [v1.21.13-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md](./doc/v1.21.13-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md)\n\n## 其他文档\n-  修复kube-proxy证书权限过大问题 [kube-proxy_permissions.md](./doc/kube-proxy_permissions.md)\n-  使用kubeadm初始化IPV4/IPV6集群 [kubeadm-install-IPV6-IPV4.md](./doc/kubeadm-install-IPV6-IPV4.md)\n-  IPv4集群启用IPv6功能，关闭IPv6则反之 [Enable-implement-IPv4-IPv6.md](./doc/Enable-implement-IPv4-IPv6.md)\n-  升级kubernetes集群 [Upgrade_Kubernetes.md](./doc/Upgrade_Kubernetes.md)  \n-  Minikube初始化集群 [Minikube_init.md](./doc/Minikube_init.md)  \n-  Kubernetes 1.24 1.25 集群使用docker作为容器 [Kubernetes_docker](./doc/Kubernetes_docker.md)\n-  kubernetes 安装cilium [kubernetes_install_cilium](./doc/kubernetes_install_cilium.md)\n-  二进制安装每个版本文档\n\n# 六、安装包\n\n- 123云盘 https://www.123pan.com/s/Z8ArVv-PG60d\n- 夸克云盘 https://pan.quark.cn/s/8d8525a12895\n\n- https://github.com/cby-chen/Kubernetes/releases\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.22.10/kubernetes-v1.22.10.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.21.13/kubernetes-v1.21.13.tar  \n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/cby/Kubernetes.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.23.4/kubernetes-v1.23.4.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.23.5/kubernetes-v1.24.5.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.23.6/kubernetes-v1.23.6.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.23.7/kubernetes-v1.23.7.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.24.0/kubernetes-v1.24.0.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.24.1/kubernetes-v1.24.1.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.24.2/kubernetes-v1.24.2.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.24.3/kubernetes-v1.24.3.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.25.0/kubernetes-v1.25.0.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.25.4/kubernetes-v1.25.4.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.26.0/kubernetes-v1.26.0.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.26.1/kubernetes-v1.26.1.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.27.1/kubernetes-v1.27.1.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.27.3/kubernetes-v1.27.3.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.28.0/kubernetes-v1.28.0.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.28.3/kubernetes-v1.28.3.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.29.2/kubernetes-v1.29.2.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.30.1/kubernetes-v1.30.1.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.30.2/kubernetes-v1.30.2.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.31.1/kubernetes-v1.31.1.tar\n- wget https://mirrors.chenby.cn/https://github.com/cby-chen/Kubernetes/releases/download/v1.32.0/kubernetes-v1.32.0.tar\n\n*注意：1.23.3 版本当时没想到会后续更新，所以当时命名不太规范。\n\n\n# 八、常见异常\n\n-  注意hosts配置文件中主机名和IP地址对应\n\n-  在文档7.2，却记别忘记执行`kubectl create -f bootstrap.secret.yaml`命令\n\n-  重启服务器之后出现异常，可以查看`systemctl status kubelet.service`服务是否正常\n\n-  在 centos7 环境下需要升级 runc 和 libseccomp \n详见 https://github.com/cby-chen/Kubernetes/blob/main/doc/v1.25.0-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves.md#9%E5%AE%89%E8%A3%85%E7%BD%91%E7%BB%9C%E6%8F%92%E4%BB%B6\n\n- 安装会出现kubelet异常，无法识别 `--node-labels` 字段问题，原因如下。\n将 `--node-labels=node.kubernetes.io/node=''` 替换为 `--node-labels=node.kubernetes.io/node=`  将 `''` 删除即可。\n\n-  IPv6无法正常访问，kubelet服务需要添加`--node-ip=`参数，若动态获取IP地址变动之后需要重新配置，详细查看文档 https://github.com/cby-chen/Kubernetes/blob/main/doc/v1.28.3-CentOS-binary-install-IPv6-IPv4-Three-Masters-Two-Slaves-Offline.md#82kubelet%E9%85%8D%E7%BD%AE\n\n# 九、其他\n\n## 生产环境推荐配置\n\n###\tMaster节点：\n- 三个节点实现高可用（必须）\n- 节点数：0-100    8核16+\n- 节点数：100-250  8核32G+\n- 节点数：250-500  16核32G+\n  \n###\tetcd节点：\n- 三个节点实现高可用（必须），有条件存储分区必须高性能SSD硬盘，没有SSD也要有高效独立磁盘\n- 节点数：0-50    2核8G+   50G SSD存储\n- 节点数：50-250  4核16G+  150G SSD存储\n- 节点数：250-1000  8核32G+ 250G SSD存储\n  \n###\tNode节点：\n- 无特殊要求，主要是Docker数据分区、系统分区需要单独使用，不可以使用同一个磁盘，系统分区100G+、Docker数据分区200G+，有条件使用SSD硬盘，必须独立于系统盘\n\n###\t其他：\n- 集群规模不大可以将etcd和master放置于同一个宿主机，\n- 也就是每个master节点部署k8s组件和etcd服务，但是etcd的数据目录一定要独立，并且使用SSD，\n- 两者部署在一起需要相对增加宿主机的资源，个人建议生产环境把master节点的资源一次性给够，\n- 此处的费用不应该节省，可以直接使用16核32G或者64G的机器，之后集群扩容就无需扩容master节点的资源，减少风险。\n- 其中master节点和etcd节点的系统分区100G即可。\n\n### 添加好友\n\u003cimg src=./images/1.jpg width=30% /\u003e\n\n### 打赏\n\u003cimg src=./images/3.jpg width=30% /\u003e\n\n- 建议在 [Kubernetes](https://github.com/cby-chen/Kubernetes) 查看文档，后续会陆续更新文档\n- 小陈网站：\n\n\u003e https://www.oiox.cn/\n\u003e\n\u003e https://www.oiox.cn/index.php/start-page.html\n\u003e\n\u003e **CSDN、GitHub、51CTO、知乎、开源中国、思否、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客**\n\u003e\n\u003e **全网可搜《小陈运维》**\n\u003e\n\u003e **文章主要发布于微信公众号**\n\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/cby-chen/Kubernetes.svg)](https://starchart.cc/cby-chen/Kubernetes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcby-chen%2Fkubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcby-chen%2Fkubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcby-chen%2Fkubernetes/lists"}