diff --git a/kubernetes/templates/k3s/server/config.yaml.jinja2 b/kubernetes/templates/k3s/server/config.yaml.jinja2 index 4ea7d95..8cea4fc 100644 --- a/kubernetes/templates/k3s/server/config.yaml.jinja2 +++ b/kubernetes/templates/k3s/server/config.yaml.jinja2 @@ -3,7 +3,7 @@ # Initialize with internal etcd cluster-init: true {% else %} -server: https://{{ groups['kubernetes'][0] }}:6443 +server: https://{{ hostvars[groups['kubernetes'][0]]['nodeip_ipv4'] }}:6443 {% endif %} token: '{{ kubernetes.token }}'