Kubernetes is an open-source container orchestration tool that works by distributing workload across a cluster of servers. This tool can also be used to automate container storage, networking, and persistent volumes while maintaining the container’s desired state. Managing a Kubernete cluster is often done using CLI tools like kubectl, minikube, kustomize, stern, k9s etc. This method of administration is usually easy only if you really understand what you are doing.
As the environment grows complex, you may need a tool to help manage your Kubernetes clusters. There are many tools in the market, including Lens, Portainer, Kubesphere, Kubenav, Headlamp etc. See more in this guide:
Today, we will learn how one can easily manage Kubernetes Clusters and its Applications using Meshery.
Meshery is an extensible Kubernetes manager with over 220 built-in integrations with support for cloud-native infrastructure apps. This tool can seamlessly integrate with any CNCF project, existing tools and Kubernetes clusters. In addition to that, it allows users to enhance their monitoring, CI/CD and security. Its cloud-native approach allows it to be incorporated into existing workflow with minimal effort.
Meshery offers innumerable features, some of which include:
- Manage data plane intelligence with WebAssembly filters: It allows the loading of custom WebAssembly filters in Envoy-based service meshes
- Simplify Infrastructure Management: Meshery streamlines Platform Engineering using GitOps and other extensions. It makes it easy to preview deployments, view changes pull request-to-pull request and get infrastructure snapshots within their PRs by connecting MeshMap to their GitHub repositories.
- Access the Cloud Native Patterns for Kubernetes: Meshery allows users to access, design and manage all the cloud native infra using the design configurator.
- Monitor the performance of your infrastructure and its workloads: You are able to track cloud-native performance from release to release. You can use performance profiles to track the historical performance of the workloads, get to understand the behavioral changes etc.
- Operate with configuration best practices: With Meshery, you can analyze configs by comparing them against the deployment and operational best practices using Meshery’s configuration validator.
- Context-Aware Policies For Applications: Users are able to enforce the configuration best practises by leveraging built-in relationships from code to Kubernetes.
The below steps cover all the steps required to install and use Meshery to manage Kubernetes Clusters and its Applications.
1. Install Kubernetes in Your Environment
This guide assumes that you already have a Kubernetes cluster set up and running in your environment. If not, you can follow any of the guides below.
You are also free to use Kubernetes on any cloud provider such as AKS, EKS, Google Kubernetes etc.
2. Install mesheryctl
mesheryctl is the CLI tool used to start and manage Meshery. There are many ways of installing it depending on your environment. The available methods include:
- Using Bash on Mac/Linux
##On Kubernetes
curl -L https://meshery.io/install | PLATFORM=kubernetes bash -
##On Docker
curl -L https://meshery.io/install | PLATFORM=docker bash -
- Using Scoop:
scoop bucket add mesheryctl https://github.com/layer5io/scoop-bucket.git
scoop install mesheryctl
- Using Brew:
brew install mesheryctl
- Using Binaries
It is also possible to download the mesheryctl
binary file from the Github releases page. On the page, select the appropriate archive for your system, download and extract it.
For example, export the version:
export VER=$(curl --silent "https://api.github.com/repos/meshery/meshery/releases/latest"|grep '"tag_name"'|sed -E 's/.*"([^"]+)".*/\1/'|sed 's/v//')
Now download the archive:
#Linux x86_64
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Linux_x86_64.tar.gz
#Linux arm64
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Linux_arm64.tar.gz
#Linux i386
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Linux_i386.tar.gz
#macOS x86_64
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Darwin_x86_64.tar.gz
#macOS arm64
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Darwin_arm64.tar.gz
#Windows i386
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Windows_i386.zip
#Windows x86_64
wget https://github.com/meshery/meshery/releases/download/v$VER/mesheryctl_${VER}_Windows_x86_64.zip
Now extract the file and copy the binary to your path. For example on Linux:
##On Linux
tar -xvf mesheryctl_${VER}_Linux_*.tar.gz
sudo cp mesheryctl /usr/local/bin
For Windows, you can install the .EXE file.
To verify the installation, execute:
$ mesheryctl version
VERSION GITSHA
Client v0.6.164 161f875c1f
Server unavailable unavailable
Unable to communicate with Meshery server.Get "http://localhost:9081/api/system/version": dial tcp 127.0.0.1:9081: connect: connection refused.See https://docs.meshery.io for help getting started with Meshery
Checking for latest version of mesheryctl...
v0.6.164 is the latest release.
3. Run Meshery in your Environment
We can use mesheryctl to start Meshery Web UI. The commands are different depending on how and where you set up your Kubernetes cluster.
Below are some of the commands you can use to run Meshery depending on your environment.
##Docker
mesheryctl system context create docker --platform docker --set
##On Kubernetes(with KUBECONFIG file)
mesheryctl system context create k8s --platform kubernetes --set
##Google Kubernetes Engine
mesheryctl system config gke --token *PATH_TO_TOKEN*
##AWS Elastic Kubernetes Service
mesheryctl system config eks
##Azure Kubernetes Service ( AKS )
mesheryctl system config aks
##Minikube
mesheryctl system config minikube
Once the config has been made, start Meshety with the command below. You can also start Meshery directly and upload your KUBECONFIG file later to connect to your cluster(if you used Scoop or Brew).
mesheryctl system start
For example on Kubernetes, you will have this:

Now you will have the pods running, check :
$ kubectl get pods -n meshery
NAME READY STATUS RESTARTS AGE
meshery-operator-8469dbcc67-sv2rn 2/2 Running 0 2m22s
meshery-67f86f66c6-f8wn9 1/1 Running 0 2m24s
meshery-meshsync-84c558fd65-7v66d 1/1 Running 0 2m10s
meshery-broker-0 2/2 Running 0 2m10s
Check the service:
$ kubectl get svc -n meshery
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
meshery-operator ClusterIP 10.43.73.128 <none> 10000/TCP 2m57s
meshery LoadBalancer 10.43.10.210 192.168.200.52,192.168.200.56 9081:31989/TCP 2m59s
meshery-broker LoadBalancer 10.43.173.123 192.168.200.52,192.168.200.56 4222:32717/TCP,6222:30732/TCP,8222:32053/TCP,7777:32684/TCP,7422:32495/TCP,7522:30015/TCP 2m45s
Now access the Meshery UI using port 9081 or the port to which the service has been exposed to 31989 for our case.
4. Access and Use Meshery Web UI
Once Meshery has been started, you can access the service use the URL http://IP_Address:9081

You will be required to select the provider in order to log in. Here, we will select Meshery as the provider and then authenticate as desired.

Once logged in, you will see this page. In some cases, Meshery may not connect to your cluster automatically. In that case, you need to navigate to settings and load your kubeconfig files.

You can upload the kubeconfig file as shown:

Once added, the cluster will appear as shown:

Now you can verify the connectivity and health of your cluster by clicking on the connection chip as shown:

Still, in the settings, you can get your Token(auth.json) which is required for some setups such as Minikube to authenticate to the cluster.

You then need to copy this token to the ~/.meshery/ then run the Minikube config command and start Meshery.
Once connected to the cluster, you will see the workloads and resources appear on the dashboard as shown:

Now you can design and operate the Kubernetes clusters and workloads as desired. You can view the sample apps in the Apps tab:

You can see the list of all the supported integrations under Configuration-> Applications->Designs

All extensions can be viewed in the extensions tab.

To learn more about Meshery, visit the official Meshery page.
Verdict
In this guide, we have learned how to install and get started with Meshery when managing your Kubernetes clusters and workloads. This tool can be vital when enhancing your cluster monitoring, CI/CD, and security solutions. I hope this was significant.
See more:
- Install and Use KubeSphere on existing Kubernetes cluster
- How To Manage Kubernetes Cluster using Portainer Dashboard
- How To Install and Use Headlamp Kubernetes Web UI
- Install Lens – Best Kubernetes Dashboard & IDE