Fixed kubelet can't run kube-apiserver when docker stable version

This commit is contained in:
Seungkyu Ahn 2017-06-13 16:58:03 +09:00
parent 20f29327e9
commit 67958d6e16

View file

@ -16,9 +16,15 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}"
{% if kube_version | version_compare('v1.6', '>=') %} {% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #} {# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %} {% if kube_version | version_compare('v1.7', '<') %}
{% if (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and docker_version.stdout | version_compare('17.03.0-ce', '<')) or
(docker_version | version_compare('17.03.0-ce', '<')) %}
--enable-cri={{ kubelet_enable_cri }} \ --enable-cri={{ kubelet_enable_cri }} \
{% endif %} {% endif %}
{% endif %}
{% if (ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and docker_version.stdout | version_compare('17.03.0-ce', '<')) or
(docker_version | version_compare('17.03.0-ce', '<')) %}
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \ --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
{% endif %}
--enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}' {% endif %}{% endset %} --enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}' {% endif %}{% endset %}
{# DNS settings for kubelet #} {# DNS settings for kubelet #}