Hi All, Running prefect server which is to be acce...
# prefect-community
a
Hi All, Running prefect server which is to be accessed via load balancer what URLs should be used in config. Should it be load balancer url or host and port. Same question for agent. Thanks
1
j
Is this for Prefect 1 or 2? Could you please share some more details about your environment and infrastructure?
a
This is for prefect 2. We have private cloud where in I will create instance and provide manifest which has instruction to run prefect orion server with default port. Cloud instance will have host and random port assigned run-time. This cloud instance is mapped to load balancer. Thus load balancer becomes interface or public access URL.
c
Hi Amol, I’m not sure the question exactly ? Which config are you looking to modify? From the prefect side, there should be transparency and no knowledge of the load balancer
You’d configure the load balancer as if it didn’t exist
incoming traffic will hit the load balancer which will hand traffic off to prefect appropriately - a prime example of this might be ingress-nxinx with Kubernetes or a LoadBalancer IP using public cloud infra
the load balancer is responsible for determining routing connections - not Prefect
a
Let me check that... So essentially you are saying API has to be localhost irrespective how we access the prefect over web?
c
Not exactly - how are you deploying prefect orion?
If you’re using Kubernetes or some sort of public offering, then you would have DNS point to your LoadBalancer for whatever you want to access prefect as. Your loadbalancer would have the dns record <-> service mapping to point to the backend prefect
On the prefect side you would just set it up normally
If this is Kubernetes, this is usually done with an ingress controller, and a LoadBalancer IP