E0826 15:59:20.782550 1 main.go:229] Failed to create SubnetManager: error retrieving pod spec for 'kube-flannel/kube-flannel-ds-k79vs': Get "https://10.0.0.1:443/api/v1/namespaces/kube-flannel/pods/kube-flannel-ds-k79vs": dial tcp 10.0.0.1:443: i/o timeout
这种报错一般是 集群网段设置错误造成的
查看kube-flannel.yaml
step1 检查 kube-controller-manager.conf 文件 --cluster-cidr=10.244.0.0/16
[root@k8s-master01 ~]# cat /opt/kubernetes/cfg/kube-controller-manager.conf
KUBE_CONTROLLER_MANAGER_OPTS="--logtostderr=false \
--v=2 \
--log-dir=/opt/kubernetes/logs \
--leader-elect=true \
--bind-address=127.0.0.1 \
--kubeconfig=/opt/kubernetes/cfg/kube-controller-manager.kubeconfig \
--allocate-node-cidrs=true \
--cluster-cidr=10.244.0.0/16 \
--service-cluster-ip-range=10.0.0.0/24 \
--cluster-signing-cert-file=/opt/kubernetes/ssl/ca.pem \
--cluster-signing-key-file=/opt/kubernetes/ssl/ca-key.pem \
--root-ca-file=/opt/kubernetes/ssl/ca.pem \
--service-account-private-key-file=/opt/kubernetes/ssl/ca-key.pem \
--cluster-signing-duration=87600h0m0s"
step2 检查 kube-proxy.conf clusterCIDR 为10.244.0.0/16文章来源:https://www.toymoban.com/news/detail-676694.html
[root@k8s-node01 ~]# cat /opt/kubernetes/cfg/kube-proxy-config.yml
kind: KubeProxyConfiguration
apiVersion: kubeproxy.config.k8s.io/v1alpha1
bindAddress: 0.0.0.0
metricsBindAddress: 0.0.0.0:10249
clientConnection:
kubeconfig: /opt/kubernetes/cfg/kube-proxy.kubeconfig
hostnameOverride: k8s-node01
clusterCIDR: 10.244.0.0/16
mode: ipvs
文章来源地址https://www.toymoban.com/news/detail-676694.html
到了这里,关于Flannel dial tcp X.X.X.X i/o timeout的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!