0

What I'm trying to do

I have deployed an aps.net core gRpc service on Docker for Desktop (Kubernetes enabled). To do client-side load balancing, I want to expose the same via a headless service. The deployment and service definition YAML files are as provided by the link viz. Deployment.yaml , service.yaml, and PV and PVC .yaml. When the deployment is run two replicas will be created. Now I want to expose them via a headless service and do a DNS lookup of the pods' IP addresses and do a client-side load balancing. For this, I installed the bitnami external-dns using the HELM charts. I did not make any modifications to the default chart values. Now when I try to do a nslookup of my service this is not working.

My expectation

Deploy the bitnami external-dns on Docker for Desktop with Kubernetes enabled and configured service to expose as DNS on the load balancer. I was expecting the nslookup to succeed in getting the pod IPs as a result

Can someone help me to get the same working?

Venkatesh
  • 320
  • 2
  • 18
  • `external-dns` requires a DNS provider (i.e. Route53) configuration. If you installed it without any configuration its not going to be able to create DNS entries. ClusterIP service object is not accessible outside the cluster. You would need either a NodePort or LoadBalancer service type. – lance.johnsn Dec 31 '22 at 18:30
  • What DNS provider can I use for Docker for Desktop with Kubernetes enabled? – Venkatesh Jan 01 '23 at 03:00
  • @lance.johnsn I have now updated the correct service.yaml and deployment.yaml – Venkatesh Jan 01 '23 at 03:52
  • Use NodePort, LoadBalancer requires a cloud provider. Then do a `kubectl -n grpc describe service grpc-file-service` external-dns you can use the `--fqdn-template` param vs an annotation to generate a DNS entry `--fqdn-template={{.Name}}.my-org.com` Where `{{.Name}}` is the service objects name – lance.johnsn Jan 01 '23 at 14:41
  • @lance.johnsn, When I run the external-dns I get the below error. helm install bitnami/external-dns --fqdn-template=file-cache-grpc-service.my-org.com WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/venkat/.kube/config WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/venkat/.kube/config Error: unknown flag: --fqdn-template . When I see the parameters using Helm show values I see that there no fqdn-template. I see fqdnTemplates – Venkatesh Jan 02 '23 at 02:34
  • @lance.johnsn I changed the service to Nodeport but still nslookp failed – Venkatesh Jan 02 '23 at 02:41
  • Yes you will need to use the variable the helm chart exposes to set external-dns' template option. And it needs to be a template with `{{.Name}}` variable referenced so it can use the service name. It must end using the FDQDN you have configured to use with external dns. – lance.johnsn Feb 07 '23 at 16:09

0 Answers0