Meshery: [mesheryctl] Couldn't detect kube config of local cluster

Created on 28 Apr 2020  路  7Comments  路  Source: layer5io/meshery

Actual
As make run-local fires up the server, the server is capable of loading the local Kube config on the user's machine.
But for mesheryctl, the user has to manually select the Kube-config to load up the Kubernetes.

Expected
Mesheryctl should also be able to detect Kube-config.

componenmesheryctl issuwillfix kinbug languaggo priorithigh

Most helpful comment

@nitishm There can be two scenarios in this case:

  1. If the project is supposed to start with mesheryctl, we can have a functionality to auto-discover the config and call the server api to load based on the config.
  2. The server during initialization, looks for $HOME/.kube/config and loads up the config. This way we dont need an api integration or command line discovery.

I would strongly recommend the second one. @leecalcote @kushthedude Wanted your thoughts on these.

All 7 comments

Ho do you set up the kubeconfig location currently in mesheryctl? Is this a flag or read from the KUBECONFIG env variable? Can't seem to find it (albeit I am on the phone app) @kushthedude

Hi @nitishm

  • Go to localhost:9081/settings
  • You will see an option to manually upload your Kube configuration
  • Once you do it, you will be successfully able to connect to Kubernetes.

Please let me know if you have more doubts regarding the same.

So the ask is that it autodiscovery the kubeconfig based ok either the default location if no env provided or loads it from the env car if set. Is that correct?

@leecalcote @kushthedude Do we want to mount the kubeconfig as a volume to the meshery docker container if found on the users system?

mesheryctl start invokes a docker-compose command. I suppose if the config is found we should load it into the meshery container and populate the Preference model with the k8sconfig based on the mounted kubeconfig. Is my understanding accurate?

tagging @kumarabd

@nitishm There can be two scenarios in this case:

  1. If the project is supposed to start with mesheryctl, we can have a functionality to auto-discover the config and call the server api to load based on the config.
  2. The server during initialization, looks for $HOME/.kube/config and loads up the config. This way we dont need an api integration or command line discovery.

I would strongly recommend the second one. @leecalcote @kushthedude Wanted your thoughts on these.

@kumarabd Yes, #2 is how Meshery was previously functioning. This bug is a regression issue. Ideally, we'll reinstate the functionality as described in #2. You're right - this is why we mount the $HOME/.kube directory in the Dockerfile.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leecalcote picture leecalcote  路  4Comments

leecalcote picture leecalcote  路  3Comments

Aisuko picture Aisuko  路  4Comments

sakomws picture sakomws  路  4Comments

navendu-pottekkat picture navendu-pottekkat  路  4Comments