Skip to content

K8S issue: Port is not a valid integer #69

Open
@midzdotdev

Description

@midzdotdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions