Merge pull request #3193 from riverzhang/fix-lb-kubeadm

Fix kubeadm lb
This commit is contained in:
k8s-ci-robot 2018-08-29 04:22:40 -07:00 committed by GitHub
commit 4feb62f6bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -1,10 +1,11 @@
apiVersion: kubeadm.k8s.io/v1alpha2 apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration kind: MasterConfiguration
api: api:
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
bindPort: {{ kube_apiserver_port }}
{% 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 }} controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ kube_apiserver_port }}
{% else %}
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
bindPort: {{ kube_apiserver_port }}
{% endif %} {% endif %}
etcd: etcd:
external: external:

View file

@ -1,10 +1,11 @@
apiVersion: kubeadm.k8s.io/v1alpha2 apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration kind: MasterConfiguration
api: api:
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
bindPort: {{ kube_apiserver_port }}
{% 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 }} controlPlaneEndpoint: {{ kubeadm_config_api_fqdn }}:{{ kube_apiserver_port }}
{% else %}
advertiseAddress: {{ ip | default(ansible_default_ipv4.address) }}
bindPort: {{ kube_apiserver_port }}
{% endif %} {% endif %}
etcd: etcd:
external: external: