Hi GCP Community,
I am trying to set up an every-one-minute cron job using Cloud Scheduler to call an internal load balancer IP. However, I am unable to connect to the load balancer private IP from Cloud Scheduler. Is there a cost-effective solution to this problem?
I have tried the following:
Creating a Cloud Scheduler job with the following target:
Verifying that the Cloud Scheduler job has the necessary permissions to access the internal load balancer
However, when I try to run the Cloud Scheduler job, it fails with the following error:
Failed to connect to the load balancer private IP: Connection refused
Is there a cost-effective solution to this problem?
Hi,
It seems that you also posted this concern from StackOverflow[1] wherein the answers provided are already accepted.
Just to summarize there are two ways to achieve this concern. One is through serverless VPC access by creating a connector[2] while the other one is through Direct VPC egress with a VPC network by creating a job[3].
[1]https://www.googlecloudcommunity.com/gc/Integration-Services/Cost-effective-solution-to-connect-Clou...
[2]https://cloud.google.com/vpc/docs/configure-serverless-vpc-access#create-connector
[3]https://cloud.google.com/run/docs/configuring/vpc-direct-vpc#direct-vpc-job