我在我的K8S集群上运行了声纳浮标,DNS测试失败,但是我无法复制该问题。 如何,我如何理解它们为什么失败?
K8S版本-v1.9.11
Infra-Azure,Acs引擎v0.23.1
Sonobuoy版本-v0.11.6(最新支持K8S v1.9.11)。
运行命令-
sonobuoy run --kube-conformance-image "gcr.io/heptio-images/kube-conformance:v1.9"
失败的DNS测试:
[sig-network] DNS should provide DNS for services [Conformance]
[sig-network] DNS should provide DNS for the cluster [Conformance]
这是对K8S配置进行基准测试并在投入使用之前对其进行测试的一部分。
我手动运行的测试(我从日志中提取了该测试):
dig +notcp +noall +answer +search netperf-w2 A
dig +tcp +noall +answer +search netperf-w2 A
dig +notcp +noall +answer +search netperf-w2.network-test A
dig +tcp +noall +answer +search netperf-w2.network-test A
dig +notcp +noall +answer +search netperf-w2.network-test.svc A
dig +tcp +noall +answer +search netperf-w2.network-test.svc A
dig +notcp +noall +answer +search _http._tcp.netperf-w2.network-test.svc SRV
dig +tcp +noall +answer +search _http._tcp.netperf-w2.network-test.svc SRV
dig +notcp +noall +answer +search _http._tcp.test-service-2.network-test.svc SRV
dig +tcp +noall +answer +search _http._tcp.test-service-2.network-test.svc SRV
#podARec=$$(hostname -i| awk -F. '{print $$1"-"$$2"-"$$3"-"$$4".network-test.pod.cluster.local"}');
dig +notcp +noall +answer +search 10-240-1-76.network-test.pod.cluster.local A
dig +tcp +noall +answer +search 10-240-1-76.network-test.pod.cluster.local A
dig +notcp +noall +answer +search 103.187.0.10.in-addr.arpa. PTR
dig +tcp +noall +answer +search 103.187.0.10.in-addr.arpa. PTR
日志显示很多:
Jan 8 10:17:47.221: INFO: Unable to read wheezy_tcp@PodARecord from pod dns-test-7dbef827-132e-11e9-bd06-e20b33d4fc6d: the server could not find the requested resource (get pods dns-test-7dbef827-132e-11e9-bd06-e20b33d4fc6d)
Jan 8 10:17:47.346: INFO: Unable to read jessie_tcp@PodARecord from pod dns-test-7dbef827-132e-11e9-bd06-e20b33d4fc6d: the server could not find the requested resource (get pods dns-test-7dbef827-132e-11e9-bd06-e20b33d4fc6d)
Jan 8 10:17:47.356: INFO: Lookups using dns-test-7dbef827-132e-11e9-bd06-e20b33d4fc6d failed for: [wheezy_tcp@PodARecord jessie_tcp@PodARecord]
它的结尾是:
• Failure [619.219 seconds]
[sig-network] DNS
/workspace/anago-v1.9.4-beta.0.53+bee2d1505c4fe8/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/framework.go:22
should provide DNS for services [Conformance] [It]
/workspace/anago-v1.9.4-beta.0.53+bee2d1505c4fe8/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:648
Expected error:
<*errors.errorString | 0xc42026ab20>: {
s: "timed out waiting for the condition",
}
timed out waiting for the condition
not to have occurred
/workspace/anago-v1.9.4-beta.0.53+bee2d1505c4fe8/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/dns.go:170
最终,我希望了解故障的根本原因,并对如何更好地调试它有所了解。
The test在Kubernetes的仓库中。