'MicroK8S pods have no connectivity

No pods in newly created MicroK8S cluster on my Ubuntu have any connectivity, including coredns:

  $ k logs -f coredns-64c6478b6c-4pdnj -n kube-system
...
E0429 07:44:07.522557 1 reflector.go:127] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:156:
Failed to watch *v1.Endpoints: failed to list *v1.Endpoints:
Get "https://10.152.183.1:443/api/v1/endpoints?limit=500&resourceVersion=0":
dial tcp 10.152.183.1:443: i/o timeout

However:

  $ curl -k https://10.152.183.1
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "Unauthorized",
  "reason": "Unauthorized",
  "code": 401
}%           

What am I doing wrong? Both ufw and iptables are off:

  $ systemctl is-active ufw || systemctl is-active iptables
inactive
inactive

All my other pods also appear to have no network connectivity, although connectivity on the host machine is completely fine.



Solution 1:[1]

We faced with the same error after force power off of the microk8s Machine. We have tried to check iptables and coredns But no results. I suppose the problem with the kube-API. Need to check API logs.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Roman Pankratov