如何修复此错误"观看陈错误:etcdserver:mvcc:所需修订已被压缩"?

时间:2017-05-16 22:36:03

标签: kubernetes etcd kubernetes-health-check

我有一个带有两个节点的kubernetes集群,以及两个用于etcd的节点,我也在为我的kubernetes使用身份验证。当我运行此命令时:kubectl get cs我得到了这个输出:

NAME                 STATUS      MESSAGE                                                                                        ERROR
scheduler            Unhealthy   Get http://127.0.0.1:10251/healthz: dial tcp 127.0.0.1:10251: getsockopt: connection refused   
controller-manager   Healthy     ok                                                                                             
etcd-1               Healthy     {"health": "true"}                                                                             
etcd-0               Healthy     {"health": "true"}   

当我查看我的kube-apiserver的日志时,我收到此错误:

E0516 22:28:14.312855       1 watcher.go:188] watch chan error: etcdserver: mvcc: required revision has been compacted

这个错误是什么?我该如何解决这个问题?

我也得到了我的kube-controller-manager的警告:

W0516 22:28:14.314137       1 reflector.go:323] k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go:192: watch of <nil> ended with: etcdserver: mvcc: required revision has been compacted

并为我的kube-scheduler:

W0516 10:43:38.097940       1 reflector.go:323] k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go:451: watch of *v1.Pod ended with: too old resource version: 2153673 (2154157)

我的kubernetes版本是1.6.3

我真的很感谢你的帮助:)。

1 个答案:

答案 0 :(得分:0)

将etcd版本更新为3.0.11或更高版本

https://github.com/kubernetes/kubernetes/issues/45506