![](/img/trans.png)
[英]AKS AGIC: Readiness probe failed: Get "http://192.168.0.12:8123/health/ready": context deadline exceeded
[英]context deadline exceeded when check etcd health
我正在使用以下命令检查 etcd(3.3.13) 集群状态:
[root@iZuf63refzweg1d9dh94t8Z work]# /opt/k8s/bin/etcdctl endpoint health --cluster
https://172.19.150.82:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.231:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.230:2379 is unhealthy: failed to connect: context deadline exceeded
Error: unhealthy cluster
检查 etcd 成员:
[root@iZuf63refzweg1d9dh94t8Z work]# /opt/k8s/bin/etcdctl member list
56298c42af788da7, started, azshara-k8s02, https://172.19.104.230:2380, https://172.19.104.230:2379
5ab2d0e431f00a20, started, azshara-k8s01, https://172.19.104.231:2380, https://172.19.104.231:2379
84c70bf96ccff30f, started, azshara-k8s03, https://172.19.150.82:2380, https://172.19.150.82:2379
我的集群部署成功?如果没有,如何解决上下文截止时间超出错误? 我试过这个:
export ETCDCTL_API=3
[root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint status --write-out=table
+----------------+------------------+---------+---------+-----------+-----------+------------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
+----------------+------------------+---------+---------+-----------+-----------+------------+
| 127.0.0.1:2379 | 5ab2d0e431f00a20 | 3.3.13 | 2.0 MB | false | 20 | 39303798 |
+----------------+------------------+---------+---------+-----------+-----------+------------+
[root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint health
127.0.0.1:2379 is healthy: successfully committed proposal: took = 1.816293ms
[root@ops001 ~]# /opt/k8s/bin/etcdctl endpoint health --cluster
https://172.19.150.82:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.231:2379 is unhealthy: failed to connect: context deadline exceeded
https://172.19.104.230:2379 is unhealthy: failed to connect: context deadline exceeded
Error: unhealthy cluster
如何解决上下文截止时间超出错误?
该错误具有误导性; 它通常是由etcdctl
未提供凭据和/或未使用与集群相同的ETCDCTL_API=
值引起的。 如果它是一个现代etcd
版本,你要export ETCDCTL_API=3
,其次是提供相同--cert-file=
和--key-file=
和可能--trusted-ca-file=
为用于启动etcd
本身。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.