KubeIcons does not accurately reflect the number of clusters to which I am connected

I am not very familier with kubernetes so excuse me if this not the right query.For many people I have seen the number of clusters they are connected to are shown in the kubeIcon Image in the header but for me it’s not showing anything.I am trying to work on a ui related issue on meshery but for that i need to connect to clusters to check if the issue is valid or not.

These are supposed to be the clusters I am connected to right?If yes why in the kubicon in the header is it not showing anything?

1 Like

Hi @Divyansh_Khatri, Meshery will discover your Kubernetes cluster automatically; however, this works well only if your Kubernetes installation is running and if you have correctly set the context. So, you essentially need to set up a correct context so that Meshery can interact with your cluster without any issues. For that, you could look at what your current Kubernetes context is by running kubectl config current-context .
This command will output the active context that Meshery will use. Now that your cluster is active, and context is set up, Meshery will be ready to connect and manage your Kubernetes resources.

Hi @Yash_Sharma , thanks for your help. I ran the command, and it minikube seems to be up and running on my system. However, when I tried adding the cluster manually, I still see nothing in the Kubernetes icon. I’m also unsure how the system is supposed to detect the running cluster, as it doesn’t seem to be working for me. The icon in the header still shows a count of zero, and I wanted to check if the cluster is supposed to appear in the list, since it isn’t showing up on my end.

Can you Please share the log output, the list of commands you’re running, and the current status of your Minikube setup

@Yash_Sharma Sure,thanks for the reply, here are the logs
i first ran the below commands

after that when minikube was running i uploaded the config file as instructed and imported it

and after that i got this notification in meshery

these are the notifications

and after all this the k8 icon is still showing 0 connected clusters
image

also here there seems to showing that i have nine connections so is this referring to the cluster connections?

Hi @Divyansh_Khatri .

Can you please run the following commands one by one and share the outputs here

minikube ip
kubectl get pods -n meshery
mesheryctl system context view
kubectl config get-contexts
kubectl get svc -A

What you are currently facing right now is the fact that, your meshery server is running on a different namespace.

You might need to port forward it to local machine.

Pls find below a sample diagram for some context

@Santosh_Kumar_Doodala @Yash_Sharma Thanks for the detailed explaination. I see what the problem is. These are the logs after excuting the commands you gave

Microsoft Windows [Version 10.0.26100.2033]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Divyansh>minikube ip
192.168.49.2

C:\Users\Divyansh>kubectl get pods -n meshery
No resources found in meshery namespace.

C:\Users\Divyansh>mesheryctl system context view

Current Context: local

endpoint: http://localhost:9081
token: default
token-location: auth.json
platform: kubernetes
components: []
channel: stable
version: latest
provider: Meshery


C:\Users\Divyansh>kubectl config get-contexts
CURRENT   NAME       CLUSTER    AUTHINFO   NAMESPACE
*         minikube   minikube   minikube   default

C:\Users\Divyansh>kubectl get svc -A
NAMESPACE     NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP                  19h
kube-system   kube-dns     ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   19h

C:\Users\Divyansh>

What i can infer from the output.

minikube is working fine

mesheryservice isn’t running

platform is kubernetes, which it should be

namespace is default

no meshery service is running ( there should be 4 up and running ).

Please start the meshery service as per the minikube docs in the meshery

mesheryctl system start
then
mesheryctl system dashboard --port-forward -p 9081

@ Divyansh_Khatri
Divyansh i also facing same problem,earlier i never use kubernetes so it is difficult for me to understand ,can you help me how to setup this ,if your problem is resolved,i also want to contribute in UI.

@Santosh_Kumar_Doodala
I applied the commands you said but it looks like it ultimatly deploys meshery using kubernetes .Before this i was deploying meshery using docker.My main problem still remains the same that kubernetes icon is still showing 0 connected clusters.
image

this is the full page

These are the logs after performing the following commands mesheryctl system start and mesheryctl system dashboard --port-forward -p 9081


C:\Users\Divyansh>mesheryctl system start
Checking for latest version of mesheryctl...

A new release of mesheryctl is available: v0.7.122 → v0.7.128
https://docs.meshery.io/project/releases/latest
Check https://docs.meshery.io/installation/upgrades#upgrading-meshery-cli for instructions on how to update mesheryctl

Starting Meshery...

Meshery deployed on Kubernetes.
Meshery is starting...
Opening Meshery (http://localhost:30648) in browser.

C:\Users\Divyansh>mesheryctl system dashboard --port-forward -p 9081
Starting Port-forwarding for Meshery UI
Forwarding port 8080 -> 9081
Meshery UI available at: http://localhost:9081
Opening Meshery UI in the default browser.

PS C:\Users\Divyansh> kubectl get pods -n meshery
NAME                                READY   STATUS    RESTARTS   AGE
meshery-5d6f857d99-hpq67            1/1     Running   0          3m27s
meshery-broker-0                    2/2     Running   0          3m16s
meshery-meshsync-7b69c5f5d9-4cjbr   1/1     Running   0          3m14s
meshery-operator-76fbf4d574-fzbsc   2/2     Running   0          3m23s
PS C:\Users\Divyansh>

I am trying to acheive something like this for the issue that i want to work on

I am still working on it. Will let you know if i figure it out. @Md_Adil

i also working on the same issue Divyansh_Khatri

@Divyansh_Khatri

May i know how you downloaded the mesheryctl ?

I would suggest you to start the mesheryctl anew.

minikube stop
minikube delete
minikube start
mesheryctl system start
mesheryctl system dashboard --port-forward -p 9081

and now try to access the localhost at 9081 port.

If this doesn’t resolve this , there is some other issue

@Santosh_Kumar_Doodala
I downloaded mesheryctl through the docker using this command curl -L https://meshery.io/install | PLATFORM=docker bash -

I don’t know if something is wrong with the project setup or what it still is not working.I am a windows user by the way. Should i raise an issue?

Hi @Divyansh_Khatri .
I am also new to the meshery. But i believe you are using Windows machine.
Although the command will install the files, would it create the .meshery configuration files is something i don’t know of.
moreover those commands are for mac/linux

My recommendation :-
Download it directly and configuring environment variable files like how use to set up mingw on windows.

No need a ticket right now, for now try the above method.

Setting up Meshery Development Environment on Windows

Thanks I will give it a try.

@Santosh_Kumar_Doodala
I have a question.i deleted and rebuilt everyting using docker
and now the previous problem has been solved regarding the k8icon but i don’t know for some reason my development env seems to be encountering problems that doesn’t seem to happen for other people.
This particular issue seems to be resolved as in the comment below one user reported that he is not encountering it anymore but for some reason it’s still happening for me.
(Comment)

image

also this particular issue opened by lee which for which a pr has been merged is still occuring for me in my local env.(Github Issue)

this is how it’s still showing on my end.

This is what i did:
1.First i ran curl -L https://meshery.io/install | PLATFORM=docker bash - which seems to install mesheryctl and deploy meshery on docker(doc reference) and then i just accessed my localhost:9081.i used wsl for this.

2.subsiquently everytime i want to start the meshery i run mesheryctl system start on ubuntu and the dev env runs on localhost:9081.

if you have any questions you need to ask me for helping me solve this please feel free to do so i want to resolve this as quickly as possilbe because it’s hindering my ability to contribute.

Tagging @Lee
Hi Lee, just wanted to bring this to your notice