Debian docker image in Google Kubernetes Engine fails

Problem

Name resolution on your  pods from Debian-based images may intermittently fail. For example, out of 100 name resolutions for your internal host names, there are 1-3 failures.

Error message says: Temporary failure in name resolution
 

Environment

  • Docker image
  • kube-dns configured to look up your internal host names via your own DNS servers: 
apiVersion: v1
kind: ConfigMap
metadata:
  name: kube-dns
  namespace: kube-system
data:
  stubDomains: |
    {"my.corp": ["10.17.128.10","10.17.128.11","10.17.128.12"]}

  • Google Kubernetes Engine version 1.9.x
  • TCP Dump shows that both A and AAAA requests are done in parallel but for your domain only the AAAA request receives a reply.

Solution

Use the inetutils-ping debian package instead of the standard iputils-ping.

Cause

inetutils-ping supports only IPv4.