<p>I faced with the problem that I cannot send emails from K8s pod using <code>smtp.gmail.com</code> and <code>587</code> port. I tried to use <code>dnsPolicy: ClusterFirstWithHostNet</code> but nothing has changed. With <code>dnsPolicy: Default</code> everything seems OK but I can't use this approach since pods should be able to resolve other pods from the cluster. Btw, <code>ConfigMap</code> with Google's dns didn't help too:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: kube-dns
  namespace: kube-system
data:
  upstreamNameservers: |
    [“8.8.8.8”, “8.8.4.4”]
</code></pre>

<p>Are there any ideas?<br/>
Thanks in advance. <br/>
PS, my Kubernetes version is v1.7.2</p>

<p>Maybe it just a syntax error in your configmap with quotes (" vs “)
If you run
<code>
kubectl -n kube-system logs kube-dns-xxxx -c dnsmasq
</code>
you will get a syntax error, instead of
<code>
upstreamNameservers to [8.8.8.8, 4.4.4.4]
</code></p>
