Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nodeadm): add a way to export/dump the resolved nodeconfig #2106

Open
vflaux opened this issue Jan 3, 2025 · 2 comments
Open

feat(nodeadm): add a way to export/dump the resolved nodeconfig #2106

vflaux opened this issue Jan 3, 2025 · 2 comments

Comments

@vflaux
Copy link
Contributor

vflaux commented Jan 3, 2025

What would you like to be added:
I would like to get the resolved nodeconfig used by nodeadm (as json).

I thought of adding a nodeadm config dump command.
We could also add a flag to an existing one in order to dump the config to a file.

Why is this needed:
I use bootstrap scripts and would like to get the nodeconfig, especially the endpoint URL and CA of the cluster to query the api-server.
I currently use a custom cloud-init part handler (added in user-data with karpenter) to get these info.

@cartermckinnon
Copy link
Member

I use bootstrap scripts and would like to get the nodeconfig, especially the endpoint URL and CA of the cluster to query the api-server.

Do you mean you want to construct a kubeconfig file using the cluster details that Karpenter passes in via the NodeConfig? What query do you want to send to the API server?

@vflaux
Copy link
Contributor Author

vflaux commented Jan 6, 2025

I don't use a kubeconfig file as I send the request via curl (kubectl is not installed of the ami).

I get the endpoints of a service (spegel) and build a hosts.toml config for containerd.
Spegel acts as a registry and I configure containerd to use the instances on others nodes as mirrors. This allow to bootstrap the node (cilium, spegel etc.) even if our internal registry is down. When spegel start it rewrite the hosts.toml with the service hostname (which is not usable before cilium is up).

I don't think it is a widespread usecase. But having a way to output the resolved configuration may also be useful for debugging.😃

The nodeadm init could also have an option to output to a file and we add it in the nodeadm-config.service. This way there is no need to call nodeadm from the user-data.

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

No branches or pull requests

2 participants