I followed the steps in the nginx-ingress tutorial with one difference. I already had the nginx ingress controller deployed to my 2 k8s clusters using the official guide.
My Ingresses work by setting the host header for curl:
$ curl -I -HHost:nginx.external.daneyon.com http://35.233.196.28:30778
HTTP/1.1 200 OK
Server: nginx/1.15.3
Date: Wed, 03 Oct 2018 18:13:31 GMT
Content-Type: text/html
Content-Length: 612
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Tue, 02 Oct 2018 14:49:27 GMT
ETag: "5bb38577-264"
Accept-Ranges: bytes
$ curl -I -HHost:nginx.external.daneyon.com http://35.233.152.40:30046/
HTTP/1.1 200 OK
Server: nginx/1.15.3
Date: Wed, 03 Oct 2018 18:15:14 GMT
Content-Type: text/html
Content-Length: 612
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Tue, 02 Oct 2018 14:49:27 GMT
ETag: "5bb38577-264"
Accept-Ranges: bytes
But I see no A records for the external.daneyon.com zone:
$ gcloud dns record-sets list --zone="external-daneyon-com" --name "external.daneyon.com" --type A
Listed 0 items.
Here is the ingress spec from one of the k8s clusters:
# kubectl get ingress -n test-namespace -o yaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
creationTimestamp: 2018-10-03T18:07:07Z
generation: 1
name: test-ingress
namespace: test-namespace
resourceVersion: "110804"
selfLink: /apis/extensions/v1beta1/namespaces/test-namespace/ingresses/test-ingress
uid: 23b074ef-c737-11e8-8af7-42010a8a0002
spec:
rules:
- host: nginx.external.daneyon.com
http:
paths:
- backend:
serviceName: test-service
servicePort: 8088
path: /
status:
loadBalancer: {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""
Here are the zone details:
$ gcloud dns record-sets transaction describe -z "external.daneyon.com"
additions:
- kind: dns#resourceRecordSet
name: external.daneyon.com.
rrdatas:
- ns-cloud-b1.googledomains.com. cloud-dns-hostmaster.google.com. 2 21600 3600 259200
300
ttl: 21600
type: SOA
- kind: dns#resourceRecordSet
name: external.daneyon.com.
rrdatas:
- ns-cloud-b1.googledomains.com.
- ns-cloud-b2.googledomains.com.
- ns-cloud-b3.googledomains.com.
- ns-cloud-b4.googledomains.com.
ttl: 300
type: NS
deletions:
- kind: dns#resourceRecordSet
name: external.daneyon.com.
rrdatas:
- ns-cloud-b1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200
300
ttl: 21600
type: SOA
$ echo $POD
pod/external-dns-94cfb98c9-fzrz9
$ kubectl logs $POD
time="2018-10-03T17:30:27Z" level=info msg="config: {Master: KubeConfig: RequestTimeout:30s IstioIngressGateway:istio-system/istio-ingressgateway Sources:[ingress] Namespace: AnnotationFilter: FQDNTemplate: CombineFQDNAndAnnotation:false Compatibility: PublishInternal:false PublishHostIP:false ConnectorSourceServer:localhost:8080 Provider:google GoogleProject:level-scheme-173421 DomainFilter:[external.daneyon.com] ZoneIDFilter:[] AlibabaCloudConfigFile:/etc/kubernetes/alibaba-cloud.json AlibabaCloudZoneType: AWSZoneType: AWSAssumeRole: AWSBatchChangeSize:4000 AWSBatchChangeInterval:1s AWSEvaluateTargetHealth:true AzureConfigFile:/etc/kubernetes/azure.json AzureResourceGroup: CloudflareProxied:false InfobloxGridHost: InfobloxWapiPort:443 InfobloxWapiUsername:admin InfobloxWapiPassword: InfobloxWapiVersion:2.3.1 InfobloxSSLVerify:true DynCustomerName: DynUsername: DynPassword: DynMinTTLSeconds:0 OCIConfigFile:/etc/kubernetes/oci.yaml InMemoryZones:[] PDNSServer:http://localhost:8081 PDNSAPIKey: PDNSTLSEnabled:false TLSCA: TLSClientCert: TLSClientCertKey: Policy:sync Registry:txt TXTOwnerID:my-identifier TXTPrefix: Interval:1m0s Once:false DryRun:false LogFormat:text MetricsAddress::7979 LogLevel:info TXTCacheInterval:0s ExoscaleEndpoint:https://api.exoscale.ch/dns ExoscaleAPIKey: ExoscaleAPISecret: CRDSourceAPIVersion:externaldns.k8s.io/v1alpha CRDSourceKind:DNSEndpoint ServiceTypeFilter:[]}"
time="2018-10-03T17:30:27Z" level=info msg="Created Kubernetes client https://10.96.0.1:443"
time="2018-10-03T17:30:52Z" level=error msg="Get https://www.googleapis.com/dns/v1/projects/level-scheme-173421/managedZones?alt=json: dial tcp: lookup www.googleapis.com on 10.96.0.10:53: read udp 172.17.0.10:43346->10.96.0.10:53: i/o timeout"
time="2018-10-03T17:31:28Z" level=info msg="All records are already up to date"
time="2018-10-03T17:32:27Z" level=info msg="All records are already up to date"
time="2018-10-03T17:33:27Z" level=info msg="All records are already up to date"
<SNIP>