diff --git a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 index a1282a03c..8dc19d2cf 100644 --- a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 @@ -88,7 +88,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" {% endif %} {% set inventory_node_labels = [] %} {% if node_labels is defined %} -{% for labelname, labelvalue in node_labels.iteritems() %} +{% for labelname, labelvalue in node_labels.items() %} {% set dummy = inventory_node_labels.append('%s=%s'|format(labelname, labelvalue)) %} {% endfor %} {% endif %} diff --git a/roles/kubernetes/node/templates/kubelet.standard.env.j2 b/roles/kubernetes/node/templates/kubelet.standard.env.j2 index a01e2f8f8..d978b4ad8 100644 --- a/roles/kubernetes/node/templates/kubelet.standard.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.standard.env.j2 @@ -107,7 +107,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" {% endif %} {% set inventory_node_labels = [] %} {% if node_labels is defined %} -{% for labelname, labelvalue in node_labels.iteritems() %} +{% for labelname, labelvalue in node_labels.items() %} {% set dummy = inventory_node_labels.append('%s=%s'|format(labelname, labelvalue)) %} {% endfor %} {% endif %}