From f50e3ac33c1aa1f1a0aa614fe0fb03f59040fbae Mon Sep 17 00:00:00 2001 From: Ruakij Date: Fri, 14 Apr 2023 09:50:39 +0200 Subject: [PATCH] Use first node's IP for joining cluster --- kubernetes/templates/k3s/agent/config.yaml.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/templates/k3s/agent/config.yaml.jinja2 b/kubernetes/templates/k3s/agent/config.yaml.jinja2 index fd2bc58..91c6644 100644 --- a/kubernetes/templates/k3s/agent/config.yaml.jinja2 +++ b/kubernetes/templates/k3s/agent/config.yaml.jinja2 @@ -1,4 +1,4 @@ -server: https://{{ kubernetes.control_plane.dns_name }}:6443 +server: https://{{ hostvars[groups['kubernetes'][0]]['nodeip_ipv4'] }}:6443 token: '{{ kubernetes.token }}' {% if nodeip_ipv6 != "" and kubernetes.ipPool.ipv6 is defined %}