cloud-native-stack icon indicating copy to clipboard operation
cloud-native-stack copied to clipboard

adds FQDN for better acces remote kubectl clients

Open ekerkenaar opened this issue 10 months ago • 3 comments

To be able to use kubectl from an external machine, I would like to propose to add the control plane endpoint.

ekerkenaar avatar Apr 17 '25 14:04 ekerkenaar

@ekerkenaar fqdn might not work if the DNS setup for that host, not sure what is use case you're looking at ?

ghost avatar Jul 10 '25 15:07 ghost

You are correct. This will not work when there is no DNS set up for that host.

The case I'm looking at is to connect from my laptop to a machine, by name instead of an IP address, which is running the cloud-native-stack (we always use DNS names, not just IP addresses). This allows administrators to connect to the machine with kubectl from their laptops without having to deal with errors about common names on the certificates not matching the domain name.

Maybe something like {% if ansible_fqdn is defined %}{{ ansible_fqdn }}{% elif ansible_hostname is defined %}{{ ansible_hostname }}{% else %}{{ ansible_host }}{% endif %} would be more appropriate? I haven't tested this though...

But that way there's a fallback.

ekerkenaar avatar Jul 11 '25 19:07 ekerkenaar

we tested on our environment which doesn't have DNS for static set up, then in that case it's failing

but you want to perform the step you can do after the installation for /etc/kubernetes/manifests and reload the kubelet will help

ghost avatar Sep 24 '25 15:09 ghost