Merge pull request #3219 from mlushpenko/kubeadm-ha
Fix ports for kubeadm client and master configs for ha setups
This commit is contained in:
commit
dee9324d4b
4 changed files with 12 additions and 12 deletions
|
@ -4,7 +4,7 @@ caCertPath: {{ kube_config_dir }}/ssl/ca.crt
|
||||||
token: {{ kubeadm_token }}
|
token: {{ kubeadm_token }}
|
||||||
discoveryTokenAPIServers:
|
discoveryTokenAPIServers:
|
||||||
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
||||||
- {{ kubeadm_config_api_fqdn }}:6443
|
- {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
- {{ kubeadm_discovery_address | replace("https://", "")}}
|
- {{ kubeadm_discovery_address | replace("https://", "")}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -8,7 +8,7 @@ tlsBootstrapToken: {{ kubeadm_token }}
|
||||||
token: {{ kubeadm_token }}
|
token: {{ kubeadm_token }}
|
||||||
discoveryTokenAPIServers:
|
discoveryTokenAPIServers:
|
||||||
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
||||||
- {{ kubeadm_config_api_fqdn }}:6443
|
- {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
- {{ kubeadm_discovery_address | replace("https://", "")}}
|
- {{ kubeadm_discovery_address | replace("https://", "")}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,10 +2,10 @@ apiVersion: kubeadm.k8s.io/v1alpha1
|
||||||
kind: MasterConfiguration
|
kind: MasterConfiguration
|
||||||
api:
|
api:
|
||||||
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
||||||
controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ kube_apiserver_port }}
|
controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
|
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
|
||||||
bindPort: {{ kube_apiserver_port }}
|
bindPort: {{ kube_apiserver_port }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
etcd:
|
etcd:
|
||||||
endpoints:
|
endpoints:
|
||||||
|
|
|
@ -2,10 +2,10 @@ apiVersion: kubeadm.k8s.io/v1alpha2
|
||||||
kind: MasterConfiguration
|
kind: MasterConfiguration
|
||||||
api:
|
api:
|
||||||
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
{% if groups['kube-master'] | length > 1 and kubeadm_config_api_fqdn is defined %}
|
||||||
controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ kube_apiserver_port }}
|
controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
|
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
|
||||||
bindPort: {{ kube_apiserver_port }}
|
bindPort: {{ kube_apiserver_port }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
etcd:
|
etcd:
|
||||||
external:
|
external:
|
||||||
|
|
Loading…
Reference in a new issue