Steven Wilber

02/19/2023, 10:17 PM
Hi, I'm trying to get
running locally in Kubernetes using K3D. Setup: • OS:
macOS Ventura 13.2.1
• Docker: Docker Desktop • K3D:
k3d version v5.4.7, k3s version v1.25.6-k3s1 (default)
(the output from
k3d --version
) I'll attach the config files below for: • K3D Cluster Setup • Prefect Orion Deployment and NodePort service Issue: Since K3D is running K8s inside of a docker container, I need to open a port. I can set up the cluster to have an open port (I've chosen 30001) and then I can set up a NodePort in the cluster that listens externally on 30001 and forwards to the Orion pod on 4200. If I set the startup parameters for Orion to be the following ...
Copy code
command: ["prefect", "orion", "start", "--host", "", "--port", "4200", "--log-level", "DEBUG"]
... then I can connect to the Orion UI using the following URL ...
... and this connects through to Orion and shows me the Flow Runs screen as the default. However, I receive the message ...
Can't connect to Orion API at <>. Check that it's accessible from your machine.
... which I guess means that the UI is using AJAX to communicate back to the server, but it can't get to it using port 4200, as it needs to be 30001. If I set the startup parameters for Orion to be the following (note the change in port) ...
Copy code
command: ["prefect", "orion", "start", "--host", "", "--port", "30001", "--log-level", "DEBUG"]
... then when I connect to the Orion UI using the following URL ...
... the page is completely black. The URL changes to be forwarded to ...
... but the page is simply black. If I try to refresh the page I receive the message
the server unexpectedly dropped the connection
in Safari, and didn't send any data. ERR_EMPTY_RESPONSE
in Chrome. I'm sure that this is a silly config issue, but I can't work out for the life of me what it is and I've spent a silly amount of hours on this. Any help is much appreciated. Thanks. Files: •
- config to create the cluster. •
- the Kubernetes Deployment and Service config.
Okay, finally, having typed all that out, I appear to have solved it. NodePort was not my friend. I should have gone down the LoadBalancer route as this means that I can select port 4200 all the way. This seems to work now. Phew!
🦜 1