Kubedock is a minimal implementation of the docker api that will orchestrate containers on a Kubernetes cluster, rather than running containers locally.
We are trying to use kubedock with Testcontainers for Java. I set it up and was able to connect, but we get 404s when trying to call the Docker API endpoint /images/load, and from the logs below and grepping through kubedock, it looks like that endpoint isn't implemented.
I read the kubedock docs, where it says
Kubedock implements the images API by tracking which images are requested. It is not able to actually build images.
But I couldn't find anything about whether or not kubedock is expected to be able to load already-built images, or if it is only able to refer to images stored in some Docker registry. Can you please confirm if this is a bug or user error that I am experiencing, or if this is expected behavior and a purposeful limitation of kubedock to keep it lightweight?
Logs:
I0804 18:10:25.899934 1 main.go:28] kubedock 0.11.0 (20230524-112404)
I0804 18:10:25.900722 1 main.go:105] kubernetes config: namespace=jenkins-ci, initimage=joyrex2001/kubedock:0.11.0, ready timeout=1m0s
I0804 18:10:25.901321 1 main.go:129] reaper started with max container age 1h0m0s
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
I0804 18:10:25.901646 1 main.go:102] default image pull policy: ifnotpresent
I0804 18:10:25.901718 1 main.go:105] service account used in deployments: default
I0804 18:10:25.901782 1 main.go:107] using namespace: jenkins-ci
[GIN-debug] GET /info --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func2 (6 handlers)
[GIN-debug] GET /events --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func3 (6 handlers)
[GIN-debug] GET /version --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func4 (6 handlers)
[GIN-debug] GET /_ping --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func5 (6 handlers)
[GIN-debug] HEAD /_ping --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func6 (6 handlers)
[GIN-debug] POST /containers/create --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func7 (6 handlers)
[GIN-debug] POST /containers/:id/start --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func8 (6 handlers)
[GIN-debug] POST /containers/:id/attach --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func9 (6 handlers)
[GIN-debug] POST /containers/:id/stop --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func10 (6 handlers)
[GIN-debug] POST /containers/:id/restart --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func11 (6 handlers)
[GIN-debug] POST /containers/:id/kill --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func12 (6 handlers)
[GIN-debug] POST /containers/:id/wait --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func13 (6 handlers)
[GIN-debug] POST /containers/:id/rename --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func14 (6 handlers)
[GIN-debug] POST /containers/:id/resize --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func15 (6 handlers)
[GIN-debug] DELETE /containers/:id --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func16 (6 handlers)
[GIN-debug] GET /containers/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func17 (6 handlers)
[GIN-debug] GET /containers/:id/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func18 (6 handlers)
[GIN-debug] GET /containers/:id/logs --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func19 (6 handlers)
[GIN-debug] HEAD /containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func20 (6 handlers)
[GIN-debug] GET /containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func21 (6 handlers)
[GIN-debug] PUT /containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func22 (6 handlers)
[GIN-debug] POST /containers/:id/exec --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func23 (6 handlers)
[GIN-debug] POST /exec/:id/start --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func24 (6 handlers)
[GIN-debug] GET /exec/:id/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func25 (6 handlers)
[GIN-debug] POST /networks/create --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func26 (6 handlers)
[GIN-debug] POST /networks/:id/connect --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func27 (6 handlers)
[GIN-debug] POST /networks/:id/disconnect --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func28 (6 handlers)
[GIN-debug] GET /networks --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func29 (6 handlers)
[GIN-debug] GET /networks/:id --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func30 (6 handlers)
[GIN-debug] DELETE /networks/:id --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func31 (6 handlers)
[GIN-debug] POST /networks/prune --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func32 (6 handlers)
[GIN-debug] POST /images/create --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func33 (6 handlers)
[GIN-debug] GET /images/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func34 (6 handlers)
[GIN-debug] GET /images/:image/*json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterDockerRoutes.func35 (6 handlers)
[GIN-debug] GET /containers/:id/top --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /containers/:id/changes --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /containers/:id/export --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /containers/:id/stats --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /containers/:id/update --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /containers/:id/pause --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /containers/:id/unpause --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /containers/:id/attach/ws --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /containers/prune --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /build --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /volumes --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /volumes/:id --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] DELETE /volumes/:id --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /volumes/create --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] POST /volumes/prune --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (6 handlers)
[GIN-debug] GET /libpod/version --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func2 (7 handlers)
[GIN-debug] GET /libpod/_ping --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func3 (7 handlers)
[GIN-debug] HEAD /libpod/_ping --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func4 (7 handlers)
[GIN-debug] POST /libpod/containers/create --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func5 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/start --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func6 (7 handlers)
[GIN-debug] GET /libpod/containers/:id/exists --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func7 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/attach --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func8 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/stop --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func9 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/restart --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func10 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/kill --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func11 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/wait --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func12 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/rename --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func13 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/resize --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func14 (7 handlers)
[GIN-debug] DELETE /libpod/containers/:id --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func15 (7 handlers)
[GIN-debug] GET /libpod/containers/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func16 (7 handlers)
[GIN-debug] GET /libpod/containers/:id/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func17 (7 handlers)
[GIN-debug] GET /libpod/containers/:id/logs --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func18 (7 handlers)
[GIN-debug] HEAD /libpod/containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func19 (7 handlers)
[GIN-debug] GET /libpod/containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func20 (7 handlers)
[GIN-debug] PUT /libpod/containers/:id/archive --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func21 (7 handlers)
[GIN-debug] POST /libpod/containers/:id/exec --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func22 (7 handlers)
[GIN-debug] POST /libpod/exec/:id/start --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func23 (7 handlers)
[GIN-debug] GET /libpod/exec/:id/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func24 (7 handlers)
[GIN-debug] POST /libpod/images/pull --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func25 (7 handlers)
[GIN-debug] GET /libpod/images/json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func26 (7 handlers)
[GIN-debug] GET /libpod/images/:image/*json --> github.com/joyrex2001/kubedock/internal/server/routes.RegisterLibpodRoutes.func27 (7 handlers)
[GIN-debug] GET /libpod/info --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (7 handlers)
[GIN-debug] POST /libpod/images/build --> github.com/joyrex2001/kubedock/internal/server/httputil.NotImplemented (7 handlers)
I0804 18:10:25.902290 1 main.go:37] api server started listening on :2475
[GIN-debug] Listening and serving HTTP on :2475
[GIN] 2023/08/04 - 18:10:36 | 200 | 26.191µs | 127.0.0.1 | HEAD "/_ping"
[GIN] 2023/08/04 - 18:10:53 | 404 | 16.815218898s | 127.0.0.1 | POST "/images/load?quiet=1"
[GIN] 2023/08/04 - 18:10:53 | 200 | 16.67µs | 127.0.0.1 | HEAD "/_ping"
Correct, at this point kubedock is not able to load existing images. These images need to be loaded in a registry that is available to kubernetes instead.
We are trying to use kubedock with Testcontainers for Java. I set it up and was able to connect, but we get 404s when trying to call the Docker API endpoint
/images/load
, and from the logs below and grepping through kubedock, it looks like that endpoint isn't implemented.I read the kubedock docs, where it says
But I couldn't find anything about whether or not kubedock is expected to be able to load already-built images, or if it is only able to refer to images stored in some Docker registry. Can you please confirm if this is a bug or user error that I am experiencing, or if this is expected behavior and a purposeful limitation of kubedock to keep it lightweight?
Logs: