<@ULVA73B9P> I'm self hosting a Prefect server (ve...
# ask-marvin
n
@Marvin I'm self hosting a Prefect server (version 3). It's on a k8s cluster. I have setup the gateway and the
prefectUiApiUrl
YAML value to the external link (lets say, https://my-prefect-server.com/api). When I open the link through my browser, all I see is a completely white page. Why is that?
m
thought for 53.4 seconds
A blank white page when accessing your self-hosted Prefect UI typically indicates one of several issues. Let's troubleshoot this systematically: 1. Check the URL Configuration: - You're using
prefectUiApiUrl: <https://my-prefect-server.com/api>
- Make sure you're accessing the base URL (
<https://my-prefect-server.com>
) in your browser, not the
/api
endpoint - The
/api
path is for the API server, not the UI itself 2. Verify Network Configuration: - Ensure your Kubernetes ingress is properly configured to handle both the UI and API paths - The UI needs to access the API endpoint, so both paths must be properly routed - Check if your browser's developer tools (F12) show any network errors or failed requests 3. Pod Health Check: Run these commands to verify your deployment status:
Copy code
bash
   kubectl get pods -n <your-namespace>
   kubectl describe pod <prefect-server-pod-name> -n <your-namespace>
   kubectl logs <prefect-server-pod-name> -n <your-namespace>
4. Browser Troubleshooting: - Try a hard refresh (Ctrl+F5 or Cmd+Shift+R) - Clear your browser cache - Try a different browser - Check the browser's developer console (F12) for JavaScript errors 5. CORS Configuration: - Ensure your ingress or API gateway is properly configured to handle CORS - The UI needs to make API calls, so CORS headers must be properly set 6. SSL/TLS: - If you're using HTTPS, ensure your certificates are valid and properly configured - Check if there are any certificate errors in your browser's security panel If these steps don't resolve the issue, you can try: 1. Port-forwarding directly to the service to rule out ingress issues:
Copy code
bash
   kubectl port-forward svc/prefect-server 4200:4200 -n <your-namespace>
Then access
<http://localhost:4200>
2. Check the actual response from the API:
Copy code
bash
   curl -v <https://my-prefect-server.com/api/health>
This should return a successful response if the API is working correctly. Would you like me to help you investigate any of these specific areas further?