我有一个运行在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.
更多推荐
发布评论