https://prefect.io logo
Title
l

Luan Tiburcio

12/07/2022, 2:28 PM
Hello everyone, I'm migrating prefect 1 to 2 in this version I'm uploading to kubernetes. I have the following error in the application. Has anyone managed to fix this?
1
r

Ryan Peden

12/07/2022, 2:31 PM
You'll likely need to set the
PREFECT_API_URL
environment variable in the container running the Prefect API to match the externally-visible URL where you access Prefect. So, for example, if enter
<https://my-prefect-hostname>
in your browser to load the UI, you'd set the environment variable to
<https://my-prefect-hostname/api>
l

Luan Tiburcio

12/07/2022, 8:55 PM
Thank you so much @Ryan Peden. But I have some visual error in the UI. In the settings tab it is being displayed like this. Do you know how to solve? I'm using version 2.7.0.
r

Ryan Peden

12/07/2022, 8:58 PM
Does doing a hard refresh fix it (hold down shift and click reload)? And if not, does setting
PREFECT_ORION_UI_API_URL
to the same value as
PREFECT_API_URL
help?
l

Lawrence Lee

12/08/2022, 4:54 PM
I believe you will need to set the
PREFECT_ORION_UI_API_URL
to be the publicly accessible URL. Right now your browser is trying to connect to 127.0.0.1 which is your localhost and not the remote server.