<p>I'm on google kubernetes engine, and I need to run the filebeat daemonset found (<a href="https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html</a>). I create the cluster with:</p>

<pre><code>gcloud container clusters create test_cluster \
     --cluster-version "1.9.6-gke.1" \
     --node-version "1.9.6-gke.1" \
     --zone "us-east1-c" \
     --machine-type n1-standard-4 \
     --scopes "https://www.googleapis.com/auth/compute","https://www.googleapis.com/auth/devstorage.full_control","https://www.googleapis.com/auth/sqlservice.admin","https://www.googleapis.com/auth/log    ging.write","https://www.googleapis.com/auth/pubsub","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/tra    ce.append" \
     --num-nodes "1" \
     --network "main-network" \
     --subnetwork "main-subnetwork" \
     --no-enable-cloud-monitoring \
     --no-enable-cloud-logging \
     --no-enable-legacy-authorization \
     --disk-size "50"
</code></pre>

<p>When I have <code>--cluster-version</code> and <code>--node-version</code> set to <code>1.8.8-gke.0</code> it works but when I change it to <code>1.9.6-gke.1</code> the filebeat pod can't reach my GCE instance that's running logstash.</p>

<p>Both the cluster and the GCE instance are running on the same network and I'm sure it's not a firewall issue with google cloud because if I <code>gcloud compute ssh</code> into the GKE instance and do <code>nc -vz -w 5 10.0.0.18 5044</code> it connects fine.</p>

<p>When I have the cluster running <code>1.8.8-gke.0</code>, the filebeat pod connects fine to logstash and running <code>traceroute 10.0.0.18</code> shows it connecting fine. When I create the cluster with <code>1.9.6-gke.1</code> then <code>traceroute 10.0.0.18</code> shows the following:</p>

<pre><code>[root@filebeat-56wtj filebeat]# traceroute 10.0.0.18 
traceroute to 10.0.0.18 (10.0.0.18), 30 hops max, 60 byte packets
 1  gateway (10.52.0.1)  0.063 ms  0.016 ms  0.012 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
</code></pre>

<p>edit: Note this isn't specific to the filebeat container, I tried it with another container and it also can't reach a GCE instance.</p>

<p>As you can read here [1]: "Beginning with Kubernetes version 1.9.x, automatic firewall rules have changed such that workloads in your Kubernetes Engine cluster cannot communicate with other Compute Engine VMs that are on the same network, but outside the cluster. This change was made for security reasons.</p>

<p>You can replicate the behavior of older clusters (1.8.x and earlier) by setting a new firewall rule on your cluster."</p>

<p>[1] <a href="https://cloud.google.com/kubernetes-engine/release-notes#known-issues" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/release-notes#known-issues</a></p>
