OS-specific installation bundles
An OS-specific bundle is a build input that prepares installation assets for one host platform or delivery tool. Kubernetes bundles turn distribution package sources into host package files, while the Helm and Krew bundles produce tools and plugin assets that are placed in the common installer package. Together, these assets let one Kubernetes release support the host package rules of Ubuntu, RHEL, and Amazon Linux without changing the installer flow.
This page is a child of Operating system support and bundle generation. See OS matrix validation for the rules that decide which platforms are supported.
Bundle layout
The bundles/ directory groups build inputs by delivery target. A Kubernetes directory is named for an OS family and release, while helm and krew are shared tool bundles rather than host-distribution variants.
Kubernetes bundle families
Each Kubernetes bundle describes how to obtain the host packages needed by a particular platform. The build passes the Kubernetes full version and minor version into the bundle, then places the resulting files under a versioned package directory keyed by the target OS.
| Bundle family | Host package form | Installation package directory |
|---|---|---|
| Ubuntu 18.04, 20.04, 22.04 | Debian packages | ubuntu-18.04, ubuntu-20.04, ubuntu-22.04 |
| Ubuntu 24.04, 26.04 | Debian packages | ubuntu-24.04, ubuntu-26.04 |
| RHEL 7, 8, 9 | RPM packages | rhel-7, rhel-8, rhel-9 |
| RHEL 7 force path | RPM packages for the legacy force-install path | rhel-7-force |
| Amazon Linux 2023 | RPM packages | amazon-2023 |
The older Ubuntu releases use hand-authored bundle inputs. The current Ubuntu releases use bundle Dockerfiles rendered from the OS matrix. This split preserves the older build path while allowing new modern Ubuntu entries to share one generated shape.
References: bundles/…/Dockerfile bundles/…/Dockerfile• L1-25 bundles/…/Dockerfile• L1-53 bundles/…/Dockerfile• L1-15 bundles/…/Dockerfile• L1-22 bundles/…/Dockerfile• L1-26 os-matrix.yaml• L20-22
Common tool bundles
The Helm and Krew bundles supply tools that are shared by supported host systems. They are built once and packed into dist/common.tar.gz with other installer-wide assets, so they do not create an OS directory inside each Kubernetes version package.
| Bundle | Delivered assets | Installer use |
|---|---|---|
helm | Helm and Helmfile binaries | Runs a supplied Helmfile specification during installation or upgrade |
krew | Krew index data and the preflight and support-bundle plugin archives | Installs the two kubectl plugins used by the distribution |
The build image for these bundles is Ubuntu because it provides the build environment. The resulting tools are the delivery assets; the build image is not the host support boundary.
References: bundles/…/Dockerfile• L1-19 bundles/…/Dockerfile• L1-24 Makefile• L71-79 scripts/…/helm.sh• L2-11 scripts/…/plugins.sh• L1-13
Generated installation assets
The bundle directories are inputs to a two-level build. First, a bundle creates package or tool files. Next, the build assembles those files into versioned distribution archives that the installer can fetch or read from an air-gapped package.
Kubernetes package assembly
For each Kubernetes version, the distribution archive combines Kubernetes container images with the host package directories produced by the OS bundles. It also includes the Kubernetes Manifest, which identifies the image set used by that version. The archive therefore carries both the files needed to prepare the host and the files needed to start Kubernetes.
The assembly path is:
flowchart LR
B[OS bundle Dockerfile] --> P[OS package directory]
M[OS matrix and package rules] --> B
V[Kubernetes version] --> B
P --> K[Versioned Kubernetes package]
I[Kubernetes image manifest] --> K
K --> D[dist/kubernetes-version.tar.gz]
The generated package directory is organized as build/packages/kubernetes/<version>/<os-key>. The final archive preserves that layout under packages/kubernetes/<version>, which lets host package selection use the detected OS while image loading uses the same Kubernetes version.
References: Makefile• L223-245 Makefile• L247-259 Makefile• L448-584 scripts/…/kubernetes.sh• L30-63
Common asset assembly
Common assets are assembled separately from Kubernetes host packages. The build collects the Krew directory, Helm directory, manifests, Kustomize files, Kurl kinds, and the shared utility image into dist/common.tar.gz. This archive supplies assets that are independent of the selected host distribution.
During installation, Helm binaries are copied into the installer bin directory when a Helmfile specification is present on a Kubernetes master. Krew plugin archives are unpacked as kubectl-preflight and kubectl-support_bundle in /usr/local/bin. This keeps tool delivery separate from the OS package selection.
References: Makefile• L71-79 Makefile• L403-416 Makefile• L431-442 scripts/…/helm.sh• L2-11 scripts/…/plugins.sh• L3-7
Version metadata generation
The installer version catalog also feeds generated support metadata. web/…/versions.js provides preferred version lists, and bin/generate-addons.js publishes them in supported-versions-gen.json alongside generated add-on data. Kubernetes versions are sorted from newest to oldest before the latest entry is published because the catalog also contains legacy versions and is not stored in release order. Other entries keep their configured first version as their preferred latest value.
This metadata does not add another OS package directory. It tells downstream installer services which release assets are preferred, while the Kubernetes archives still carry the per-distribution package layout described above.
References: web/…/versions.js• L1-8 bin/generate-addons.js• L50-52 bin/generate-addons.js• L104-124 bin/generate-addons.js• L128-136
Host package selection
The installer treats the versioned Kubernetes archive as a source of platform-specific host packages. It selects a package manager path from the detected distribution, then reads the matching OS directory instead of rebuilding or translating packages during installation.
Distribution mapping
The host package layer maps the detected distribution to the package layout created by the bundles. Ubuntu uses Debian package handling. RHEL-family systems use the matching RPM handling for their major release. Amazon Linux 2023 uses the RHEL 9-style path, while older Amazon Linux can use the separate RHEL 7 force directory when those packages exist.
| Detected host | Package source selected |
|---|---|
| Ubuntu | Ubuntu directory in the Kubernetes package |
| CentOS, RHEL, Oracle Linux, or Rocky Linux | RHEL directory for the host major release |
| Amazon Linux 2023 | RHEL 9-style RPM directory |
| Older Amazon Linux with force packages | rhel-7-force directory |
The selection is important because package names alone do not describe the install rules. The bundle also supplies the dependency information and package form expected by the host package manager.
References: scripts/…/host-packages.sh• L31-66 scripts/…/host-packages.sh• L69-90 scripts/…/kubernetes.sh• L169-232
Installation sequence
When the Kubernetes host stage runs, it installs the selected host packages, loads the versioned Kubernetes images, and then installs the delivered plugins and other host tools. Online and air-gapped installs use the same package layout; the difference is whether the versioned package archive is fetched or was already supplied with the distribution.
sequenceDiagram
participant Installer
participant Archive as Kubernetes package archive
participant Host
Installer->>Archive: Select version and host OS
Archive-->>Installer: Return OS package directory and assets
Installer->>Host: Install kubelet and kubectl packages
Installer->>Host: Install kubeadm and crictl assets
Installer->>Host: Load Kubernetes images
Installer->>Host: Install shared plugins and tools
Helm follows a separate path after its binaries are available. It runs the Helmfile specification when one is configured, but air-gapped Helm installation is currently rejected because the required local chart loading path is not supported.
References: scripts/…/kubernetes.sh• L11-28 scripts/…/kubernetes.sh• L47-63 scripts/…/kubernetes.sh• L169-239 scripts/…/helm.sh• L14-45
Generation and rebuild boundaries
The OS matrix is the authoritative source for modern OS-keyed build artifacts. The generator renders eligible bundle Dockerfiles and updates the matching Makefile regions. A generated file is a checked-in build input, not a file to edit by hand.
Matrix-driven bundle generation
An OS entry with bundleDockerfile: true receives a generated Ubuntu Kubernetes bundle Dockerfile. The generator also renders the modern Ubuntu package targets and the Ubuntu list used when a Kubernetes archive is built. make generate-os-matrix writes these artifacts, and make verify-generated checks that they still match the matrix.
The matrix does not replace the legacy Ubuntu bundle files or the non-Ubuntu bundle definitions. Those remain explicit build inputs because their package sources and compatibility paths differ.
References: os-matrix.yaml• L1-22 os-matrix.yaml• L205-235 cmd/…/main.go• L1-17 pkg/…/dockerfile.go• L9-81 pkg/…/generate.go• L28-47 Makefile• L660-666
Package change detection
Kubernetes host package archives depend on more than the files under packages/kubernetes/<version>. Changes to bundles/ or os-matrix.yaml can change the host package content or the set of supported OS directories. The package upload logic therefore watches those paths for Kubernetes archives, but does not apply that dependency to Kubernetes conformance archives.
This boundary prevents a supported-OS change from leaving an existing Kubernetes archive without the new host package directory. It also avoids rebuilding unrelated conformance archives that contain image assets rather than host packages.
References: bin/list-all-packages.sh• L68-96 bin/upload-dist-versioned.sh• L50-62 scripts/…/upload-dist-bundles-watch-test.sh• L1-40
Change checklist
When these files or sections are changed, remember to consider these:
- A new modern Ubuntu OS requires one authoritative os-matrix.yaml entry, regenerated bundle and Makefile artifacts, and a matching OS directory in every Kubernetes version archive.
- A change to a Kubernetes bundle Dockerfile must trigger a rebuild of the affected Kubernetes host package archives through the
bundles/change path. - A change to Helm or Krew bundle output must remain part of
dist/common.tar.gz; it must not be added to the per-OS Kubernetes package layout. - A change to an OS package directory or package manager path must preserve the mapping between
LSB_DIST, host major version, and the archive directory name. - A change to Krew plugin assets must preserve the archive names expected by the plugin installation step.
- A change to the Kubernetes version catalog must preserve the generated metadata contract: valid bare semver values, newest-first Kubernetes ordering, and the published
latestentry.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Generated OS artifacts do not match os-matrix.yaml | The build can use stale bundle or Makefile targets | make verify-generated rejects stale generated files |
bundles/ changes without a Kubernetes package rebuild | A published Kubernetes archive can lack updated host packages | Kubernetes package change detection watches bundles/ |
| The archive lacks the detected host OS directory | Host package installation cannot find the required packages | The archive assembly invokes each supported OS package target |
| Helm is configured for an air-gapped install | Installation stops because local Helm chart loading is unsupported | helm_load fails early with an explicit message |
| Krew plugin archives are absent or renamed | The expected kubectl plugins are not installed | The common archive and plugin installer use fixed asset names |
| A Kubernetes version entry is invalid or generated without sorting | Published support metadata can reject the value or resolve latest to an old release | generate-addons.js fails on invalid entries and sorts Kubernetes versions before publishing |
Key files
| File | Why to read it |
|---|---|
| os-matrix.yaml | Defines the OS entries that drive modern generated bundle and build artifacts |
bundles/k8s-ubuntu2604/Dockerfile | Shows the current Ubuntu package bundle shape |
bundles/k8s-rhel9/Dockerfile | Shows the RPM bundle shape used by modern RHEL-family hosts |
bundles/k8s-amazon2023/Dockerfile | Shows the Amazon Linux package bundle and its build-time compatibility step |
bundles/helm/Dockerfile | Defines the shared Helm and Helmfile delivery assets |
bundles/krew/Dockerfile | Defines the shared Krew index and plugin delivery assets |
Makefile | Connects bundle builds to per-OS package directories and final archives |
| scripts/…/host-packages.sh | Maps detected hosts to the package directories and install rules |
| scripts/…/kubernetes.sh | Places host package installation and image loading in the Kubernetes host flow |
| scripts/…/helm.sh | Connects shared Helm assets to Helmfile execution and air-gap behavior |
| scripts/…/plugins.sh | Installs the Krew-delivered plugin archives on the host |
| web/…/versions.js | Provides preferred installer and Kubernetes version lists used by generated support metadata |
| bin/generate-addons.js | Converts version lists into published support metadata and defines Kubernetes latest ordering |
| bin/list-all-packages.sh | Defines which source changes force Kubernetes package rebuilds |