geldata / geldata/gel-docker

K8S issue: Port is not a valid integer

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
87
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker entrypoint script and the documentation's Deployments section; reproduce the Kubernetes environment-variable behavior described in the logs. Check how EDGEDB_PORT and EDGEDB_SERVER_PORT are handled, then document a Kubernetes pod and service example and verify that the documented configuration avoids the invalid-port error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes, shell
Domain
devops, documentation, infrastructure
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.