Connection Refused trying to run istioctl analyze

I’m trying to deploy the istio demo Bookinfo application on the microk8s-vm. When i try and run the istioctl analyze command I get this error

Any advice on how to fix this?

I have checked the k8’s config and this is the output I get

kubectl config view:

apiVersion: v1

clusters: null

contexts: null

current-context: “”

kind: Config

preferences: {}

users: null

Hi,
If you do microk8s config the output will show you the kubeconfig. You can pipe the output to your $HOME/.kube/config. The is the default location where kubernetes client looks for the kubeconfig.