Configuring ingress or publicly exposing Prefect from the cluster is business dependent and not covered in this tutorial.
For details on Ingress configuration, consult the Kubernetes documentation.
NAME: prefect-serverLAST DEPLOYED: Tue Mar 4 09:08:07 2025NAMESPACE: prefectSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:Run the following command to port-forward the UI to your localhost:$ kubectl --namespace prefect port-forward svc/prefect-server 4200:4200Visit http://localhost:4200 to use Prefect!
Error from server (BadRequest): container "prefect-server" in pod "prefect-server-7c87b7f7cf-sgqj2" is waiting to start: CreateContainerConfigError
Run kubectl events and confirm that the authString is correct.
If you see this error:
prefect.exceptions.PrefectHTTPStatusError: Client error '401 Unauthorized' for url 'http://prefect-server.prefect.svc.cluster.local:4200/api/work_pools/kube-test'Response: {'exception_message': 'Unauthorized'}For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401An exception occurred.
Ensure basicAuth is configured in the worker-values.yaml file.
If you see this error:
File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp with map_exceptions(exc_map):File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ self.gen.throw(typ, value, traceback)File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exchttpcore.ConnectError: [Errno -2] Name or service not known
Ensure the PREFECT_API_URL environment variable is properly templated by running the following command: