microk8s icon indicating copy to clipboard operation
microk8s copied to clipboard

`microk8s config` to output custom cluster hostname

Open vit-zikmund opened this issue 3 months ago • 1 comments

Summary

microk8s config outputs the default interface IP in the clusters[].cluster.server URL or the default 127.0.0.1 when one uses the -l option.

I'd appreciate a mechanism that would output a custom hostname I have assigned for this cluster in my DNS server.

  • Ideally, I'd like to have some persistent setting, that - when set - would be used as the default. This setting would/could be replicated to all the nodes of this cluster, so no matter on which node I run it, I'd get consistent results.
  • The less preferred option would be a new switch to the microk8s-config.wrapper where I'd supply this hostname. This doesn't help in the environment where there are multiple admins who'd need consistent results without inventing their own ways.

Why is this important?

Convenience mostly, I run an interesting amount of these commands lately and I'm getting tired of replacing the default IP. I'm on a fence of scripting it myself for good or improving the initial experience for everyone :)

Are you interested in contributing to this feature?

yes

vit-zikmund avatar Oct 17 '25 10:10 vit-zikmund

hey @vit-zikmund I've submitted a PR to address this pr #5330

Ray0907 avatar Dec 06 '25 15:12 Ray0907