我正在使用这个k8s javascript 客户端库。对于每 4 次或 5 次请求,它的投掷ECONNREFUSED
。我在 AWS 中运行 k8s。
{ Error: connect ECONNREFUSED <master-node-external-ip>:443
at Object._errnoException (util.js:1041:11)
at _exceptionWithHostPort (util.js:1064:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1153:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: <master-node-external-ip>,
port: 443 }
代码
const k8s = require('@kubernetes/client-node');
const k8sApi = k8s.Config.defaultClient();
const pods = k8sApi.listNamespacedPod('default');
版本
kube master node
kernelVersion: 4.4.78-k8s
kubeProxyVersion: v1.7.2
kubeletVersion: v1.7.2
我注意到在 AWS 我的主节点正在抛出
"RouteLimitExceeded: The maximum number of routes has been reached.
这可能是 ECONNREFUSED 的问题吗?