Here is my network problem on GCP :
Could I communicate from my VM (10.0.2.3
) in Subnetwork VPN
to the secondary IPv4 of subnetwork kube
: gke-services-range
(10.152.0.4
) ?
I tried but unfortunately (allow all ingress/egress in firewall) it doesn't seem to work natively... Even though it's part of the same VPC.
The ClusterIP (default) exposes the Service
on a cluster-internal IP. This spec type makes the Service only reachable from within the cluster. That is why you cannot access your service via ClusterIP from outside the cluster (i.e. your VM 10.0.2.3). Additionally, it is a virtual IP and not routed. This is discussed in a similar post.
NodePort exposes the service on the same port of each selected node in the cluster using NAT. It makes a Service accessible outside of the cluster by using <NodeIP>:<NodePort>
. But again, it uses the node ip and port and not the ClusterIP