How to publish kubernetes LoadBalancer Ingress URL for aws route53

Today, when I launch an application that uses kubernetes over aws, it gives the public URL of LoadBalancer Ingress, however, in order to associate it with my domain, to make the application available to the public, I need to manually go to the aws route53 console in the browser every time I start . Can I update awas route53 Resource Type A to match the latest Kubernetes LoadBalancer Ingress url from the command line?

Kubernetes over gcloud shares this task: either pre-determine the static IP address that is used in the launch configuration, or manually make a browser-based mail connection start. On aws, I was hoping I could use something like this from the command line

aws route53domains update-domain-nameservers   ???

__ OR __ Is it possible to predefine aws kubernetes LoadBalancer Ingress, similar to executing a predefined static IP address when gcloud is exceeded?

to show the deployed LoadBalancer Ingress application url

kubectl describe svc

... output

Name:           aaa-deployment-407
Namespace:      ruptureofthemundaneplane
Labels:         app=bbb
            pod-template-hash=4076262206
Selector:       app=bbb,pod-template-hash=4076262206
Type:           LoadBalancer
IP:         10.0.51.82
LoadBalancer Ingress:   a244bodhisattva79c17cf7-61619.us-east-1.elb.amazonaws.com
Port:           port-1  80/TCP
NodePort:       port-1  32547/TCP
Endpoints:      10.201.0.3:80
Port:           port-2  443/TCP
NodePort:       port-2  31248/TCP
Endpoints:      10.201.0.3:443
Session Affinity:   None
No events.

UPDATE:

An error occurred while trying to use a new command line technique (hat tip to comment @ error2007s) ... problem with this

aws route53 list-hosted-zones

... exits

{
    "HostedZones": [
        {
            "ResourceRecordSetCount": 6, 
            "CallerReference": "2D58A764-1FAC-DEB4-8AC7-AD37E74B94E6", 
            "Config": {
                "PrivateZone": false
            }, 
            "Id": "/hostedzone/Z3II3949ZDMDXV", 
            "Name": "chainsawhaircut.com."
        }
    ]
}

Important bit used below: hostzone Z3II3949ZDMDXV

now I create the next one using this document (and this Doc also) as the file / change -resource-record-sets.json (NOTE: I can successfully change type A with a similar cli call ... however I need to change the type A with an Alias ​​target for the LoadBalancer Ingress URL)

{
    "Comment": "Update record to reflect new IP address of fresh deploy",
    "Changes": [{
        "Action": "UPSERT",
        "ResourceRecordSet": {
            "Name": "chainsawhaircut.com.",
            "Type": "A",
            "TTL": 60,
            "AliasTarget": {
                "HostedZoneId": "Z3II3949ZDMDXV",
                "DNSName": "a244bodhisattva79c17cf7-61619.us-east-1.elb.amazonaws.com",
                "EvaluateTargetHealth": false
            }
        }
    }]
}

at the command prompt I get

aws route53 change-resource-records-sets --hosted-zone-id Z3II3949ZDMDXV -change- :///change-resource-record-sets.json

An error occurred (InvalidInput) when calling the ChangeResourceRecordSets operation: Invalid request

?

+4
2

, aws route53 Resource Record Type A LoadBalancer Ingress URL

1 - ,

aws route53 list-hosted-zones

...

"Id": "/hostedzone/Z3II3949ZDMDXV", 

... json hostzone Z3II3949ZDMDXV, cli parm... HostedZoneId,

2 - . route53... issue:

aws route53 list-resource-record-sets --hosted-zone-id Z3II3949ZDMDXV --query "ResourceRecordSets[?Name == 'scottstensland.com.']"

... output

[
    {
        "AliasTarget": {
            "HostedZoneId": "Z35SXDOTRQ7X7K", 
            "EvaluateTargetHealth": false, 
            "DNSName": "dualstack.asomepriorvalue39e7db-1867261689.us-east-1.elb.amazonaws.com."
        }, 
        "Type": "A", 
        "Name": "scottstensland.com."
    }, 
    {
        "ResourceRecords": [
            {
                "Value": "ns-1238.awsdns-26.org."
            }, 
            {
                "Value": "ns-201.awsdns-25.com."
            }, 
            {
                "Value": "ns-969.awsdns-57.net."
            }, 
            {
                "Value": "ns-1823.awsdns-35.co.uk."
            }
        ], 
        "Type": "NS", 
        "Name": "scottstensland.com.", 
        "TTL": 172800
    }, 
    {
        "ResourceRecords": [
            {
                "Value": "ns-1238.awsdns-26.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
            }
        ], 
        "Type": "SOA", 
        "Name": "scottstensland.com.", 
        "TTL": 900
    }
]

...

"HostedZoneId": "Z35SXDOTRQ7X7K", 

3 - aws_route53_type_A.json ( Doc . , )

{
  "Comment": "Update record to reflect new DNSName of fresh deploy",
  "Changes": [
    {
      "Action": "UPSERT",
      "ResourceRecordSet": {
        "AliasTarget": {
            "HostedZoneId": "Z35SXDOTRQ7X7K", 
            "EvaluateTargetHealth": false, 
            "DNSName": "dualstack.a0b82c81f47d011e6b98a0a28439e7db-1867261689.us-east-1.elb.amazonaws.com."
        }, 
        "Type": "A", 
        "Name": "scottstensland.com."
      }
    }
  ]
}

"DNSName"... kubernetes aws, LoadBalancer Ingress, cli:

kubectl describe svc --namespace=ruptureofthemundaneplane

...

LoadBalancer Ingress:   a0b82c81f47d011e6b98a0a28439e7db-1867261689.us-east-1.elb.amazonaws.com

... - , , aws... route53...

Check out the green circle where the correct value of my LoadBalancer Ingress url will automatically display in self popilling picklist (thanks aws)

... , ( ), , URL- : doublestack. , ... json key "DNSName"

dualstack.a0b82c81f47d011e6b98a0a28439e7db-1867261689.us-east-1.elb.amazonaws.com.

,

aws route53 change-resource-record-sets --hosted-zone-id Z3II3949ZDMDXV --change-batch file://./aws_route53_type_A.json

... output

{
    "ChangeInfo": {
        "Status": "PENDING", 
        "Comment": "Update record to reflect new DNSName of fresh deploy", 
        "SubmittedAt": "2016-07-13T14:53:02.789Z", 
        "Id": "/change/CFUX5R9XKGE1C"
    }
}

.... ,

aws route53  list-resource-record-sets  --hosted-zone-id Z3II3949ZDMDXV  
+2

external-dns .

AWS

, : external-dns.alpha.kubernetes.io/hostname: nginx.external-dns-test.my-org.com.

, IAM .

0

All Articles