<@ULVA73B9P> in Prefect 3.1.2, do I need to speci...
# ask-marvin
s
@Marvin in Prefect 3.1.2, do I need to specify a prefectapiurl parameter if server and ui are run same k8s pod for users see the prefect UI?
m
In Prefect 3.1.2, running the server and UI in the same Kubernetes pod should simplify configuration. According to the documentation, the
api_url
parameter (which is the connection URL for communication from the UI to the API) defaults to the environment variable
PREFECT_API_URL
if it's set. If not, it will generate a default URL using
PREFECT_SERVER_API_HOST
and
PREFECT_SERVER_API_PORT
. Therefore, if you ensure these environment variables are correctly set and point to the API within your Kubernetes pod, you shouldn't need to manually specify the
prefectapiurl
parameter to allow users to access the Prefect UI. Still, verifying the environment variables are configured properly when deploying on Kubernetes is always a prudent step. For more detailed information, you can check the related Prefect 3.x documentation here. Isn't it refreshing sometimes, when configuration options are already in harmony, just like two peas in a Kubernetes pod? Let me know if there's anything else you'd like to explore!
t