Codespaces

Use Minikube in GitHub Codespaces to set up a development environment for Meshery.

Prerequisites

  1. Install the Meshery command line client, mesheryctl.

Available Deployment Methods

In-cluster Installation

Follow these steps to install Meshery in your Minikube cluster.

Preflight Checks

Before you deploy Meshery on Minikube, check the following.

Preflight: Cluster Connectivity

You can develop and run Meshery in GitHub Codespaces using your choice of tool:

  • A command shell, via an SSH connection initiated using GitHub CLI.
  • One of the JetBrains IDEs, via the JetBrains Gateway.
  • The Visual Studio Code desktop application.
  • A browser-based version of Visual Studio Code.

Start Minikube if it is not already running:

	
minikube start --cpus 4 --memory 4096

Set --cpus and --memory to fit the machine type you chose in GitHub Codespaces. To check the status of your Minikube cluster:

	
minikube status

Verify that kubectl can reach the cluster:

	
kubectl cluster-info

Installation: Using mesheryctl

Start Meshery in your Minikube cluster:

	
mesheryctl system start -p kubernetes

Meshery Server running in the cluster connects to it automatically. If the connection does not appear, sign in with mesheryctl system login and create it with mesheryctl connection create --type minikube, which uploads your kubeconfig to Meshery Server. (mesheryctl system config minikube is deprecated.) For more on signing in, see Authenticate with Meshery via CLI.

Installation: Using Helm

To install Meshery with Helm 3, see the Helm Installation guide.

Installation: Manual Steps

You can also generate a self-contained kubeconfig for your Minikube cluster and upload it to Meshery yourself. Export the minikube context, with its certificates embedded:

	
kubectl config view --minify --flatten --context minikube > config_minikube.yaml

The file looks like this, with your own server address and certificate data:

	
apiVersion: v1 kind: Config clusters: - cluster: certificate-authority-data: <certificate data> server: https://192.168.49.2:8443 name: minikube contexts: - context: cluster: minikube user: minikube name: minikube current-context: minikube preferences: {} users: - name: minikube user: client-certificate-data: <certificate data> client-key-data: <key data>

Note: Make sure that current-context is minikube.

Then upload config_minikube.yaml in Meshery UI: go to Lifecycle > Connections, click Create Connection, choose Kubernetes, and upload the file in the Import Kubeconfig step. See Registering a Connection. Take a look at the Meshery guides for advanced usage tips.

Post-Installation Steps

Optionally, verify the health of your Meshery deployment with mesheryctl system check.

You’re ready to use Meshery. Open Meshery UI in your browser.

Accessing Meshery UI

Once Meshery is running, mesheryctl system start opens Meshery UI in your default browser. On Docker, Meshery UI listens at http://localhost:9081 by default. On Kubernetes, mesheryctl opens the address of the meshery service in the meshery namespace, which the Helm chart creates as a LoadBalancer service on port 9081.

To open Meshery UI in your default browser at any time, run:

mesheryctl system dashboard

If your cluster does not give the meshery service a reachable address, forward a local port to Meshery instead. By default, mesheryctl listens on local port 9081; use -p to choose another port.

mesheryctl system dashboard --port-forward

You can also port-forward with kubectl:

kubectl port-forward svc/meshery 9081:9081 --namespace meshery

Verify Kubernetes Connection

Whichever way you installed Meshery, verify that Meshery is connected to your cluster:
  1. In the Meshery UI, navigate to Lifecycle from the menu on the left.
  2. Select Connections.
  3. Ensure that your cluster appears in the list of connections and is marked as Connected.
  4. Click the cluster name to run a connectivity test and confirm that Meshery can reach your cluster.
Customizing Your Meshery Provider Callback URL

You can customize the callback URL that your Meshery Provider redirects to after sign-in. This helps when Meshery runs behind several layers of networking infrastructure.

For production deployments, we recommend that you expose Meshery UI through a reverse proxy or a load balancer. A custom callback URL makes sure that sign-in completes even when requests pass through several routing layers.

Note: For production deployments, use a Remote Provider so that you control which identity providers can sign users in. Learn more about this in the Extensibility: Providers guide.

To set a custom callback URL, set the MESHERY_SERVER_CALLBACK_URL environment variable when you start Meshery:

MESHERY_SERVER_CALLBACK_URL=https://custom-host mesheryctl system start

On Kubernetes, Meshery UI is then available at the EXTERNAL-IP of the meshery service. Run kubectl get svc meshery -n meshery to find it.

To reach Meshery UI from your browser, forward its port from the codespace. See Forwarding ports in your codespace.