Skip to content

new(k0sproject.io/k0s): zero-deps Kubernetes distribution#13137

Open
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/k0s
Open

new(k0sproject.io/k0s): zero-deps Kubernetes distribution#13137
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/k0s

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

Summary

Adds a pantry recipe for k0s, k0sproject's single-binary CNCF-class Kubernetes distribution (sibling to the existing k0sctl recipe).

  • Builds from source via the upstream Makefile.
  • EMBEDDED_BINS_BUILDMODE=none skips the Docker-based build of embedded kubelet/etcd/containerd/runc/kine/konnectivity (pantry CI has no Docker daemon). The resulting k0s CLI still ships the full code, with third-party node binaries supplied out of band (e.g. airgap bundle).
  • VERSION is passed explicitly because the upstream Makefile uses git describe --tags, which fails inside a tarball checkout.
  • Restricted to linux/x86-64 and linux/aarch64; the upstream Makefile pins TARGET_OS=linux and k0s is a Linux-node distribution.

Test plan

  • CI builds on linux/x86-64
  • CI builds on linux/aarch64
  • k0s version matches the tag
  • k0s --help produces help output

tannevaled and others added 2 commits May 31, 2026 20:44
Add a recipe for k0s, k0sproject's single-binary CNCF Kubernetes
distribution. Built from source via the upstream Makefile with
EMBEDDED_BINS_BUILDMODE=none (pantry CI has no Docker daemon to run the
Docker-driven build of embedded kubelet/etcd/containerd/runc/kine/
konnectivity components). VERSION is passed explicitly because the
Makefile would otherwise call `git describe --tags`, which fails inside
a tarball checkout. Restricted to linux/x86-64 and linux/aarch64; the
upstream Makefile pins TARGET_OS=linux.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@tannevaled
Copy link
Copy Markdown
Contributor Author

Iter 4 progress: version-parser fixed (`+k0s.N` strip in commit `c7ebc727`), but now blocked on Docker dependency for code generation.

The recipe's earlier `EMBEDDED_BINS_BUILDMODE=none` correctly bypasses the Docker build for embedded kubelet/etcd/containerd/runc/kine/konnectivity components. However, k0s's Makefile ALSO uses a Docker image (`.k0sbuild.docker-image.k0s`) as the build host for code-generation steps (`controller-gen`, `client-gen`, `gen-bindata`).

```
make: *** [Makefile:135: .k0sbuild.docker-image.k0s] Error 127
```

Error 127 = command not found (`docker` is not in pantry's CI environment).

What would unblock this

Three paths, none small:

  1. Bypass make + run codegen directly via Go. The Makefile delegates to `$(GO) run` for codegen, but those invocations have `.k0sbuild.docker-image.k0s` as a prereq. Would require replicating the codegen pipeline in the recipe shell script — significant maintenance burden as k0s's codegen evolves.

  2. Vendor the generated code. Pre-generate the codegen outputs upstream and check them into a release branch or distributable tarball. Upstream maintains the docker-based pipeline; pantry would need a custom tarball.

  3. Add docker to pantry's CI runner. Systemic change affecting the whole pantry, requires maintainer buy-in (and probably won't happen — docker-in-CI is heavy and pantry's bottle build approach is intentionally docker-free).

Recommendation

Park this PR with the current state (version-parser fix is documented and reusable). Same pattern as #13141 (open-vcdiff) and #13131 (Neon). The k0s server is a multi-component K8s distribution that genuinely needs orchestrated tooling — pantry's single-recipe model doesn't map.

`k0sctl` (the cluster-launcher CLI) is already in pantry at `projects/github.com/k0sproject/k0sctl/` — that's the user-facing tool. Users wanting to RUN k0s on Linux nodes can install the upstream tarball directly via their distro or k0s's own installer script.

Closing as wontfix if no maintainer objection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant