← Back

Kube-Ready-Box

Kubernetes-optimized Ubuntu 24.04 / 26.04 LTS Vagrant Box

GitHub
Kubernetes
Vagrant
Ubuntu
Multi-Arch

Project Overview

Kube-Ready-Box is an OS-level optimized Ubuntu LTS Vagrant Box for Kubernetes deployments.

It supports both 24.04 LTS (Noble Numbat, default) and 26.04 LTS (Resolute Raccoon, kernel Linux 7.0), with pre-applied system tuning for container orchestration environments.

Distributed on Vagrant Cloud per version and filesystem:

  • 24.04 ext4: dasomel/ubuntu-24.04-ext4 / xfs: dasomel/ubuntu-24.04-xfs
  • 26.04 ext4: dasomel/ubuntu-26.04-ext4 / xfs: dasomel/ubuntu-26.04-xfs

24.04 vs 26.04

24.04 LTS (Noble Numbat)26.04 LTS (Resolute Raccoon)
Kernel6.87.0
init / cgroupsystemd 255, cgroup v2 defaultsystemd 259, cgroup v1 removed (v2-only)
Container runtimecontainerd 1.7containerd 2.2 / runc 1.4
CryptoTLS 1.2+Post-quantum default (OpenSSL 3.5 / OpenSSH 10.2)
Core utilitiesGNU coreutils, sudopartial Rust rewrite (uutils, sudo-rs)
Choose whenMaximum stability (default)Latest LTS, kernel 7.0 features

K8s note: 26.04 is cgroup v2-only, so set SystemdCgroup=true for kubelet/containerd. Both lines are tuned identically for Kubernetes.

Key Features

Multi-Architecture & Provider Support

ProviderAMD64ARM64Notes
VirtualBoxVirtualBox 7.1+ required for ARM64
VMware FusionApple Silicon supported

Filesystem Selection (ext4 / xfs)

ext4xfs
Best forGeneral purposeK8s workloads, large files
K8s QuotaNo native support--local-storage-capacity-isolation
Online ShrinkSupportedNot supported
Box Size~2.2GB~3.4GB

Large Disk & Auto-Extension

  • 1TB Disk: Large disk with thin provisioning (ext4 ~2.2GB, xfs ~3.4GB on disk)
  • Auto-Extension: Disk auto-extends on boot (partition → PV → LV → filesystem)

Kubernetes Optimizations

Pre-applied system tuning:

Kernel Parameters

# Network buffer optimization
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
 
# Enable IP forwarding
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1

Resource Limits

# Process and file descriptor limits
* soft nofile 1048576
* hard nofile 1048576
* soft nproc 1048576
* hard nproc 1048576

Disk I/O Scheduler

  • SSD: none (optimal performance)
  • HDD: mq-deadline (throughput optimized)

Swap Disabled

  • Completely removed to meet Kubernetes requirements

Pre-installed Tools

CategoryTools
K8s Ecosystemjq, yq, bash-completion, nfs-common, sshpass
Monitoringsysstat, iotop, iftop, nload, nethogs, dool
Network Diagipvsadm, ipset, conntrack, ethtool, tcpdump, nmap
Performancelinux-tools, bpfcc-tools, bpftrace

Security Hardening (v1.1.0)

v1.1.0 includes the removal of needrestart (mitigating 5 CVEs), installation of auditd disabled by default (CIS benchmark readiness), apparmor-utils, and persistent mounts for Longhorn CSI and Cilium bpffs. For detailed information, see the Box Architecture & Build document.

What's NOT Included

Intentionally excluded components (user choice):

  • Container Runtime (containerd, CRI-O, etc.)
  • Kubernetes components (kubelet, kubeadm, kubectl)
  • CNI plugins (Calico, Cilium, etc.)

Getting Started

Requirements

  • Vagrant 2.3+
  • VirtualBox 7.1+ or VMware Fusion

Basic Usage

# 24.04 ext4 (default, stable, general purpose)
vagrant init dasomel/ubuntu-24.04-ext4
vagrant up --provider=vmware_desktop
 
# 24.04 xfs (better for K8s ephemeral storage quota, large files)
vagrant init dasomel/ubuntu-24.04-xfs
vagrant up --provider=vmware_desktop
 
# 26.04 (Resolute Raccoon, kernel Linux 7.0)
vagrant init dasomel/ubuntu-26.04-ext4
vagrant up --provider=vmware_desktop

Vagrantfile Example

Vagrant.configure("2") do |config|
  # 24.04: "dasomel/ubuntu-24.04-ext4" or "dasomel/ubuntu-24.04-xfs"
  # 26.04: "dasomel/ubuntu-26.04-ext4" or "dasomel/ubuntu-26.04-xfs"
  config.vm.box = "dasomel/ubuntu-24.04-ext4"
 
  config.vm.provider "virtualbox" do |vb|
    vb.memory = 4096
    vb.cpus = 2
  end
 
  config.vm.provider "vmware_desktop" do |v|
    v.vmx["memsize"] = "4096"
    v.vmx["numvcpus"] = "2"
  end
 
  config.vm.hostname = "k8s-node"
  config.vm.network "private_network", ip: "192.168.56.10"
end

Verify Optimizations

# Check box info
vagrant ssh -c "cat /etc/vagrant-box/info.json"
 
# Run tuning verification script
vagrant ssh -c "/bin/bash /etc/vagrant-box/check-tuning.sh"

Kubernetes Installation Example

After creating the box, install Kubernetes:

# 1. Install and configure containerd
sudo apt-get update && sudo apt-get install -y containerd
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
sudo sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
sudo systemctl restart containerd && sudo systemctl enable containerd
 
# 2. Install Kubernetes (choose version)
K8S_VERSION="v1.31"
curl -fsSL "https://pkgs.k8s.io/core:/stable:/${K8S_VERSION}/deb/Release.key" | \
  sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${K8S_VERSION}/deb/ /" | \
  sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
 
# 3. Initialize cluster (master node)
sudo kubeadm init --pod-network-cidr=10.244.0.0/16

Build Information

This box is built using Packer:

cd packer
 
# Initialize Packer plugins
./build.sh init
 
# Build 24.04 (default)
./build.sh vmware-arm64
./build.sh vmware-arm64 --fs=xfs
 
# Build 26.04
./build.sh vmware-arm64 --version=26.04
./build.sh vmware-arm64 --version=26.04 --fs=xfs
 
# Build all boxes
./build.sh all                  # 24.04 ext4
./build.sh all --version=26.04  # 26.04 ext4

CI: Use the ubuntu_version input in the GitHub Actions workflow_dispatch trigger to select 24.04 or 26.04.

AI Collaboration Directory

This repository includes an .agent/ directory for AI coding assistants:

  • AGENT.md: Technical guide (Packer, K8s tuning, optimizations)
  • SECURITY.md: Security guidelines
  • skills/: AI agent skills (automated reviews)

Technical Documentation

Detailed write-ups of each area, sourced directly from the repository.

DocumentContents
Box Architecture & BuildPacker build pipeline, XFS prjquota design, multi-provider support
UsageVagrantfile integration, provider selection, Kubernetes post-install
Release & DistributionVagrant Cloud / HCP publishing, credentials, deploy checklist

References