Project: Meshery (Provisioning / Automation & Configuration)
File: running-system-checks-using-mesheryctl.md

layout: default title: Running system checks using Meshery CLI permalink: guides/mesheryctl/running-system-checks-using-mesheryctl language: en type: guides category: mesheryctl list: include abstract: Run pre-flight and post-deployment system health checks using Meshery's CLI, mesheryctl. Meshery's CLI, `mesheryctl`, includes commands for verifying system readiness for a Meshery deployment and health checks to confirm the health of an existing Meshery deployment. Whether you have yet to deploy Meshery or have already deployed Meshery, `mesheryctl system check` is a useful utility to ensure that your Meshery deployments are healthy. <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">mesheryctl system check</div></div> </pre> <br/> <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">Verify environment pre/post-deployment of Meshery. Usage: mesheryctl system check [flags] Flags: --adapter Check status of Meshery adapters -h, --help help for check --operator Check status of Meshery operators --pre Verify environment readiness to deploy Meshery --preflight Verify environment readiness to deploy Meshery Global Flags: --config string path to config file (default "/Users/navendu/.meshery/config.yaml") -c, --context string (optional) temporarily change the current context. -v, --verbose verbose output -y, --yes (optional) assume yes for user interactive prompts.</div></div> </pre> `mesheryctl system check` command can run two types of system checks. A pre-deployment check which verifies the environment to deploy Meshery and a post-deployment check which runs validation checks on a running Meshery deployment. Pre-deployment checks runs checks on the environment and verifies whether it is ready for deploying Meshery. The following checks are done here: Docker health checks: Checks for the availability of Docker and docker-compose in the user's machine Kubernetes health checks: Checks for the availability of a Kubernetes cluster and checks if Meshery can initialize a Kubernetes client Kubernetes version checks: Checks if kubectl and the Kubernetes version are higher than the minimum supported versions Pre-deployment checks are run with the `--preflight` flag as shown below: <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">mesheryctl system check --preflight</div></div> </pre> Post-deployment checks are run after deploying Meshery in the user's environment. These checks ensure that the running deployment of Meshery and Meshery adapters are working as

In addition to the pre-flight checks, the following checks are also run in this check: Meshery version checks: Checks the version of Meshery server and CLI and shows if a new version is available Meshery Adapter health checks: Checks if all the specified adapters are deployed and reachable Post-deployment checks are run as shown below: <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">mesheryctl system check</div></div> </pre> To check the status of the deployed adapters only, users can leverage the `--adapter` flag as shown below: <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">mesheryctl system check --adapter</div></div> </pre> Users can also narrow down the tests to just check the status of the Meshery operator deployed on their Kubernetes cluster: <pre class="codeblock-pre"> <div class="codeblock"><div class="clipboardjs">mesheryctl system check --operator</div></div> </pre> Answer: Yes, as long as you've Docker installed, it's fine to run Meshery. But you will need a Kubernetes cluster to handle tasks such as deploying infrastructure and so on, if you want to do them via Meshery. Answer: Make sure if you've configured your system to run Meshery in smooth manner. For configuration, do check out the docs site and to see instructions related to the platform you use. Answer: Meshery's functionality does not require a Kubernetes cluster. The rest of Meshery's functionality (e.g. cloud native management) does require a Kubernetes cluster. Answer: One or more Kubernetes clusters. A stateful set for Meshery Server in order to persist performance test results. See . Answer: Not necessary. Basic requirements are enough to pass the check. Answer: You can log in to Meshery using `mesheryctl system login` which would generate an OAuth token. Once the OAuth token is generated, the check will start to function Answer: To resolve this error, you can upload your kubeconfig file in the Meshery UI under settings and Meshery will reconfigure to use your Kubernetes cluster. Answer: Yes! You should update the mesheryctl often in order to run Meshery smoothly. The reason behind it is because not only the CLI is updated, but also the Meshery app. So it is advisable to update Meshery often. Answer: Not necessary. It is good to keep Meshery up and running, else the system checks will fail to detect the Meshery version. Answer: For Kubernetes, version >=1.12.0 is recommended. For kubectl version >=1.12 is recommended. Answer: Not a problem, if you feel you need to have all mesh adapters to be up running, you can do so by creating a new context `mesheryctl system context create [context-name] --set` (if you voluntarily deleted mesh adapters in your current context) Answer: Configure Meshery to use on your Kubernetes cluster, then upload the kubeconfig file via Meshery UI to notify Meshery to use that cluster. If that didn't work, feel free to in GitHub. For an exhaustive list of `mesheryctl` commands and syntax: See . Guides to using Meshery's various features and components. {% capture tag %} <li><a href="{{ site.baseurl }}/guides/upgrade#upgrading-meshery-cli">Upgrading mesheryctl</a></li> {% endcapture %} {% include related-discussions.html tag="mesheryctl" %}