代码拉取完成,页面将自动刷新
- hosts:
- del-etcd
vars_prompt:
name: "restore_confirmation"
prompt: "确认要移除 etcd 节点? 输入“yes”确认移除。"
default: "no"
private: no
pre_tasks:
- name: 移除确认
fail:
msg: "移除确认失败,取消移除 etcd 节点操作。"
when: restore_confirmation != "yes"
roles:
- prepare/variables
- remove/etcd
# 删除etcd节点后刷新master节点kubeadm配置
- hosts:
- kube-master
roles:
- prepare/variables
- kube-master
- hosts:
- kube-master
roles:
- prepare/variables
tasks:
- name: "更新第一个 master 节点:{{ inventory_hostname }} 的配置"
shell: >
kubeadm upgrade apply --config=/etc/kubernetes/kubeadm-config.yaml --force --ignore-preflight-errors=ImagePull
when: inventory_hostname == groups['kube-master'][0]
- name: "更新 master 节点:{{ inventory_hostname }} 的配置"
shell: >
kubeadm upgrade node
{% if kube_version.split('.')[1]|int == 13 %}
experimental-control-plane
{% endif %}
when:
- inventory_hostname != groups['kube-master'][0]
- inventory_hostname in groups['kube-master']
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。