Troubleshooting Meshery Installations
Mesheryβs Preflight Checks
Anytime a mesheryctl system
command is executed, a series of preflight checks are run. An attempt will be made to connect to the Kubernetes cluster configured in the userβs kubeconfig as their current-context .
-
Check whether
mesheryctl
can initialize a Kubernetes client.Situation:
mesheryctl
fails to query for pods in the default namespace of the userβs current Kubernetes context. -
Remove
~/.meshery
to reinitialize MesherySituation: Unable to start Meshery Server with
make run-local
due to error ofkey/value size is invalid
Setting up Meshery using Kind or Minikube
The difficulty with Minikube and Kind clusters is that they typically donβt support LoadBalancer service networking by default. Meshery UI and Meshery Broker are configured for LoadBalancer service networking by default. There are a number of solutions this overcoming this challenge. Here are a few methods:
-
Use the MetalLB Minikube add-on that provides load balancing.
minikube addons enable metallb
MetalLB setup: link
-
Use Minikube tunnel to expose services.
minikube tunnel
.Docs: link
A simpler way to resolve this issue can be
port-forwarding
. Run the following command in terminal:kubectl port-forward service/meshery 9081:9081 -n meshery
Note: The --port-forward
flag is intended for use exclusively when Meshery is deployed in a Kubernetes cluster (platform: kubernetes
).
-
For
kind
, you can prefer installing MetalLB with a custom configmap.Docs: link
Meshery Operator
By default, Meshery Operator is installed in all the connected clusters automatically once Meshery server detects those clusters. The operator can manually be turned off on particular cluster from the settings page.
Disabling the operator
The env variable DISABLE_OPERATOR=true can be used to signal Meshery server to not install operator in any of the clusters at any point in time after starting. While using Meshery server locally, the make server-without-operator
should be used to start Meshery in disabled operator mode.
Meshery Broker
Example of a healthy Meshery Broker server with an actively connected (subscribed) Meshery Server:
β ~ kubectl logs -n meshery meshery-broker-0 nats
[8] 2021/09/08 21:46:03.070952 [INF] Starting nats-server version 2.1.9
[8] 2021/09/08 21:46:03.070982 [INF] Git commit [7c76626]
[8] 2021/09/08 21:46:03.071308 [INF] Starting http monitor on 0.0.0.0:8222
[8] 2021/09/08 21:46:03.071370 [INF] Listening for client connections on 0.0.0.0:4222
[8] 2021/09/08 21:46:03.071512 [INF] Server id is NAAYJNX4LDDNXW5UE7IP7PRQR2W2JP546XSFNUWQQHN7JYY27RG47KSG
[8] 2021/09/08 21:46:03.071516 [INF] Server is ready
For details about the state of the Meshery Server subscription see the http monitor port on Meshery Broker.
Meshery Unable to Connect to Kubernetes
Meshery is unable to detect the Kubernetes connection running on your local system, even after manually uploading the .kube config
file
When deploying Meshery out-of-cluster, verify your kubeconfigβs contexts and the ability for Meshery Server to reach Kubernetes cluster API from whatever host and network that Meshery Server is being deployed on.
kubectl config get-contexts
If youβre using Docker Destkop, consider whether you need to change your current Kubernetes context to docker-desktop
.
kubectl config use-context docker-desktop
Meshery Remote Providers
Once Meshery is installed, the remote provider βMesheryβ can be chosen from UI or by using the command mesheryctl system login
:
β ~ mesheryctl system login
Use the arrow keys to navigate: β β β β
? Select a Provider:
βΈ Meshery
None
If you cannot see βMesheryβ Remote Provider and find such error logs in Meshery Serverβs logs (mesheryctl system logs
), please make sure that Meshery Server is able to reach βhttps://cloud.layer5.ioβ in order to initialize the βMesheryβ Remote Provider.
time="2021-11-10T11:05:30Z" level=error msg="[Initialize Provider]: Failed to get capabilities Get \"https://cloud.layer5.io/v0.5.71/capabilities?os=meshery\": dial tcp 3.140.89.205:443: i/o timeout"
For more details about Meshery Providers:
See Also
Suggested Reading
- Meshery Operator, MeshSync, Broker Troubleshooting Guide - Comprehensive guidance for troubleshooting Meshery Operator, MeshSync and Broker deployments under various scenarios.
- Troubleshooting Errors while running Meshery - Troubleshooting Meshery errors when running make run-fast / meshery system start