You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started out this issue as a question, but now it's much more an answer to running EdgeDB on K8S.
I've seen this is a common issue for other packages (here and here), but I was surprised this hadn't already been reported for EdgeDB. To my eyes, taking a look at the entrypoint script EdgeDB's fix seems more involved than simply amending the container's environment variables.
Problem
Running a pod using edgedb/edgedb without overriding any environment variables gives me the following logs in my k8s dashboard.
Usage: edgedb-server.py [OPTIONS] COMMAND [ARGS]...
Try 'edgedb-server.py -h' for help.
Error: Invalid value for '-P' / '--port': 'tcp://10.245.182.142:5656' is not a valid integer
Running with EDGEDB_SERVER_PORT=5656 gives:
ERROR: EDGEDB_SERVER_PORT and EDGEDB_PORT are exclusive, but both are set.
EDGEDB_PORT is used as environment variable in the docker entrypoint script. We have to overwrite this.
Solution
Specify EDGEDB_PORT=5656 as an environment variable. The EdgeDB server will bind to 0.0.0.0 of the container and then you can expose the 5656 using a Kubernetes service object.
I'll leave this open and wait to be responded to and closed by an admin for SEO purposes.
To the EdgeDB contributors, would you be happy for Kubernetes to be added to the 'Deployments' section of the docs? We could include an example pod and service.
The text was updated successfully, but these errors were encountered:
midzdotdev
changed the title
Fails to run in Kubernetes
K8S issue: Port is not a valid integer
Jan 16, 2023
Ah, this is an annoying and dubious behavior of docker --link that is inherited by k8s. I think we can find a way to handle this nicely without the need for special cases, like we do in edgedb-python.
I started out this issue as a question, but now it's much more an answer to running EdgeDB on K8S.
I've seen this is a common issue for other packages (here and here), but I was surprised this hadn't already been reported for EdgeDB. To my eyes, taking a look at the entrypoint script EdgeDB's fix seems more involved than simply amending the container's environment variables.
Problem
Running a pod using
edgedb/edgedb
without overriding any environment variables gives me the following logs in my k8s dashboard.Running with
EDGEDB_SERVER_PORT=5656
gives:EDGEDB_PORT
is used as environment variable in the docker entrypoint script. We have to overwrite this.Solution
Specify
EDGEDB_PORT=5656
as an environment variable. The EdgeDB server will bind to0.0.0.0
of the container and then you can expose the5656
using a Kubernetes service object.I'll leave this open and wait to be responded to and closed by an admin for SEO purposes.
To the EdgeDB contributors, would you be happy for Kubernetes to be added to the 'Deployments' section of the docs? We could include an example pod and service.
The text was updated successfully, but these errors were encountered: