Project: Meshery (Provisioning / Automation & Configuration)
File: minikube.md

layout: default title: Minikube permalink: installation/kubernetes/minikube type: installation category: kubernetes redirect_from: installation/platforms/minikube display-title: "false" language: en list: include image: /assets/img/platforms/minikube.png abstract: Install Meshery on Minikube. Deploy Meshery in Minikube in-cluster or outside of Minikube out-of-cluster. <h1>Quick Start with {{ page.title }} <img src="{{ page.image }}" style="width:35px;height:35px;" /></h1> Manage your Minikube clusters with Meshery. Deploy Meshery in Minikube or outside of Minikube . _Note: It is advisable to _ <div class="prereqs"><p><strong style="font-size: 20px;">Prerequisites</strong> </p> <ol> <li>Install the Meshery command line client, <a href="{{ site.baseurl }}/installation/mesheryctl" class="meshery-light">mesheryctl</a>.</li> <li>Install <a href="https://kubernetes.io/docs/tasks/tools/">kubectl</a> installed on your local machine.</li> </ol> </div> Also see: - - - - - - Follow the steps below to install Meshery in your Minikube cluster. Read through the following considerations prior to deploying Meshery on Minikube. Start the minikube, if not started using the following command: {% capture code_content %}minikube start --cpus 4 --memory 8192 --kubernetes-version=v1.14.1{% endcapture %} {% include code.html code=code_content %} Check up on your minikube cluster : {% capture code_content %}minikube status{% endcapture %} {% include code.html code=code_content %} Verify your kubeconfig's current context. {% capture code_content %}kubectl config current-context{% endcapture %} {% include code.html code=code_content %} If you are using port-forwarding, please refer to the guide for detailed instructions. Customize your Meshery Provider Callback URL. Meshery Server supports customizing authentication flow callback URL, which can be configured in the following way: {% capture codecontent %}$ MESHERYSERVERCALLBACKURL=https://custom-host mesheryctl system start{% endcapture %} {% include code.html code=code_content %} Meshery should now be running in your Minikube cluster and Meshery UI should be accessible at the `INTERNAL IP` of `meshery` service. Use Meshery's CLI to streamline your connection to your Minikube cluster. Configure Meshery to connect to your Minikube cluster by executing: {% capture code_content %}$ mesheryctl system config minikube{% endcapture %} {% include code.html code=code_content %} Once configured, execute the following command to start Meshery. {% capture code_content %}$ mesheryctl system start{% endcapture %} {% include code.html code=code_content %} If you encounter any authentication issues, you can use `mesheryctl system login`. For more information, click to learn more. For detailed instructions on installing Meshery using Helm V3, please refer to the guide. You may also manually generate and load the kubeconfig file for Meshery to use: The following configuration yaml will be used by

Copy and paste the following in your config file : {% capture code_content %}apiVersion: v1 clusters: cluster: certificate-authority-data: < cert shortcutted > server: https://192.168.99.100:8443 name: minikube contexts: context: cluster: minikube user: minikube name: minikube current-context: minikube kind: Config preferences: {} users: name: minikube user: client-certificate-data: < cert shortcutted > client-key-data: < key shortcutted >{% endcapture %} {% include code.html code=code_content %} Note: Make sure current-context is set to minikube. <br /> To allow Meshery to auto detect your config file, Run : {% capture codecontent %}kubectl config view --minify --flatten > configminikube.yaml{% endcapture %} {% include code.html code=code_content %} <br /> Meshery should now be connected with your managed Kubernetes instance. Take a look at the for advanced usage tips. Follow the to setup the mesheryctl CLI and install Meshery. Users using docker driver: After completing the Meshery installation, execute the following commands to establish connectivity between Meshery Server and Kubernetes cluster: <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs">docker network connect bridge mesherymeshery1</div></div> </pre> <br/> <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs">docker network connect minikube mesherymeshery1</div></div> </pre> To establish connectivity between a particular Meshery Adapter and Kubernetes server, use "docker ps" to identify the name of the desired container, and execute the following commands: <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs">docker network connect bridge &#60; container name of the desired adapter &#62;</div></div> </pre> <br/> <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs">docker network connect minikube &#60; container name of the desired adapter &#62;</div></div> </pre> Install Meshery on Docker (out-of-cluster) and connect it to your Minikube cluster. {% capture code_content %}$ mesheryctl system start -p docker{% endcapture %} {% include code.html code=code_content %} Configure Meshery to connect to your cluster by executing: {% capture code_content %}$ mesheryctl system config minikube{% endcapture %} {% include code.html code=code_content %} Once you have verified that all the services are up and running, Meshery UI will be accessible on your local machine on port 9081. Open your browser and access Meshery at . Run the below command to generate the "configminikube.yaml"_ file for your cluster: <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs">kubectl config view --minify --flatten > config_minikube.yaml</div></div> </pre> Upload the generated config file by navigating to Settings > Environment > Out of Cluster Deployment in the Web UI and using the "Upload kubeconfig" option. Optionally, you can verify the health of your Meshery deployment, using <a href='/reference/mesheryctl/system/check'>mesheryctl system check</a>. You're ready to use Meshery! Open your browser and navigate to the Meshery UI. {% include_cached installation/accessing-meshery-ui.md %} {% include related-discussions.html tag="meshery" %}