2

When i do this command kubectl get pods --all-namespaces I get this Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

All of my pods are running and ready 1/1, but when I use this microk8s kubectl get service -n kube-system I get

kubernetes-dashboard        ClusterIP   10.152.183.132   <none>        443/TCP    6h13m
dashboard-metrics-scraper   ClusterIP   10.152.183.10    <none>        8000/TCP   6h13m

I am missing kube-dns even tho dns is enabled. Also when I type this for proxy for all ip addresses microk8s kubectl proxy --accept-hosts=.* --address=0.0.0.0 & I only get this Starting to serve on [::]:8001 and I am missing [1]84623 for example.

I am using microk8s and multipass with Hyper-V Manager on Windows, and I can't go to dashboard on the net. I am also a beginner, this is for my college paper. I saw something similar online but it was for Azure.

  • What happens if you log on to the ubuntu image running under multipass and run kubectl from there? (I am wondering if you have network visibility issues) If you are not sure how, run 'multipass list' to see a list of the vms. Then 'multipass exec -- /bin/bash'. Then install kubectl using 'sudo snap install kubectl'. Then lastly copy the contents of %HOME%\AppData\Local\MicroK8s\config (from the windows host) into /home/ubuntu/.kube/config of the ubuntu image. kubectl should then run from there. – Chris K Dec 26 '21 at 22:19
  • 1
    @ChrisK I just solved it by reinstalling multipass and microk8s. Now it works – Drexx_Dusan Dec 27 '21 at 00:27

1 Answers1

1

Posting answer from comments for better visibility: Problem solved by reinstalling multipass and microk8s. Now it works.

mdobrucki
  • 462
  • 1
  • 7