Hi everyone, im trying to deploy orion on kubernet...
# prefect-ui
f
Hi everyone, im trying to deploy orion on kubernetes, im having a CORS issue with the front, i can access the /docs url but when i try to see the prefect ui got CORS issue on the console of my browser. Dont know if this is the correct channel to post this question
some context prefect 2.7.0 db ephemeral run command: prefect orion start --host 0.0.0.0 --port 8080 running on centos 7 base image, installing from scratch set PREFECT_ORION_API_PORT 8080 and PREFECT_ORION_API_HOST 0.0.0.0
error
Cant connect to Orion API at <http://0.0.0.0:8080/api>
d
If you deploy that in kubernetes the PREFECT_ORION_API_HOST should be the ingress url. Did you setup the ingress and service in front of your deployment?
f
yes, i have a route and a load balancer service in front of my deployment
but the HOST is defined dynamically
it depends the cluster is deployed and the name of the container
d
What do you mean the host is defined dynamically? This is what kubernetes service is for. To remove that problem.
f
exactly, the host name is defined by kubernetes, so when i build my image i dont have that specif name, thats why im using 0.0.0.0 as the API HOST
also when i run prefect kubernets template, it create a k8s template with the command: prefect orion start --host 0.0.0.0
d
Yes host 0.0.0.0 is to allow the IP to be exposed on kubernetes. however the name you should put for the env var should be the public DNS name
f
ok got it thanks
And there is a way to define the env var with https? i changed and its going to http only
d
You could https termination on the ingress. This is what we are doing at the moment. Otherwise you could do that on the prefect Orion start by setting up manually the uvicorn Does it make sense?