mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-23 00:37:42 -02:30
This reverts commit 316508626d.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
316508626d
commit
d39c273d96
@@ -12,3 +12,33 @@
|
||||
- {src: front-proxy-client.crt, dest: front-proxy-client.crt.old}
|
||||
- {src: front-proxy-client.key, dest: front-proxy-client.key.old}
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Remove old certs and keys
|
||||
file:
|
||||
path: "{{ kube_cert_dir }}/{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- apiserver.crt
|
||||
- apiserver.key
|
||||
- apiserver-kubelet-client.crt
|
||||
- apiserver-kubelet-client.key
|
||||
- front-proxy-client.crt
|
||||
- front-proxy-client.key
|
||||
|
||||
- name: Generate new certs and keys
|
||||
command: "{{ bin_dir }}/kubeadm init phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||
environment: "{{ proxy_env }}"
|
||||
with_items:
|
||||
- apiserver
|
||||
- apiserver-kubelet-client
|
||||
- front-proxy-client
|
||||
when: inventory_hostname == groups['kube-master']|first and kubeadm_version is version('v1.13.0', '>=')
|
||||
|
||||
- name: Generate new certs and keys
|
||||
command: "{{ bin_dir }}/kubeadm alpha phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||
environment: "{{ proxy_env }}"
|
||||
with_items:
|
||||
- apiserver
|
||||
- apiserver-kubelet-client
|
||||
- front-proxy-client
|
||||
when: inventory_hostname == groups['kube-master']|first and kubeadm_version is version('v1.13.0', '<')
|
||||
|
||||
Reference in New Issue
Block a user