Use external LB IP for external api endpoint (#4060)
* Use external LB IP for external api endpoint Use loadbalancer_apiserver.address instead of apiserver_loadbalancer_domain_name for kudadm init --apiserver-advertise-address argument https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#options states apiserver-advertise-address needs to be a IPv4 or IPv6 address * only use loadbalancer IP if it is definedpull/4075/head
parent
e3ffa21303
commit
decbcdc423
|
@ -2,13 +2,13 @@
|
||||||
- name: Set external kube-apiserver endpoint
|
- name: Set external kube-apiserver endpoint
|
||||||
set_fact:
|
set_fact:
|
||||||
external_apiserver_address: >-
|
external_apiserver_address: >-
|
||||||
{%- if loadbalancer_apiserver is defined and loadbalancer_apiserver.port is defined -%}
|
{%- if loadbalancer_apiserver is defined and loadbalancer_apiserver.address is defined -%}
|
||||||
{{ apiserver_loadbalancer_domain_name }}
|
{{ loadbalancer_apiserver.address }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ kube_apiserver_access_address }}
|
{{ kube_apiserver_access_address }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
external_apiserver_port: >-
|
external_apiserver_port: >-
|
||||||
{%- if loadbalancer_apiserver is defined and loadbalancer_apiserver.port is defined -%}
|
{%- if loadbalancer_apiserver is defined and loadbalancer_apiserver.address and loadbalancer_apiserver.port is defined -%}
|
||||||
{{ loadbalancer_apiserver.port|default(kube_apiserver_port) }}
|
{{ loadbalancer_apiserver.port|default(kube_apiserver_port) }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ kube_apiserver_port }}
|
{{ kube_apiserver_port }}
|
||||||
|
|
Loading…
Reference in New Issue