Skip to content

Conversation

@ekerkenaar
Copy link

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

Signed-off-by: Edwin Kerkenaar <edwin.kerkenaar@sogyo.nl>
@aguda-nvidia
Copy link
Collaborator

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

@ekerkenaar
Copy link
Author

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.

@aguda-nvidia
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants