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

Delete cluster that no longer exists. #1406

Open
tetricky opened this issue Sep 23, 2023 · 5 comments
Open

Delete cluster that no longer exists. #1406

tetricky opened this issue Sep 23, 2023 · 5 comments
Labels
frontend Issues related to the frontend

Comments

@tetricky
Copy link

With a cluster that is connected I have the following options View Settings Delete.

With a cluster that is not connected (Bad Gateway), because it no longer exists, I lose the option to Delete.

This does not affect any functionality, but it's annoying having development clusters that have since been torn down, having forgotten to delete them from Headlamp Home, cluttering up the page.

Is there any way to remove such entries?

@joaquimrocha
Copy link
Collaborator

You can remove them from the related kubeconfig file, but I think we should add a fix for this and have the Delete button showing regardless of whether the cluster is reachable (seems like a bug actually).

@joaquimrocha joaquimrocha added the bug Something isn't working label Sep 25, 2023
@joaquimrocha joaquimrocha added the frontend Issues related to the frontend label Sep 25, 2023
@joaquimrocha
Copy link
Collaborator

Actually took a quick look and for the delete button to be showing, it has to be a cluster that was added from Headlamp (because we chose not to touch already existing clusters) and it's only available in the desktop version of Headlamp (as in the web, clusters are configured for the users by whoever deployed Headlamp).

Does this make sense?
Should we add a global setting to allow Headlamp to touch clusters even if they haven't been added through Headlamp?

@tetricky
Copy link
Author

I'm not sure that touching clusters is necessary.

I had some clusters...I deleted them from headlamp (but could still kubectl/kubeconfig into them). I then deleted the actual clusters.

I have a cluster that I forgot to delete from headlamp first. Now I can't see how to get rid of its listing.

Id like to be able to remove this listing anyway at all. Where is it 'being remembered'?

@joaquimrocha
Copy link
Collaborator

It reads the clusters from your kubeconfig, likely .kube/config in your home folder but depends on what OS you use.
If you remove the contexts from that file which match the names you see in Headlamp as clusters, then Headlamp will reload and not show them.

@tetricky
Copy link
Author

tetricky commented Sep 25, 2023

That works. I have removed .kube/config until it reflects what I want it to, and have loaded individual KubeConfig files for active clusters. My .kube/config also contains credentials for clusters deleted from headlamp, which don't show up. Go figure (there must be something else remembering status somewhere).

That's a suitable workaround for now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues related to the frontend
Projects
None yet
Development

No branches or pull requests

2 participants