# install-single-master-K8s **Repository Path**: atompi/install-single-master-K8s ## Basic Information - **Project Name**: install-single-master-K8s - **Description**: 两个命令从空白系统到单 master 节点 K8s 集群 -- Install a single master node K8s cluster on a blank system with two commands - **Primary Language**: Unknown - **License**: MulanPSL-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 2 - **Created**: 2019-10-27 - **Last Updated**: 2023-04-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # install-single-master-K8s #### 介绍 两个命令从空白系统到单 master 节点 K8s 集群。 支持操作系统: CentOS 7 支持 K8s 版本: v1.21.0+ #### 软件架构 单 master 节点,使用 kubeadm 快速部署,使用 cilium 作为 CNI 插件,并移除了 kube-proxy。生产环境 HA 部署见:[Prod-K8S-HA-Installer](https://gitee.com/atompi/Prod-K8S-HA-Installer) #### 安装教程 0. 基于 CoreDNS 搭建本地 DNS 服务器 见: [coredns-installer](https://gitee.com/oscstudio/coredns-installer) 1. init node - pre_reboot (脚本执行完成后会自动重启服务器) ``` # 六个参数: host_name=k8smaster host_ip=192.168.3.53 net_gateway=192.168.3.1 net_prefix=24 nic_name=ens33 name_server=192.168.3.231 bash pre_reboot.sh $host_name $host_ip $net_gateway $net_prefix $nic_name $name_server ``` 2. init node - post_reboot ``` # 六个参数: containerd_version=1.4.11 kubernetes_version=1.21.6 private_hub=hub.atompi.cc hub_username=atompi hub_password=123456 docker_mirror=pooj3a7i.mirror.aliyuncs.com bash post_reboot.sh $containerd_version $kubernetes_version $private_hub $hub_username $hub_password $docker_mirror ``` 3. 初始化集群并完成安装 ``` # 六个参数: cpe_host="kube-apiserver.atompi.cc" cpe_port=6443 private_registry_host=hub.atompi.cc/google_containers kubernetes_version=1.21.6 pod_subnet=10.244.0.0/16 service_subnet=10.96.0.0/12 bash ./init_cluster.sh $cpe_host $cpe_port $private_registry_host $kubernetes_version $pod_subnet $service_subnet ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)