我搜索过,但没有任何东西帮助我度过难关。
我的套装。
k8s - v1.20.2.
calico - 3.16.6
pod-cidr = 10.214.0.0/16。
服务-cidr= 10.215.0.1/16。
用这个https://kubernetes.io/ko/docs/setup/production-environment/tools/kubespray安装了kubespray
dns-自动分号吊舱日志
github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to list *v1.Node: Get https://10.215.0.1:443/api/v1/nodes: dial tcp 10.215.0.1:443: i/o timeoutdns-自动分词器
kubelet Readiness probe failed: Get "http://10.214.116.129:8080/healthz": context deadline exceeded (Client.Timeout exceeded while awaiting headers)核荚原木
pkg/mod/k8s.io/client-go@v0.18.3/tools/cache/reflector.go:125: Failed to list *v1.Namespace: Get "https://10.215.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0": dial tcp 10.215.0.1:443: i/o timeout核荚描述
Get "http://10.214.122.1:8080/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)我试着安装入口-nginx控制器它给我提供了日志和描述。
入口-控制器日志
W0106 04:17:16.715661 6 flags.go:243] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W0106 04:17:16.715911 6 client_config.go:541] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0106 04:17:16.716200 6 main.go:182] Creating API client for https://10.215.0.1:入口-控制器描述
Liveness probe failed: Get "https://10.214.233.2:8443/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)所有这些吊舱都在挣扎,准备/活性探测失败: Get "http://10.214.116.155:10254/healthz":context截止日期超过了(等待标头时超过了Client.Timeout)。
卡利科在跑。我检查了吊舱到吊舱的通讯(好的)。
kubectl获得组件状态
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused
scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused
etcd-1 Healthy {"health":"true"}
etcd-2 Healthy {"health":"true"}
etcd-0 Healthy {"health":"true"}kubectl获得组件状态我遵循了如何解决Kubernetes中调度器和控制器管理器的不健康状态,现在调度器和控制器管理器都很健康。
kubectl获取节点
Nodes are ready.我做错了什么?T.T.
提前感谢
发布于 2022-07-27 17:30:01
在向Kubernetes部署应用程序时遇到了这个问题。
警告不健康的10m (x3206超过3d16h) kubelet活性探测失败: Get "http://10.2.0.97:80/":context截止日期超过(Client.Timeout超过等待标头时)
我在舱里做了个主管:
kubectl exec <pod-name> -it --namespace default /bin/bash然后我运行了一个卷曲请求的IP和端口的吊舱:
curl 10.2.0.97:80结果得到了成功的回应。但活性探针仍未成功执行。
,我是怎么解决这个问题的:
我所要做的就是把timeoutSeconds提高到10
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 300
periodSeconds: 20
timeoutSeconds: 10之后,活性探针开始成功执行。
对于准备状态探测器也可以这样做:
ReadinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 10参考:有时活动/就绪探测失败是因为net/http:请求在等待连接时被取消(等待头时超过了Client.Timeout)
https://stackoverflow.com/questions/70602906
复制相似问题