I'm trying to deploy my frontend container image on Kubernetes, and this frontend depends on the GCP cloud function. I want to make the flow more secure by using a virtual private cloud (VPC) feature on GCP.
What I have done:
I created a custom network and subnet.
I created a VPC connector.
I Updated all cloud functions connection settings to use that connector; in the ingress setting I chose Allow internal traffic and traffic from Cloud Load Balancing
and on Egress settings, I chose Route only requests to private IPs through the VPC connector
.
I created a private auto-pilot cluster and bound it with my network.
I deployed my frontend image on K8S and then I expose it using an external load balancer.
I tried to open my exposed frontend link and it opened but all requests to the cloud functions failed.
If anyone has tried this scenario before, please share the knowledge.