ha apiservers for kubelet
This commit is contained in:
parent
e2984b4fdb
commit
4055980ce6
1 changed files with 1 additions and 5 deletions
|
@ -2,11 +2,7 @@
|
||||||
Environment="KUBE_LOGTOSTDERR=--logtostderr=true"
|
Environment="KUBE_LOGTOSTDERR=--logtostderr=true"
|
||||||
Environment="KUBE_LOG_LEVEL=--v={{ kube_log_level | default('2') }}"
|
Environment="KUBE_LOG_LEVEL=--v={{ kube_log_level | default('2') }}"
|
||||||
Environment="KUBE_ALLOW_PRIV=--allow_privileged=true"
|
Environment="KUBE_ALLOW_PRIV=--allow_privileged=true"
|
||||||
{% if inventory_hostname in groups['kube-master'] %}
|
Environment="KUBELET_API_SERVER=--api_servers={% for srv in groups['kube-master'] %}https://{{ srv }}:{{ kube_apiserver_port }}{% if not loop.last %},{% endif %}{% endfor %}"
|
||||||
Environment="KUBELET_API_SERVER=--api_servers=http://{{ hostvars[inventory_hostname]['ip'] | default(hostvars[inventory_hostname]['ansible_default_ipv4']['address']) }}:{{ kube_apiserver_insecure_port }}"
|
|
||||||
{% else %}
|
|
||||||
Environment="KUBELET_API_SERVER=--api_servers=https://{{ groups['kube-master'][0]}}:{{ kube_apiserver_port }}"
|
|
||||||
{% endif %}
|
|
||||||
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
|
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
|
||||||
Environment="KUBELET_ADDRESS=--address=0.0.0.0"
|
Environment="KUBELET_ADDRESS=--address=0.0.0.0"
|
||||||
# The port for the info server to serve on
|
# The port for the info server to serve on
|
||||||
|
|
Loading…
Reference in a new issue