简体   繁体   中英

Kubernetes and External-DNS

I am running a K8S cluster in GCP with cert-manager and external-dns with a ingress-nginx-ingress-controller ( Loadbalancer = external IP "abc" )

Each frontend-service request a letsenrypt certificate via a DNS ( Zone is setup in GCP ) e1.exapmle.com

second frontend-service on e2.example.com

Both DNS entries are pointing to the external IP "ABC". So far so good

Right now I am adding a new DNS entries for the subdomain manually ( ie e3.example.com) and thought ( hope ) to use external-DNS to do the automatics creation of the DNS entry in my zone. External-DNS creates a new DNS entry but not with the IP of my external load balancer IP "abc". It is a new IP address.

Is there a way to setup external-DNS that it manages the DNS entries ( creates a new ) and "maps" it to my external Loadbalancer IP instead of a new one?

Its hard to reply without any additional information, but I feel you have to configure publishService and set it to true in the ingress.

## Allows customization of the external service
  ## the ingress will be bound to via DNS
  publishService:
    enabled: true

There were similar question and issues on github related this behavior:

Static nginx-ingress IP is not used

external-dns assigns node IP instead of nginx-ingress IP

If you are using helm charts: this is a place to change publishService: https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L90-L92

You may also want to read Enabling publish-service for ClusterIP nginx-ingress controller service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM