我的Ubuntu上新创建的MicroK8S集群没有任何连接,包括coredns:
$ k logs -f coredns-64c6478b6c-4pdnj -n kube-system
...
E0429 07:44:07.522557 1 reflector.go:127] pkg/mod/k8s.io/client-go@v0.19.2/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
然而:
$ curl -k https://10.152.183.1
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "Unauthorized",
"reason": "Unauthorized",
"code": 401
}%
我做错了什么?ufw和iptables都关闭:
$ systemctl is-active ufw || systemctl is-active iptables
inactive
inactive
我所有的pod似乎也没有网络连接,尽管主机上的连接完全正常。
强行关闭microk8s Machine后,我们遇到了同样的错误。我们已经尝试检查iptables和coredns,但是没有结果。我想是kube-API的问题。需要检查API日志