The Single Binary

One executable provides the server, the agent, kubectl, crictl, and the ctr tools.

Syntaxk3s [server|agent|kubectl|crictl|ctr] [flags]

Everything in k3s lives in one file. That same binary can play different roles depending on how you launch it.

Built-in subcommands

  • k3s server — start a control-plane (server) node.
  • k3s agent — start a worker (agent) node.
  • k3s kubectl — the bundled kubectl.
  • k3s crictl — inspect containers at the CRI level.
  • k3s ctr — talk to the bundled containerd directly.

Because the tools are bundled, you do not need to install kubectl, containerd, or a CNI plugin separately. This is a big part of why k3s installs so quickly.

Example

Example · bash
# The one binary, many roles
k3s server --help | head
k3s agent --help | head

# Bundled container tooling
sudo k3s crictl ps
sudo k3s ctr images ls

When to use it

  • A sysadmin copies the single k3s binary to an offline machine via SCP and bootstraps a cluster without any package manager.
  • A container image build step ADDs the k3s binary directly into a minimal Docker image to create a self-contained Kubernetes node.
  • An automation script downloads a pinned k3s binary URL to guarantee reproducible cluster versions across all deployment environments.

More examples

List built-in subcommands

Displays the top-level help to show all roles and tools embedded inside the single k3s executable.

Example · bash
k3s --help | head -30
# Subcommands: server, agent, kubectl, crictl, ctr, check-config, etcd-snapshot

Use bundled kubectl via k3s

Invokes kubectl through the k3s binary without needing a separate kubectl installation or kubeconfig flag.

Example · bash
k3s kubectl get nodes
k3s kubectl get pods -A
# Equivalent to: kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get pods -A

Inspect runtime with crictl

Uses the embedded crictl tool to inspect running containers and the container runtime directly on the node.

Example · bash
k3s crictl ps
k3s crictl images
k3s crictl info | grep -i runtime

Discussion

  • Be the first to comment on this lesson.