Use proxy_env with kubeadm phase commands (#4325)
This commit is contained in:
parent
f6d280452f
commit
d0ae316934
3 changed files with 5 additions and 0 deletions
|
@ -52,6 +52,7 @@
|
||||||
--cert-dir {{ kube_config_dir }}/ssl
|
--cert-dir {{ kube_config_dir }}/ssl
|
||||||
--apiserver-advertise-address {{ external_apiserver_address }}
|
--apiserver-advertise-address {{ external_apiserver_address }}
|
||||||
--apiserver-bind-port {{ external_apiserver_port }}
|
--apiserver-bind-port {{ external_apiserver_port }}
|
||||||
|
environment: "{{ proxy_env }}"
|
||||||
run_once: yes
|
run_once: yes
|
||||||
register: admin_kubeconfig
|
register: admin_kubeconfig
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
- name: Generate new certs and keys
|
- name: Generate new certs and keys
|
||||||
command: "{{ bin_dir }}/kubeadm init phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
command: "{{ bin_dir }}/kubeadm init phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||||
|
environment: "{{ proxy_env }}"
|
||||||
with_items:
|
with_items:
|
||||||
- apiserver
|
- apiserver
|
||||||
- apiserver-kubelet-client
|
- apiserver-kubelet-client
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
|
|
||||||
- name: Generate new certs and keys
|
- name: Generate new certs and keys
|
||||||
command: "{{ bin_dir }}/kubeadm alpha phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
command: "{{ bin_dir }}/kubeadm alpha phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||||
|
environment: "{{ proxy_env }}"
|
||||||
with_items:
|
with_items:
|
||||||
- apiserver
|
- apiserver
|
||||||
- apiserver-kubelet-client
|
- apiserver-kubelet-client
|
||||||
|
|
|
@ -23,10 +23,12 @@
|
||||||
|
|
||||||
- name: Generate new configuration files
|
- name: Generate new configuration files
|
||||||
command: "{{ bin_dir }}/kubeadm init phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
command: "{{ bin_dir }}/kubeadm init phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||||
|
environment: "{{ proxy_env }}"
|
||||||
when: kubeadm_version is version('v1.13.0', '>=')
|
when: kubeadm_version is version('v1.13.0', '>=')
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Generate new configuration files
|
- name: Generate new configuration files
|
||||||
command: "{{ bin_dir }}/kubeadm alpha phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
command: "{{ bin_dir }}/kubeadm alpha phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
|
||||||
|
environment: "{{ proxy_env }}"
|
||||||
when: kubeadm_version is version('v1.13.0', '<')
|
when: kubeadm_version is version('v1.13.0', '<')
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
Loading…
Reference in a new issue