<p>I'm trying to achieve the following scenario:</p>
<p>My VM should be able to connect over a ClusterIP Service to the Pods behind it. The new beta feature here looks like this should be possible, but maybe I'm doing something wrong or misunderstood something...</p>
<p><a href="https://i.stack.imgur.com/FbAvd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FbAvd.png" alt="enter image description here" /></a></p>
<p>The full documentation is here:
<a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns?hl=de#vpc_scope_dns" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/cloud-dns?hl=de#vpc_scope_dns</a></p>
<p>The DNS is working, I get a service IP, a route to the default network is available.
I can connect via pod IP. But it seems the service IP is not routable from outside the cluster. I know, that normally a ClusterIP is not available from outside the cluster. But then, I don't understand why this feature exists and it also does not match with the diagram provided in the docs. As this feature seems to provide cross-cluster/VM communication via services.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-cip-service
  namespace: default
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    run: load-balancer-example
  sessionAffinity: None
  type: ClusterIP
</code></pre>
<p>Do I understand the feature wrong or am I missing a configuration?</p>
<p>Traffic Check:
<a href="https://i.stack.imgur.com/FAG2T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FAG2T.png" alt="enter image description here" /></a></p>

stvnwrgs
<p>This only works with <a href="https://kubernetes.io/docs/concepts/services-networking/service/#headless-services" rel="nofollow noreferrer">headless</a> Kubernetes services.  So you'll need to modify your service spec to included <code>clusterIP: None</code>:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-cip-service
  namespace: default
spec:
  clusterIP: None
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    run: load-balancer-example
  sessionAffinity: None
  type: ClusterIP
</code></pre>
