Category: Kubernetes

This requires configuring DNS records when you deploy your web application, which be done with the Kubernetesadd-on ExternalDNS. This article covers how install configure ExternalDNSto integrate Cloud DNSwith Google Kubernetes Engine(GKE), so that you can automatically configure DNS records when deploying web applications.

When defining our service resource, we use an annotation to configure the desired DNS record: Below is a manifest you can use to deploy this service.

This manifest containers two resources: When ready to deploy run: We can see the results in few moments by typing: The results may look something similar to this: We can query CloudDNS with the glcoud dns record-sets list command to see if the DNS record was added: We should see a record added that looks something like this: You can point your web browser to http://hello-svc.test.acme.com and seem something like: We can also use curl and filter out the pod name several times to see if we can hit all 3 pods: The results will definitely vary.

To deploy all of this, run the following command: After a few moments, you can the ingress created with: This should show something like: We can check to see our DNS record is registered in Cloud DNS with: This will show us something like the following: You can point your web browser to http://hello-ing.test.acme.com and seem something like: Using the same URL, we can use curl to hit the DNS name a few times and filter for the pod name.

Related Articles