aws-samples / aws-lambda-ddns-function

Dynamically create Route 53 resource records using CloudWatch Events and Lambda
Apache License 2.0
236 stars 116 forks source link

Auto IP change in route53 DNS private zone for A records #32

Closed sam0104 closed 4 years ago

sam0104 commented 5 years ago

I am using KOP and installed kubernetes in VPC with private subnet and private DNS. I am using AWS networking CNI for kubernetes , which is providing IP address to POD directly from subnet range. From VPC ec2 instance , I can ping POD with direct IP .

For now I am just creating DNS A record in private zone manually for each POD and if POD deleted or recreated it got new IP address . In that case I need to manually change the A record to new IP address.

Is there way to autoupdate A record incase IP has changed ? ( Here I am not talking about ec2 instance . It just IP address which has a A record in private zone )

jicowan commented 5 years ago

You should consider using the ExternalDNS with CloudMap for this. When you create a service or an ingress, ExternalDNS will automatically register the endpoints for your service in Route53 and keep them up-to-date.