coredns: V1.2.3 error in log: expected type *object.Service, but watch event object had type *v1.Service

With CoreDNS v1.2.3 and the Kubernetes plugin I see this error repeated in the logs: expected type *object.Service, but watch event object had type *v1.Service

Also I had a problem where a Kubernetes service resolved to the ip of the previous service (service was recreated). After I restarted the CoreDNS pods the service name resolved to the correct ip. I don’t know if this is related, I can open a separate issue for that if you want.

.:53
--
2018/10/17 05:46:19 [INFO] CoreDNS-1.2.3
2018/10/17 05:46:19 [INFO] linux/amd64, go1.11.1, 8cc8afa
CoreDNS-1.2.3
linux/amd64, go1.11.1, 8cc8afa
2018/10/17 05:46:19 [INFO] plugin/reload: Running configuration MD5 = 3f70d93c15ac6136048442dcd6ecff9e
E1017 05:51:27.152064 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:51:27.649655 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:51:43.654331 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:53:30.222916 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:53:30.222975 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:53:30.224090 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:55:47.969295 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 05:56:18.743997 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:02:25.223889 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:02:25.223924 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:02:25.225441 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:02:25.226529 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:02:25.227622 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:03:03.489166 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:03:03.502140 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:03:04.502926 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:03:04.595740 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:04:19.370279 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:04:21.599097 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:04:21.603576 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
E1017 06:08:37.673572 1 reflector.go:386] github.com/coredns/coredns/plugin/kubernetes/controller.go:311: expected type *object.Service, but watch event object had type *v1.Service
...
2018/10/17 08:37:47 [INFO] SIGTERM: Shutting down servers then terminating

Config (Helm template):

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "coredns.fullname" . }}
data:
  Corefile: |-
    .:53 {
        errors
        health
        kubernetes {{ .Values.clusterDomain }} in-addr.arpa ip6.arpa {
          pods insecure
          upstream
          fallthrough in-addr.arpa ip6.arpa
        }
        file /etc/coredns/ingress.db {{ .Values.ingressDomain }}
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
  ingress.db: |
    {{ .Values.ingressDomain }}.     IN      SOA     sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600
    *.{{ .Values.ingressDomain }}.   IN      A       172.23.23.23

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (24 by maintainers)

Most upvoted comments

@miekg,

Good results with memory tests: the fixed code takes up a bit more memory, but not much. Projecting to 5K nodes, we should come in around 160MB per instance, up from 140MB… which still has us comfortably below the memory requirement of 178MB.

Ok, cool. Merging 1.2.4 version bump and kicking a release.

Worst case we didn’t fix the mem stuff and we’re back to square on, can’t have a broken release being the latest.