Documentation and playbook for recovering control plane from node failure (#4146)

This commit is contained in:
qvicksilver
2019-04-29 10:40:20 +02:00
committed by Kubernetes Prow Robot
parent 9335cdcebc
commit 48a182844c
9 changed files with 287 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
---
# TODO: Figure out why kubeadm does not fix this
- name: Set etcd-servers fact
set_fact:
etcd_servers: >-
{% for host in groups['etcd'] -%}
{% if not loop.last -%}
https://{{ hostvars[host].access_ip | default(hostvars[host].ip | default(hostvars[host].ansible_default_ipv4['address'])) }}:2379,
{%- endif -%}
{%- if loop.last -%}
https://{{ hostvars[host].access_ip | default(hostvars[host].ip | default(hostvars[host].ansible_default_ipv4['address'])) }}:2379
{%- endif -%}
{%- endfor -%}
- name: Update apiserver etcd-servers list
replace:
path: /etc/kubernetes/manifests/kube-apiserver.yaml
regexp: "(etcd-servers=).*"
replace: "\\1{{ etcd_servers }}"