Can anyone shed some light on why this might not work? I can access redis just fine using the pod's IP address,

$ rdcli -h> 

but when I try to use the DNS name, I cannot connect.

$ rdcli -h dbbackupd.default.cluster.local
dbbackupd.default.cluster.local:6379> (error) Redis connection to dbbackupd.default.cluster.local:6379 failed - getaddrinfo ENOTFOUND dbbackupd.default.cluster.local dbbackupd.default.cluster.local:6379

Inside the pod that is trying to contact redis, I get the right-looking output when using the host command, so name resolution looks good:

$ host dbbackupd.default.svc.cluster.local

dbbackupd.default.svc.cluster.local has address

My theory is that because redis is in a multi-container pod, that dns is not routing it to the container properly. Here is my Service's definition in case that sheds light:

apiVersion: v1
kind: Service
  name: dbbackupd
    app: dbbackupd
    app: dbbackupd
  type: NodePort
    - name: redis-mq
      protocol: TCP
      port: 6379
      targetPort: 6379
    - name: sql-comm
      protocol: TCP
      port: 1433
      targetPort: 1433

1 Answer 1


You're using two different host names:

$ rdcli -h dbbackupd.default.cluster.local
$ host dbbackupd.default.svc.cluster.local

The one used with rdcli is missing .svc.

  • Wow, I feel dumb. I have had a long day, and can't believe I missed something that simple. Anyway, I did confirm that this was the only issue. DNS is working fine, and I can connect to Redis. Thanks for the keen eye. Commented Aug 12, 2020 at 7:32
  • 1
    I've been there myself more times than I'm willing to admit. :) Glad that's all it was.
    – bradym
    Commented Aug 12, 2020 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.