Kubernetes GKE

编程入门 行业动态 更新时间:2024-10-28 09:23:11
Kubernetes GKE - DNS传播非常缓慢(Kubernetes GKE - DNS propagation very slow)

我有一个运行在GKE上的集群。 我有我的域名在Cloudflare注册。

当我在Cloudflare中添加/修改dns条目时,传播看起来非常快(使用https://dnschecker.org/之类的工具)。 然而在我的gke集群中,吊舱不能解析新条目(我必须等很长时间......)。 我尝试在我的kube-dns pod中添加dns解析器1.1.1.1,然后我可以解析kube-dns pods(kubedns和dnsmasq)中的新条目,但它仍然不适用于我的其他Pod(dnspolicy正确设置为ClusterFirst)。

谢谢你的帮助。

I have a cluster running on GKE. I have my domain names registered in Cloudflare.

When I add/modify dns entries in Cloudflare, the propagation seems to be very fast (using tools like https://dnschecker.org/). However in my gke cluster, the pods don't resolve the new entries (I have to wait a long long time...). I have tried to add the dns resolver 1.1.1.1 in my kube-dns pods, then I could resolve the new entries in the kube-dns pods (kubedns and dnsmasq) but it still doesn't work for my other pods (the dnspolicy is correctly set to ClusterFirst).

Thanks for your help.

最满意答案

您可以更改DNS上游名称服务器[1],但请记住DNS传播最多可能需要48小时。 以下是文档中的示例:

apiVersion: v1 kind: ConfigMap metadata: name: kube-dns namespace: kube-system data: upstreamNameservers: | ["1.1.1.1"]

[1] https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#example-upstream-nameserver

Thanks for your reply Pol Arroyo.

I found the answer, it has nothing to do with GKE, Cloudflare or a DNS resolver. In fact in my algorithm, I checked before the DNS update if the DNS pointed to the right IP. Doing so, dnsmasq keeped the answer that the DNS doesn't exist and I have to wait its cache to be updated.

更多推荐

本文发布于:2023-08-05 02:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1426190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Kubernetes   GKE

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!