external-dns: Unable to connect to EKS control plane endpoints
When deploying external DNS within a EKS cluster I encountered issues with external-dns connecting to the Kubernetes control plane endpoints.
time="2019-04-10T15:02:34Z" level=info msg="Created Kubernetes client https://172.20.0.1:443"
time="2019-04-10T15:03:34Z" level=fatal msg="failed to sync cache: timed out waiting for the condition"
EKS Server version: Server Version: v1.12.6-eks-d69f1b
The Kubernetes service was configured correctly, and other pods were able to communicate with the control plane endpoint.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 1d
The resources deployed:
apiVersion: v1
kind: ServiceAccount
metadata:
name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups: ["core"]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: ["core"]
resources: ["pods"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
- apiGroups: ["core"]
resources: ["nodes"]
verbs: ["list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: external-dns
subjects:
- kind: ServiceAccount
name: external-dns
namespace: default
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: external-dns
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: external-dns
spec:
serviceAccountName: external-dns
containers:
- name: external-dns
image: registry.opensource.zalan.do/teapot/external-dns:v0.5.12
args:
- --source=service
- --domain-filter=example.com
- --provider=aws
- --policy=upsert-only
- --aws-zone-type=private
- --registry=txt
- --txt-owner-id=example-com
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
I think in case of @szymonpk described, you also have to allow external-dns to get nodes
Latest also have issues in EKS (1.11.9), I am not sure if it is related:
Reverting to 0.5.11 helps.
Also worth noting, external-dns version v0.5.11 works correctly in this environment.
@kristaxox We released v0.5.14 yesterday. This fixes the noisy logs you saw. Let me know if it works for you and we can close the ticket.
Sorry this PR isn’t relevant, it was the switch to go modules in v0.5.13.
When we used dep we supressed those logs by overwriting the glog package, which was used in Kubernetes (now it’s klog). We can suppress it again by simply overwriting the package in go mod.
I will create a PR for that. Again those logs are non-critical by I do understand they pretty annoying which needs to be fixed.
I can conform that 0.5.11 works in EKS