I have a GCP project with:
- VPC:
subnet0: cidr10.1.0.0/24subnet1: cidr10.2.0.0/24
- GKE cluster in the
subnet0subnet and:- pods cidr:
172.16.0.0/18 - service cidr:
172.16.64.0/20 - node pool tags:
gke-pool
- pods cidr:
- a VM instance in the
subnet1subnet and tagsagent
I would like to create a firewall rules that would allow pods in the GKE cluster to connect to the VM, so I have created the following firewall rule:
network:VPCdirection:INGRESS- source tags:
gke-pool - target tags:
agent - port: 80/tcp
But it does not work.
Instead if I set the source range to the pods cidr (172.16.0.0/18) it works.
Any suggestions?