Route 53 dns record created on private zone instead of public zone
- What
kopsversion are you running? The commandkops version, will display this information.
Version 1.7.0 (git-e04c29d)
- What Kubernetes version are you running?
kubectl versionwill print the version if a cluster is running or provide the Kubernetes version specified as akopsflag.
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.8", GitCommit:"bc6162cc70b4a39a7f39391564e0dd0be60b39e9", GitTreeState:"clean", BuildDate:"2017-10-05T06:35:40Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
- What cloud provider are you using?
AWS
- What commands did you run? What is the simplest way to reproduce this issue?
Created new service
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
name: myservice-example
name: myservice-example
annotations:
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "True"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
dns.alpha.kubernetes.io/external: <name-for-the-service-domain>
spec:
selector:
name: myservice-example
type: LoadBalancer
ports:
- name: "http"
port: 80
targetPort: 80
- What happened after the commands executed?
DNS record was created on my private zone and not on the public zone
dns-controller logs
I1123 13:04:19.789697 1 dnscontroller.go:611] Update desired state: service/default/<service_name>: [{CNAME <elb_name> false}]
I1123 13:04:23.313263 1 dnscache.go:72] querying all DNS zones (cache expired)
I1123 13:04:23.664673 1 dnscontroller.go:256] Using default TTL of 1m0s
I1123 13:04:23.664698 1 dnscontroller.go:421] Querying all dnsprovider records for zone "<private_zone>"
I1123 13:04:23.769177 1 dnscontroller.go:571] Adding DNS changes to batch {CNAME <name>} [<elb_name>]
I1123 13:04:23.769213 1 dnscontroller.go:301] applying DNS changeset for zone <private_zone>
- What did you expect to happen?
DNS record to be created on the public zone instead of the private zone
- Please provide your cluster manifest. Execute
kops get --name my.example.com -oyamlto display your cluster manifest. You may want to remove your cluster name and other sensitive information.
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
creationTimestamp: 2017-11-06T07:05:40Z
name: <name>
spec:
additionalPolicies:
master: |
[
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets",
"route53:GetHostedZone"
],
"Resource": [
"arn:aws:route53:::hostedzone/<my_public_zone>"
]
}
]
node: |
[
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets",
"route53:GetHostedZone"
],
"Resource": [
"arn:aws:route53:::hostedzone/<my_public_zone>"
]
}
]
api:
loadBalancer:
type: Public
authorization:
rbac: {}
channel: stable
cloudLabels:
<labels>
cloudProvider: aws
configBase: s3://<state_store>
dnsZone: <private_zone_id>
etcdClusters:
- etcdMembers:
- encryptedVolume: true
instanceGroup: master-eu-west-1a
name: a
- encryptedVolume: true
instanceGroup: master-eu-west-1b
name: b
- encryptedVolume: true
instanceGroup: master-eu-west-1c
name: c
name: main
- etcdMembers:
- encryptedVolume: true
instanceGroup: master-eu-west-1a
name: a
- encryptedVolume: true
instanceGroup: master-eu-west-1b
name: b
- encryptedVolume: true
instanceGroup: master-eu-west-1c
name: c
name: events
kubernetesApiAccess:
- <my_ip>
kubernetesVersion: 1.7.8
masterInternalName: <name>
masterPublicName: <name>
networkCIDR: <cidr>
networkID: <id>
networking:
weave:
mtu: 8912
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- <my_ip>
subnets:
-<long list of shared subnets>
topology:
bastion:
bastionPublicName: <bastion-name>
dns:
type: Private
masters: private
nodes: private
-
Please run the commands with most verbose logging by adding the
-v 10flag. Paste the logs into this report, or in a gist and provide the gist link here. -
Anything else do we need to know?
My public zone's domain name is same as the private zone's domain name.
------------- FEATURE REQUEST TEMPLATE --------------------
- Describe IN DETAIL the feature/behavior/change you would like to see.
If this is not a bug, then it would be nice to have the ability to specify what zone to use for the records.
Yeah,
It seems that this is working as intended. The current DNS solution doesn't work with identical public and private hosted zone names.
For this to work, it would require external-dns instead of the default dns service.
Why is this closed? This is a bug and needs fixing