Skip to content

feat(youki-deploy): add DaemonSet-based installer for installing youki on Kubernetes #3526

Open
saku3 wants to merge 1 commit into
youki-dev:mainfrom
saku3:feat-youki-deploy-for-kubernetes
Open

feat(youki-deploy): add DaemonSet-based installer for installing youki on Kubernetes #3526
saku3 wants to merge 1 commit into
youki-dev:mainfrom
saku3:feat-youki-deploy-for-kubernetes

Conversation

@saku3
Copy link
Copy Markdown
Member

@saku3 saku3 commented May 4, 2026

Description

Adds tools/youki-deploy/, a DaemonSet-based installer that drops the youki binary onto each node of a Kubernetes cluster and registers it with containerd as a RuntimeClass named youki.

This provides a minimal DaemonSet for installing youki as part of this issue #3525.

Added the following files under tools/youki-deploy/.

  • Dockerfile: builds an image bundling the youki release binary and install-youki.sh.
  • install-youki.sh: runs inside the DaemonSet pod; copies youki to /usr/local/bin/youki on the host, appends a youki
    runtime block to /etc/containerd/config.toml
  • youki-deploy.yaml: Namespace + RuntimeClass youki + ServiceAccount + DaemonSet (privileged, hostPID, hostPath mounts on /usr/local/bin and /etc/containerd).

added document

  • New docs/src/user/kubernetes.md
    • user-facing guide for installing youki via youki-deploy.
  • Extended docs/src/developer/e2e/kubernetes_test.md with a Multi Node deploy test section.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test updates
  • CI/CD related changes
  • Other (please describe): add youki install tool

Testing

  • Added new unit tests
  • Added new integration tests
  • Ran existing test suite
  • Tested manually (please provide steps)
just test-kind-deploy

Related Issues

Part of #3525

Additional Context

Signed-off-by: Yusuke Sakurai <yusuke.sakurai@3-shake.com>
Copy link
Copy Markdown
Contributor

@nayuta723 nayuta723 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be outside the scope of this PR, but I left a comment on the Dockerfile. Please take a look.

Comment thread justfile
kind delete cluster --name {{ KIND_CLUSTER_NAME }}

[private]
kind-cluster-multi:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it’s not idempotent, it would be better to skip it if the cluster already exists.

name: youki
handler: youki
---
apiVersion: v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we’re not configuring RBAC or anything similar, deploying a ServiceAccount probably doesn’t provide much value.

&& rm -rf /var/lib/apt/lists/*
WORKDIR /youki
COPY . .
RUN cargo build --release -p youki --features "v2 systemd"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’d like to enable the build cache as shown below.

Suggested change
RUN cargo build --release -p youki --features "v2 systemd"
RUN --mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=/root/.cargo/git \
--mount=type=cache,target=/youki/target \
cargo build --release -p youki --features "v2 systemd" && \
cp target/release/youki /tmp/youki

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.${RUNTIME_HANDLER}]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.${RUNTIME_HANDLER}.options]
BinaryName = "${HOST_BIN_DIR#/host}/youki"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is written with a dependency on the youki-deploy DaemonSet, I’d like to revise it.
Please configure separate default values for HOST_BIN_DIR and REAL_BIN_DIR.

kind: RuntimeClass
metadata:
name: youki
handler: youki
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please configure scheduling to avoid failures caused by early scheduling.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants