♊️ GemiNews 🗞️
🏡
📰 Articles
🏷️ Tags
🧠 Queries
📈 Graphs
☁️ Stats
💁🏻 Assistant
Demo 1: Embeddings + Recommendation
Demo 2: Bella RAGa
Demo 3: NewRetriever
Demo 4: Assistant function calling
Editing article
Title
Summary
<div class="block-paragraph_advanced"><p><a href="https://cloud.google.com/kubernetes-engine"><span style="text-decoration: underline; vertical-align: baseline;">Google Kubernetes Engine</span></a><span style="vertical-align: baseline;"> (GKE) offers two different ways to perform </span><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery"><span style="text-decoration: underline; vertical-align: baseline;">service discovery and DNS resolution</span></a><span style="vertical-align: baseline;">: the in-cluster kube-dns functionality, and GCP managed </span><a href="https://cloud.google.com/dns"><span style="text-decoration: underline; vertical-align: baseline;">Cloud DNS</span></a><span style="vertical-align: baseline;">. Either approach can be combined with the performance-enhancing NodeLocal DNSCache add-on. </span></p> <p><span style="vertical-align: baseline;">New GKE Autopilot clusters use Cloud DNS as a fully managed DNS solution for your GKE Autopilot clusters without any configuration required on your part. But for GKE Standard clusters, you have the following DNS provider choices:</span></p> <ol> <li aria-level="1" style="list-style-type: decimal; vertical-align: baseline;"> <p role="presentation"><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/kube-dns"><span style="text-decoration: underline; vertical-align: baseline;">Kube-dns</span></a><span style="vertical-align: baseline;"> (default) </span></p> </li> <li aria-level="1" style="list-style-type: decimal; vertical-align: baseline;"> <p role="presentation"><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns"><span style="text-decoration: underline; vertical-align: baseline;">Cloud DNS</span></a><span style="vertical-align: baseline;"> - configured for either cluster-scope or VPC scope, and </span></p> </li> <li aria-level="1" style="list-style-type: decimal; vertical-align: baseline;"> <p role="presentation"><span style="vertical-align: baseline;">Install and run your own DNS (like Core DNS)</span></p> </li> </ol> <p><span style="vertical-align: baseline;">In this blog, we break down the differences between </span><span style="vertical-align: baseline;">the DNS providers for your GKE Standard clusters</span><span style="vertical-align: baseline;">, and guide you to the best solution for your specific situation. </span></p> <h3><strong style="vertical-align: baseline;">Kube-DNS </strong></h3></div> <div class="block-image_full_width"> <div class="article-module h-c-page"> <div class="h-c-grid"> <figure class="article-image--large h-c-grid__col h-c-grid__col--6 h-c-grid__col--offset-3 " > <img src="https://storage.googleapis.com/gweb-cloudblog-publish/images/1_gZbgxg4.max-1000x1000.png" alt="1"> </a> </figure> </div> </div> </div> <div class="block-paragraph_advanced"><p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/kube-dns"><span style="text-decoration: underline; vertical-align: baseline;">kube-dns</span></a><span style="vertical-align: baseline;"> is the default DNS provider for Standard GKE clusters, providing DNS resolution for services and pods within the cluster. If you select this option, GKE deploys the necessary kube-dns components such as Kube-dns pods, Kube-dns-autoscaler, Kube-dns configmap and Kube-dns service in the kube-system namespace.</span></p> <p><span style="vertical-align: baseline;">kube-dns is the default DNS provider for GKE Standard clusters and the only DNS provider for Autopilot clusters running versions earlier than 1.25.9-gke.400 and 1.26.4-gke.500.</span></p> <p><span style="vertical-align: baseline;">Kube-dns is a suitable solution for workloads with moderate DNS query volumes that have stringent</span><span style="vertical-align: baseline;"> DNS resolution latency requirements (e.g. under ~2-4ms). Kube-dns is able to provide low latency DNS resolution for all DNS queries as </span><span style="vertical-align: baseline;">all the DNS resolutions are performed within the cluster.</span></p> <p><span style="vertical-align: baseline;">If you notice DNS timeouts or failed DNS resolutions for bursty workload traffic patterns when using kube-dns, consider scaling the number of kube-dns pods, and enabling NodeLocal DNS cache for the cluster</span><span style="vertical-align: baseline;">. </span><span style="vertical-align: baseline;">You can scale the number of kube-dns pods beforehand using</span><span style="vertical-align: baseline;"> </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/nodelocal-dns-cache#scaling_up_kube-dns"><span style="text-decoration: underline; vertical-align: baseline;">Kube-dns autoscaler</span></a><span style="vertical-align: baseline;">, and manually tuning it to the cluster's DNS traffic patterns. Using kube-dns along with Nodelocal DNS cache (discussed below) also reduces overhead on the kube-dns pods for DNS resolution of external services. </span></p> <p><span style="vertical-align: baseline;">While scaling up kube-dns and using NodeLocal DNS Cache(NLD) helps in the short term, it does not guarantee </span><span style="vertical-align: baseline;">reliable DNS resolution</span><span style="vertical-align: baseline;"> during sudden traffic spikes. Hence migrating to Cloud DNS provides a more robust and long-term solution for improved </span><span style="vertical-align: baseline;">reliability of DNS resolution consistently across varying DNS query volumes</span><span style="vertical-align: baseline;">. You can update the DNS provider for your existing GKE Standard from </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns"><span style="text-decoration: underline; vertical-align: baseline;">kube-dns to Cloud DNS</span></a><span style="vertical-align: baseline;"> without requiring to re-create your existing cluster. </span></p> <p><span style="vertical-align: baseline;">For logging the DNS queries when using kube-dns, there is manual effort required in creating a </span><span style="vertical-align: baseline;">new </span><a href="https://cloud.google.com/knowledge/kb/enable-dns-queries-log-in-google-kubernetes-engine-000004855"><span style="text-decoration: underline; vertical-align: baseline;">kube-dns debug pod</span></a><span style="vertical-align: baseline;"> with log-queries enabled. </span></p> <h3><strong style="vertical-align: baseline;">Cloud DNS</strong></h3> <p><a href="https://cloud.google.com/dns/docs/overview/"><span style="text-decoration: underline; vertical-align: baseline;">Cloud DNS</span></a><span style="vertical-align: baseline;"> is a </span><strong style="vertical-align: baseline;">Google-managed service</strong><span style="vertical-align: baseline;"> that is designed for high scalability and availability. </span><span style="vertical-align: baseline;">In addition, Cloud DNS elastically scales to adapt to your DNS query volume, providing consistent and reliable DNS query resolution regardless of traffic volume. Cloud DNS simplifies your operations and minimizes operational overhead since it is a Google managed service and does not require you to maintain any additional infrastructure.</span><span style="vertical-align: baseline;"> Cloud DNS supports dns resolutions across the entire VPC, which is something not currently possible with kube-dns.</span></p> <p><span style="vertical-align: baseline;">Also, while using </span><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-services"><span style="text-decoration: underline; vertical-align: baseline;">Multi Cluster Services</span></a><span style="vertical-align: baseline;"> (MCS) in GKE, </span><span style="vertical-align: baseline;">Cloud DNS provides DNS resolution for services across your </span><a href="https://cloud.google.com/anthos/fleet-management/docs"><span style="text-decoration: underline; vertical-align: baseline;">fleet of clusters</span></a><span style="vertical-align: baseline;">.</span></p></div> <div class="block-image_full_width"> <div class="article-module h-c-page"> <div class="h-c-grid"> <figure class="article-image--large h-c-grid__col h-c-grid__col--6 h-c-grid__col--offset-3 " > <img src="https://storage.googleapis.com/gweb-cloudblog-publish/images/2_b9PLEA8.max-1000x1000.png" alt="2"> </a> </figure> </div> </div> </div> <div class="block-paragraph_advanced"><p><span style="vertical-align: baseline;">Unlike kube-dns, Google Cloud’s hosted DNS service </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns"><span style="text-decoration: underline; vertical-align: baseline;">Cloud DNS</span></a><span style="vertical-align: baseline;"> provides Pod and Service DNS resolution that auto-scales and offers a </span><a href="https://cloud.google.com/dns/sla"><span style="text-decoration: underline; vertical-align: baseline;">100% service-level agreement</span></a><span style="vertical-align: baseline;">,</span><span style="vertical-align: baseline;"> reducing DNS </span><span style="vertical-align: baseline;">timeouts and </span><span style="vertical-align: baseline;">providing consistent DNS resolution latency</span><span style="vertical-align: baseline;"> for heavy DNS workloads.</span></p> <p><span style="vertical-align: baseline;">Cloud DNS also integrates with </span><a href="https://cloud.google.com/dns/docs/monitoring"><span style="text-decoration: underline; vertical-align: baseline;">Cloud Monitoring</span></a><span style="vertical-align: baseline;">, giving you greater visibility into DNS queries for enhanced troubleshooting and analysis. </span></p> <p><span style="vertical-align: baseline;">The Cloud DNS controller automatically provisions DNS records for pods and services in Cloud DNS for ClusterIP, headless and external name services. </span></p> <p><span style="vertical-align: baseline;">You can configure Cloud DNS to provide GKE DNS resolution in either </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#vpc_scope_dns"><span style="text-decoration: underline; vertical-align: baseline;">VPC</span></a><span style="vertical-align: baseline;"> or </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns"><span style="text-decoration: underline; vertical-align: baseline;">Cluster</span></a><span style="vertical-align: baseline;"> (the default) scope. With VPC scope, the DNS records are resolvable with the entire VPC. This is achieved with the private DNS zone that gets created automatically. With Cluster scope, the DNS records are resolvable only within the cluster.</span></p> <p><span style="vertical-align: baseline;">While Cloud DNS offers enhanced features, it does come with </span><a href="https://cloud.google.com/dns/pricing"><span style="text-decoration: underline; vertical-align: baseline;">usage-based costs</span></a><span style="vertical-align: baseline;">. You save on compute costs and overhead by removing kube-dns pods when using Cloud DNS. Considering the typical cluster size workload traffic patterns, Cloud DNS is usually more cost effective than running kube-dns</span></p> <p><span style="vertical-align: baseline;">You can </span><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns"><span style="text-decoration: underline; vertical-align: baseline;">migrate clusters from kube-dns to Cloud</span></a><span style="vertical-align: baseline;"> DNS cluster scope without downtime or changes to your applications</span><span style="vertical-align: baseline;">. The reverse (migrating from Cloud DNS to kube-dns) is not a seamless operation.</span></p> <h3><strong style="vertical-align: baseline;">NodeLocal DNSCache</strong></h3></div> <div class="block-image_full_width"> <div class="article-module h-c-page"> <div class="h-c-grid"> <figure class="article-image--large h-c-grid__col h-c-grid__col--6 h-c-grid__col--offset-3 " > <img src="https://storage.googleapis.com/gweb-cloudblog-publish/images/3_njIGHJZ.max-1000x1000.png" alt="3"> </a> </figure> </div> </div> </div> <div class="block-paragraph_advanced"><p><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/nodelocal-dns-cache#architecture"><span style="text-decoration: underline; vertical-align: baseline;">NodeLocal DNSCache</span></a><span style="vertical-align: baseline;"> is a GKE add-on that you can run in addition to </span><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery"><span style="text-decoration: underline; vertical-align: baseline;">kube-dns</span></a><span style="vertical-align: baseline;"> and Cloud DNS. The node-local-dns pod gets deployed on the GKE nodes after the option has been enabled (subject to a node upgrade procedure). </span></p> <p><span style="vertical-align: baseline;">Nodelocal DNS Cache (NLD) helps to reduce the average DNS resolution times by resolving the DNS requests locally on the same nodes as the pods, and only forwards requests that it cannot resolve to the other DNS servers in the cluster. This is a great fit for clusters that have heavy internal DNS query loads. </span></p> <p><span style="vertical-align: baseline;">Enable NLD during maintenance windows. Please note that node pools must be re-created for this change to take effect.</span></p> <h3><strong style="vertical-align: baseline;">Final thoughts</strong></h3> <p><span style="vertical-align: baseline;">The choice of DNS provider for your GKE Standard cluster has implications for the performance and reliability, in addition to your operations and overall service discovery architecture. </span><span style="vertical-align: baseline;">Hence, it is crucial for GKE Standard users to understand their DNS options taking into account their application and architecture objectives</span><span style="vertical-align: baseline;">. Standard GKE clusters allow you to use either kube-dns or Cloud DNS as your DNS provider, allowing you to optimize for either low latency DNS resolution or a simple, scalable and reliable DNS solution for GKE Standard clusters. You can learn more about DNS for your GKE cluster from the </span><a href="https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery"><span style="text-decoration: underline; vertical-align: baseline;">GKE documentation </span></a><span style="vertical-align: baseline;">. If you have any further questions, feel free to </span><a href="https://cloud.google.com/contact/?_gl=1*11nzsgc*_up*MQ..&gclid=CjwKCAjwkuqvBhAQEiwA65XxQLJotHHWHX6hkVrSeba0VuZxzHaRaPWL-3-Jk5LLIRDWWC5-N8iYbxoC5wkQAvD_BwE&gclsrc=aw.ds"><span style="text-decoration: underline; vertical-align: baseline;">contact us</span></a><span style="vertical-align: baseline;">.</span></p> <hr/> <p><sup><span style="font-style: italic; vertical-align: baseline;">We thank the Google Cloud team member who contributed to the blog: </span><span style="vertical-align: baseline;">Selin Goksu, Technical Solutions Developer, Google</span></sup></p></div>
Content
Author
Link
Published date
Image url
Feed url
Guid
Hidden blurb
--- !ruby/object:Feedjira::Parser::RSSEntry published: 2024-04-03 16:00:00.000000000 Z carlessian_info: news_filer_version: 2 newspaper: Google Cloud Blog macro_region: Technology entry_id: !ruby/object:Feedjira::Parser::GloballyUniqueIdentifier guid: https://cloud.google.com/blog/products/networking/understanding-dns-options-for-gke/ title: DNS providers for Google Kubernetes Engine explained categories: - Containers & Kubernetes - GKE - Developers & Practitioners - Networking summary: "<div class=\"block-paragraph_advanced\"><p><a href=\"https://cloud.google.com/kubernetes-engine\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Google Kubernetes Engine</span></a><span style=\"vertical-align: baseline;\"> (GKE) offers two different ways to perform </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery\"><span style=\"text-decoration: underline; vertical-align: baseline;\">service discovery and DNS resolution</span></a><span style=\"vertical-align: baseline;\">: the in-cluster kube-dns functionality, and GCP managed </span><a href=\"https://cloud.google.com/dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cloud DNS</span></a><span style=\"vertical-align: baseline;\">. Either approach can be combined with the performance-enhancing NodeLocal DNSCache add-on. </span></p>\n<p><span style=\"vertical-align: baseline;\">New GKE Autopilot clusters use Cloud DNS as a fully managed DNS solution for your GKE Autopilot clusters without any configuration required on your part. But for GKE Standard clusters, you have the following DNS provider choices:</span></p>\n<ol>\n<li aria-level=\"1\" style=\"list-style-type: decimal; vertical-align: baseline;\">\n<p role=\"presentation\"><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/kube-dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Kube-dns</span></a><span style=\"vertical-align: baseline;\"> (default) </span></p>\n</li>\n<li aria-level=\"1\" style=\"list-style-type: decimal; vertical-align: baseline;\">\n<p role=\"presentation\"><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cloud DNS</span></a><span style=\"vertical-align: baseline;\"> - configured for either cluster-scope or VPC scope, and </span></p>\n</li>\n<li aria-level=\"1\" style=\"list-style-type: decimal; vertical-align: baseline;\">\n<p role=\"presentation\"><span style=\"vertical-align: baseline;\">Install and run your own DNS (like Core DNS)</span></p>\n</li>\n</ol>\n<p><span style=\"vertical-align: baseline;\">In this blog, we break down the differences between </span><span style=\"vertical-align: baseline;\">the DNS providers for your GKE Standard clusters</span><span style=\"vertical-align: baseline;\">, and guide you to the best solution for your specific situation. </span></p>\n<h3><strong style=\"vertical-align: baseline;\">Kube-DNS </strong></h3></div>\n<div class=\"block-image_full_width\">\n\n\n\n\n\n\n \ \n <div class=\"article-module h-c-page\">\n <div class=\"h-c-grid\">\n \ \n\n <figure class=\"article-image--large\n \n \n h-c-grid__col\n \ h-c-grid__col--6 h-c-grid__col--offset-3\n \n \n \"\n \ >\n\n \n \n \n <img\n src=\"https://storage.googleapis.com/gweb-cloudblog-publish/images/1_gZbgxg4.max-1000x1000.png\"\n \ \n alt=\"1\">\n \n </a>\n \n </figure>\n\n \ \n </div>\n </div>\n \n\n\n\n\n</div>\n<div class=\"block-paragraph_advanced\"><p><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/kube-dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">kube-dns</span></a><span style=\"vertical-align: baseline;\"> is the default DNS provider for Standard GKE clusters, providing DNS resolution for services and pods within the cluster. If you select this option, GKE deploys the necessary kube-dns components such as Kube-dns pods, Kube-dns-autoscaler, Kube-dns configmap and Kube-dns service in the kube-system namespace.</span></p>\n<p><span style=\"vertical-align: baseline;\">kube-dns is the default DNS provider for GKE Standard clusters and the only DNS provider for Autopilot clusters running versions earlier than 1.25.9-gke.400 and 1.26.4-gke.500.</span></p>\n<p><span style=\"vertical-align: baseline;\">Kube-dns is a suitable solution for workloads with moderate DNS query volumes that have stringent</span><span style=\"vertical-align: baseline;\"> DNS resolution latency requirements (e.g. under ~2-4ms). Kube-dns is able to provide low latency DNS resolution for all DNS queries as </span><span style=\"vertical-align: baseline;\">all the DNS resolutions are performed within the cluster.</span></p>\n<p><span style=\"vertical-align: baseline;\">If you notice DNS timeouts or failed DNS resolutions for bursty workload traffic patterns when using kube-dns, consider scaling the number of kube-dns pods, and enabling NodeLocal DNS cache for the cluster</span><span style=\"vertical-align: baseline;\">. </span><span style=\"vertical-align: baseline;\">You can scale the number of kube-dns pods beforehand using</span><span style=\"vertical-align: baseline;\"> </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/nodelocal-dns-cache#scaling_up_kube-dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Kube-dns autoscaler</span></a><span style=\"vertical-align: baseline;\">, and manually tuning it to the cluster's DNS traffic patterns. Using kube-dns along with Nodelocal DNS cache (discussed below) also reduces overhead on the kube-dns pods for DNS resolution of external services. </span></p>\n<p><span style=\"vertical-align: baseline;\">While scaling up kube-dns and using NodeLocal DNS Cache(NLD) helps in the short term, it does not guarantee </span><span style=\"vertical-align: baseline;\">reliable DNS resolution</span><span style=\"vertical-align: baseline;\"> during sudden traffic spikes. Hence migrating to Cloud DNS provides a more robust and long-term solution for improved </span><span style=\"vertical-align: baseline;\">reliability of DNS resolution consistently across varying DNS query volumes</span><span style=\"vertical-align: baseline;\">. You can update the DNS provider for your existing GKE Standard from </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">kube-dns to Cloud DNS</span></a><span style=\"vertical-align: baseline;\"> without requiring to re-create your existing cluster. </span></p>\n<p><span style=\"vertical-align: baseline;\">For logging the DNS queries when using kube-dns, there is manual effort required in creating a </span><span style=\"vertical-align: baseline;\">new </span><a href=\"https://cloud.google.com/knowledge/kb/enable-dns-queries-log-in-google-kubernetes-engine-000004855\"><span style=\"text-decoration: underline; vertical-align: baseline;\">kube-dns debug pod</span></a><span style=\"vertical-align: baseline;\"> with log-queries enabled. </span></p>\n<h3><strong style=\"vertical-align: baseline;\">Cloud DNS</strong></h3>\n<p><a href=\"https://cloud.google.com/dns/docs/overview/\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cloud DNS</span></a><span style=\"vertical-align: baseline;\"> is a </span><strong style=\"vertical-align: baseline;\">Google-managed service</strong><span style=\"vertical-align: baseline;\"> that is designed for high scalability and availability. </span><span style=\"vertical-align: baseline;\">In addition, Cloud DNS elastically scales to adapt to your DNS query volume, providing consistent and reliable DNS query resolution regardless of traffic volume. Cloud DNS simplifies your operations and minimizes operational overhead since it is a Google managed service and does not require you to maintain any additional infrastructure.</span><span style=\"vertical-align: baseline;\"> Cloud DNS supports dns resolutions across the entire VPC, which is something not currently possible with kube-dns.</span></p>\n<p><span style=\"vertical-align: baseline;\">Also, while using </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-services\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Multi Cluster Services</span></a><span style=\"vertical-align: baseline;\"> (MCS) in GKE, </span><span style=\"vertical-align: baseline;\">Cloud DNS provides DNS resolution for services across your </span><a href=\"https://cloud.google.com/anthos/fleet-management/docs\"><span style=\"text-decoration: underline; vertical-align: baseline;\">fleet of clusters</span></a><span style=\"vertical-align: baseline;\">.</span></p></div>\n<div class=\"block-image_full_width\">\n\n\n\n\n\n\n \ \n <div class=\"article-module h-c-page\">\n <div class=\"h-c-grid\">\n \ \n\n <figure class=\"article-image--large\n \n \n h-c-grid__col\n \ h-c-grid__col--6 h-c-grid__col--offset-3\n \n \n \"\n \ >\n\n \n \n \n <img\n src=\"https://storage.googleapis.com/gweb-cloudblog-publish/images/2_b9PLEA8.max-1000x1000.png\"\n \ \n alt=\"2\">\n \n </a>\n \n </figure>\n\n \ \n </div>\n </div>\n \n\n\n\n\n</div>\n<div class=\"block-paragraph_advanced\"><p><span style=\"vertical-align: baseline;\">Unlike kube-dns, Google Cloud’s hosted DNS service </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cloud DNS</span></a><span style=\"vertical-align: baseline;\"> provides Pod and Service DNS resolution that auto-scales and offers a </span><a href=\"https://cloud.google.com/dns/sla\"><span style=\"text-decoration: underline; vertical-align: baseline;\">100% service-level agreement</span></a><span style=\"vertical-align: baseline;\">,</span><span style=\"vertical-align: baseline;\"> reducing DNS </span><span style=\"vertical-align: baseline;\">timeouts and </span><span style=\"vertical-align: baseline;\">providing consistent DNS resolution latency</span><span style=\"vertical-align: baseline;\"> for heavy DNS workloads.</span></p>\n<p><span style=\"vertical-align: baseline;\">Cloud DNS also integrates with </span><a href=\"https://cloud.google.com/dns/docs/monitoring\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cloud Monitoring</span></a><span style=\"vertical-align: baseline;\">, giving you greater visibility into DNS queries for enhanced troubleshooting and analysis. </span></p>\n<p><span style=\"vertical-align: baseline;\">The Cloud DNS controller automatically provisions DNS records for pods and services in Cloud DNS for ClusterIP, headless and external name services. </span></p>\n<p><span style=\"vertical-align: baseline;\">You can configure Cloud DNS to provide GKE DNS resolution in either </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#vpc_scope_dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">VPC</span></a><span style=\"vertical-align: baseline;\"> or </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">Cluster</span></a><span style=\"vertical-align: baseline;\"> (the default) scope. With VPC scope, the DNS records are resolvable with the entire VPC. This is achieved with the private DNS zone that gets created automatically. With Cluster scope, the DNS records are resolvable only within the cluster.</span></p>\n<p><span style=\"vertical-align: baseline;\">While Cloud DNS offers enhanced features, it does come with </span><a href=\"https://cloud.google.com/dns/pricing\"><span style=\"text-decoration: underline; vertical-align: baseline;\">usage-based costs</span></a><span style=\"vertical-align: baseline;\">. You save on compute costs and overhead by removing kube-dns pods when using Cloud DNS. Considering the typical cluster size workload traffic patterns, Cloud DNS is usually more cost effective than running kube-dns</span></p>\n<p><span style=\"vertical-align: baseline;\">You can </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns#cluster_scope_dns\"><span style=\"text-decoration: underline; vertical-align: baseline;\">migrate clusters from kube-dns to Cloud</span></a><span style=\"vertical-align: baseline;\"> DNS cluster scope without downtime or changes to your applications</span><span style=\"vertical-align: baseline;\">. The reverse (migrating from Cloud DNS to kube-dns) is not a seamless operation.</span></p>\n<h3><strong style=\"vertical-align: baseline;\">NodeLocal DNSCache</strong></h3></div>\n<div class=\"block-image_full_width\">\n\n\n\n\n\n\n \ \n <div class=\"article-module h-c-page\">\n <div class=\"h-c-grid\">\n \ \n\n <figure class=\"article-image--large\n \n \n h-c-grid__col\n \ h-c-grid__col--6 h-c-grid__col--offset-3\n \n \n \"\n \ >\n\n \n \n \n <img\n src=\"https://storage.googleapis.com/gweb-cloudblog-publish/images/3_njIGHJZ.max-1000x1000.png\"\n \ \n alt=\"3\">\n \n </a>\n \n </figure>\n\n \ \n </div>\n </div>\n \n\n\n\n\n</div>\n<div class=\"block-paragraph_advanced\"><p><a href=\"https://cloud.google.com/kubernetes-engine/docs/how-to/nodelocal-dns-cache#architecture\"><span style=\"text-decoration: underline; vertical-align: baseline;\">NodeLocal DNSCache</span></a><span style=\"vertical-align: baseline;\"> is a GKE add-on that you can run in addition to </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery\"><span style=\"text-decoration: underline; vertical-align: baseline;\">kube-dns</span></a><span style=\"vertical-align: baseline;\"> and Cloud DNS. The node-local-dns pod gets deployed on the GKE nodes after the option has been enabled (subject to a node upgrade procedure). </span></p>\n<p><span style=\"vertical-align: baseline;\">Nodelocal DNS Cache (NLD) helps to reduce the average DNS resolution times by resolving the DNS requests locally on the same nodes as the pods, and only forwards requests that it cannot resolve to the other DNS servers in the cluster. This is a great fit for clusters that have heavy internal DNS query loads. </span></p>\n<p><span style=\"vertical-align: baseline;\">Enable NLD during maintenance windows. Please note that node pools must be re-created for this change to take effect.</span></p>\n<h3><strong style=\"vertical-align: baseline;\">Final thoughts</strong></h3>\n<p><span style=\"vertical-align: baseline;\">The choice of DNS provider for your GKE Standard cluster has implications for the performance and reliability, in addition to your operations and overall service discovery architecture. </span><span style=\"vertical-align: baseline;\">Hence, it is crucial for GKE Standard users to understand their DNS options taking into account their application and architecture objectives</span><span style=\"vertical-align: baseline;\">. Standard GKE clusters allow you to use either kube-dns or Cloud DNS as your DNS provider, allowing you to optimize for either low latency DNS resolution or a simple, scalable and reliable DNS solution for GKE Standard clusters. You can learn more about DNS for your GKE cluster from the </span><a href=\"https://cloud.google.com/kubernetes-engine/docs/concepts/service-discovery\"><span style=\"text-decoration: underline; vertical-align: baseline;\">GKE documentation </span></a><span style=\"vertical-align: baseline;\">. If you have any further questions, feel free to </span><a href=\"https://cloud.google.com/contact/?_gl=1*11nzsgc*_up*MQ..&gclid=CjwKCAjwkuqvBhAQEiwA65XxQLJotHHWHX6hkVrSeba0VuZxzHaRaPWL-3-Jk5LLIRDWWC5-N8iYbxoC5wkQAvD_BwE&gclsrc=aw.ds\"><span style=\"text-decoration: underline; vertical-align: baseline;\">contact us</span></a><span style=\"vertical-align: baseline;\">.</span></p>\n<hr/>\n<p><sup><span style=\"font-style: italic; vertical-align: baseline;\">We thank the Google Cloud team member who contributed to the blog: </span><span style=\"vertical-align: baseline;\">Selin Goksu, Technical Solutions Developer, Google</span></sup></p></div>" rss_fields: - title - url - summary - author - categories - published - entry_id url: https://cloud.google.com/blog/products/networking/understanding-dns-options-for-gke/ author: Indrabhushan Shukla
Language
Active
Ricc internal notes
Imported via /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/import-feedjira.rb on 2024-04-03 18:26:24 +0200. Content is EMPTY here. Entried: title,url,summary,author,categories,published,entry_id. TODO add Newspaper: filename = /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/../../../crawler/out/feedjira/Technology/Google Cloud Blog/2024-04-03-DNS_providers_for_Google_Kubernetes_Engine_explained-v2.yaml
Ricc source
Show this article
Back to articles