Meshery: [mesheryctl] Failure to detect running Kubernetes and gracefully handle error

Created on 22 Mar 2021  Â·  4Comments  Â·  Source: layer5io/meshery

Description

Meshconfig with "kubernetes" as the platform and no locally running Docker service results in an error.

Expected Behavior

mesheryctl should have more graceful error handling when the Kubernetes platform is not available.

Screenshots/Logs

Context

➜  ~ mesheryctl system context view
endpoint: https://localhost:9081
token: Default
platform: kubernetes
adapters:
- meshery-istio
- meshery-linkerd
- meshery-consul
- meshery-nsm
- meshery-kuma
- meshery-cpx
- meshery-osm
- meshery-traefik-mesh
channel: stable
version: latest

Start

➜  ~ mesheryctl system start
creating ~/.meshery/manifests folder...
downloading manifest files from https://github.com/layer5io/meshery/tree/master/install/deployment_yamls/k8s
Starting Meshery...
applying the manifests to Kubernetes cluster...
Error: failed to start Meshery
See https://docs.meshery.io/guides/mesheryctl/#meshery-lifecycle-management for usage details
: failed to apply manifest files: failed to apply manifests: Error Applying manifest.Get https://kubernetes.docker.internal:6443/api?timeout=32s: dial tcp 127.0.0.1:6443: connect: connection refused
Usage:
  mesheryctl system start [flags]

Environment:

  • Meshery Version: v0.5.0-rc-6
componenmesheryctl kinbug

Most helpful comment

@navendu-pottekkat Yes, just started working on it.

All 4 comments

Suggested Implementation

Check if a cluster is running by adding a pre-requisite check for platform Kubernetes. This can be found in line 222 in helpers.go

func PreReqCheck(subcommand string, focusedContext string) error {

This should be achieved using Kubernetes client-go and not by running commands directly on the shell.

// @aneeshnema @metonymic-smokey FYI

@leecalcote @navendu-pottekkat Can I try this one?

@piyushsingariya I guess @metonymic-smokey might be already working on it?

@navendu-pottekkat Yes, just started working on it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anirudhjain75 picture anirudhjain75  Â·  4Comments

leecalcote picture leecalcote  Â·  4Comments

leecalcote picture leecalcote  Â·  4Comments

chandrashritii picture chandrashritii  Â·  3Comments

Aisuko picture Aisuko  Â·  3Comments