Running system checks using Meshery CLI
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.
mesheryctl system check
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.
Deployment checks
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
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:
mesheryctl system check --preflight
Post-deployment checks
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 expected.
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:
mesheryctl system check
Additional checks
To check the status of the deployed adapters only, users can leverage the --adapter
flag as shown below:
mesheryctl system check --adapter
Users can also narrow down the tests to just check the status of the Meshery operator deployed on their Kubernetes cluster:
mesheryctl system check --operator
FAQ
Question: While running mesheryctl system check --preflight
it says I didn’t install Kubernetes, but I have Docker installed and the test returned “Meshery prerequisites met”. Is that all good?
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.
Question: I ran a preflight check to see if I satisfy all requirements for Meshery in my system. It returned postive results but I couldn’t start Meshery. What to do?
Answer: Make sure if you’ve configured your system to run Meshery in smooth manner. For configuration, do check out the docs site and this page to see instructions related to the platform you use.
Question: Do I need a Kubernetes cluster or will a Docker host suffice for Meshery deployments?
Answer: Meshery’s performance management functionality does not require a Kubernetes cluster. The rest of Meshery’s functionality (e.g. cloud native management) does require a Kubernetes cluster.
Question: What are Meshery’s production deployment requirements?
Answer: One or more Kubernetes clusters. A stateful set for Meshery Server in order to persist performance test results. See #2451.
Question: For system checks, do I need any add-ons to pass the check?
Answer: Not necessary. Basic requirements are enough to pass the check.
Question: The Adapter check is failing, it returns “Auth token not found”.
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
Question: I have a Kubernetes cluster enabled but Meshery couldn’t reach the cluster and the checks are failing! What to do?
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.
Question: Under Meshery Version test, I’m getting an error like “CLI is not up-to-date”. Should I update mesheryctl often?
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.
Question: Is it advisable to keep Meshery in sleep mode while running system checks?
Answer: Not necessary. It is good to keep Meshery up and running, else the system checks will fail to detect the Meshery version.
Question: What is the minimum version of k8s cluster and kubectl required to run Meshery?
Answer: For Kubernetes, version >=1.12.0 is recommended. For kubectl version >=1.12 is recommended.
Question: In the “Meshery Adapter” section of check, I could see only some Meshery adapters up and running and not all. Is this fine?
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)
Question: I started Meshery fresh, didn’t change any of the details in the context I have. But I see that all adapter checks are failing. What to do?
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 open up an issue in GitHub.
Suggested Reading
For an exhaustive list of mesheryctl
commands and syntax:
Guides to using Meshery’s various features and components.
Suggested Reading
- Authenticating with Meshery via CLI - Get your authentication token from Meshery CLI.
- Configuring Autocompletion for `mesheryctl` - Bash, Zsh, Oh My Zsh, and fish autocompletion for `mesheryctl` commands.
- Mesheryctl system commands - Mesheryctl system commands for managing Meshery deployments.
- Using Meshery CLI - Guides for common tasks while using Meshery's CLI, mesheryctl.
Recent Discussions with "mesheryctl" Tag
- Mar 20 | Not able to access Ports during mesheryctl system start
- Mar 05 | Tip: Series of commands to generate Meshery's model registry
- Feb 27 | Error while connecting minikube on meshery
- Nov 17 | Error while installing kubernetes
- Dec 12 | What port does mesheryctl work on generally?
- Dec 04 | Docker compose not available issue while running mesheryctl system start command
- Sep 05 | While Setting Environment for Meshery, Facing issue
- Aug 18 | Invalid Component Error while starting meshery system
- Aug 17 | Mesheryctl is not updating on the latest macOS Sonoma beta. Homebrew is giving me some error. Please help
- Aug 09 | New Performance features in mesheryctl
Suggested Reading
- Authenticating with Meshery via CLI - Get your authentication token from Meshery CLI.
- Configuring Autocompletion for `mesheryctl` - Bash, Zsh, Oh My Zsh, and fish autocompletion for `mesheryctl` commands.
- Mesheryctl system commands - Mesheryctl system commands for managing Meshery deployments.
- Using Meshery CLI - Guides for common tasks while using Meshery's CLI, mesheryctl.