Skip to content

Feature: khost ​

Description ​

Configures Garden Linux for running vanilla Kubernetes workloads as a Kubernetes host node.

What it does ​

Installs and configures packages needed for a Kubernetes node: conntrack, ipvsadm, socat, ethtool, apparmor, gnupg. Configures:

  • Bridge netfilter sysctl settings for Kubernetes networking
  • IP forwarding for pod networking
  • Inotify limits for large numbers of watches
  • IPVS kernel module loading
  • Removes AppArmor init.d script (managed by systemd instead)
  • Modifies fstab to remove swap (Kubernetes requires no swap)

Requires chost for the container runtime.

Files ​

Files present in this feature and their purpose. See the feature file reference for the semantics of each file type.

FilePurpose
exec.late (ref)Removes swap entries from fstab and performs late-stage Kubernetes node setup.
file.exclude (ref)Removes from rootfs: /etc/init.d/apparmor (AppArmor is managed via systemd).
file.include.markers.yaml (ref)Maps files to test-coverage marker IDs.
fstab.mod (ref)Removes the swap partition from fstab (Kubernetes requires no swap).
info.yaml (ref)Declares type: element and included/excluded features.
pkg.include (ref)Installs: apparmor, conntrack, ethtool, ipvsadm, socat, gnupg.
release.keyGPG signing key for a Kubernetes package repository.
file.include/etc/modules-load.d/br-nf.conf (file.include)Loads the br_netfilter kernel module at boot for Kubernetes network policy.
file.include/etc/sysctl.d/20-br-nf.conf (file.include)Enables bridge netfilter for Kubernetes network policy enforcement.
file.include/etc/sysctl.d/20-inotify.conf (file.include)Increases inotify watch limits for large Kubernetes deployments.
file.include/etc/sysctl.d/20-ip-forward.conf (file.include)Enables IP forwarding for pod-to-pod networking.

Includes:

  • chost — provides the container runtime (containerd) required by Kubernetes.

Further reading ​