4 Star 20 Fork 21

open-hand/kubeadm-ha

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
82-add-master.yml 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
setzero 提交于 2021-05-12 09:54 . [IMP]优化脚本默认值获取
# 校验节点软件系统及硬件系统、安装必要基础组件、docker、kubeadm、kubelet、kubectl
- hosts: all
gather_facts: false
tasks:
- name: "设置代理服务器环境变量"
set_fact:
proxy_env:
http_proxy: "{{ http_proxy | default ('') }}"
HTTP_PROXY: "{{ http_proxy | default ('') }}"
https_proxy: "{{ https_proxy | default ('') }}"
HTTPS_PROXY: "{{ https_proxy | default ('') }}"
no_proxy: "{{ no_proxy | default ('') }}"
NO_PROXY: "{{ no_proxy | default ('') }}"
no_log: true
- hosts:
- new-master
roles:
- prepare/variables
- prepare/base
- prepare/container-engine
- prepare/kubernetes
environment: "{{ proxy_env }}"
# 进行apiserver负载均衡
- hosts:
- all
roles:
- prepare/variables
- load-balancer
# 分发 etcd client 证书
- hosts:
- etcd
- kube-master
- new-master
roles:
- prepare/variables
- etcd/certificates
# 生成master节点证书
- hosts:
- kube-master
- new-master
- kube-worker
- new-worker
roles:
- prepare/variables
- kube-certificates
# 初始化master节点
- hosts:
- kube-master
- new-master
roles:
- prepare/variables
- kube-master
- kube-worker
# 标记各节点角色
- hosts:
- new-master
roles:
- prepare/variables
- post
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open-hand/kubeadm-ha.git
git@gitee.com:open-hand/kubeadm-ha.git
open-hand
kubeadm-ha
kubeadm-ha
release-1.21

搜索帮助