nforgeio / neonKUBE

Public NeonKUBE Kubernetes distribution related projects
https://neonkube.io
Apache License 2.0
76 stars 13 forks source link

Existing cluster contexts/logins are removed when a new cluster is deployed #1888

Closed marcusbooyah closed 2 months ago

marcusbooyah commented 3 months ago

All my logins in kubeconfig got deleted when installing a new cluster

jefflill commented 3 months ago

Actually, I cannot replicate this.

In my first attempt, I created a tiny hyper-v cluster using my cheats and then I tweaked the cluster definition and my cheat script and created a second cluster, but I forgot to edit the line where I delete any existing cluster, so that removed the first cluster I created and then my script created the new cluster. The old cluster (and login) were deleted because I (unintentionally) deleted it.

I tried this again by creating two clusters (and taking care not to delete the first one) and both clusters and logins are present.

I've also had the headend cluster in my config for a long time and have been able to create/delete clusters freely without removing the headend cluster.

@marcusbooyah: Is it possible that this was caused by: https://github.com/nforgeio/neonCLOUD/issues/437

If not, could you give me some more details:

jefflill commented 3 months ago

@marcusbooyah told me that the cluster login removed was for our headend cluster, which is not currently considered to be a NeonKUBE cluster (because it's pretty old).

I tried deploying a new cluster with the headend cluster in the config and I ended up with both clusters in the kubeconfig file.

I tried again, manually causing the cluster deployment to fail to see if that the recovery from that would cause the headend cluster liogin to be deleted. but it was still there afterwards.

I did find and fix a problem related to saving the kubeconfig, but I don't believe that fixed this problem.

I'm going to keep this issue open so we can watch for this, but I'm at a dead-end right now.

jefflill commented 2 months ago

NO-REPRO: I wasn't able to reproduce this issue. I had the headend cluster in the config and then deployed a new Hyper-V cluster; the headend cluster was still there afterwards.