Skip to content

alvistack/vagrant-kubernetes

Repository files navigation

Vagrant Box Packaging for Kubernetes

AlviStack Certified Kubernetes

Gitlab pipeline status GitHub tag GitHub license Vagrant Box download

Vagrant Box Packaging for Kubernetes.

This Vagrant Box provides Libvirt and VirtualBox image for running a Certified Kubernetes environment in single node all-in-one mode.

Supported Boxes and Respective Packer Template Links

Overview

Quick Start

Once you have Vagrant and VirtaulBox installed, run the following commands under your project directory:

# Initialize Vagrant
cat > Vagrantfile <<-EOF
Vagrant.configure('2') do |config|
  config.vm.hostname = 'kubernetes-1.32'
  config.vm.box = 'alvistack/kubernetes-1.32'

  config.vm.provider :libvirt do |libvirt|
    libvirt.cpu_mode = 'host-passthrough'
    libvirt.cpus = 2
    libvirt.disk_bus = 'virtio'
    libvirt.disk_driver :cache => 'writeback'
    libvirt.driver = 'kvm'
    libvirt.memory = 8192
    libvirt.memorybacking :access, :mode => 'shared'
    libvirt.nested = true
    libvirt.nic_model_type = 'virtio'
    libvirt.storage :file, bus: 'virtio', cache: 'writeback'
    libvirt.video_type = 'virtio'
  end

  config.vm.provider :virtualbox do |virtualbox|
    config.vm.disk :disk, name: 'sdb', size: '10GB'
    virtualbox.cpus = 2
    virtualbox.customize ['modifyvm', :id, '--cpu-profile', 'host']
    virtualbox.customize ['modifyvm', :id, '--nested-hw-virt', 'on']
    virtualbox.memory = 8192
  end
end
EOF

# Start the virtual machine
export VAGRANT_EXPERIMENTAL='1'
vagrant up

# SSH into this machine
vagrant ssh

# Terminate the virtual machine
vagrant destroy --force

Molecule

You could also run our Molecule test cases if you have Vagrant and Libvirt installed, e.g.

# Run Molecule on Kubernetes 1.32
molecule converge -s kubernetes-1.32-libvirt

Please refer to .gitlab-ci.yml for more information on running Molecule.

Versioning

YYYYMMDD.Y.Z

Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.

YYYYMMDD.0.0

Version tags ended with .0.0 are rolling release rebuild by GitLab pipeline in weekly basis. Thus using these tags will ensure you are running the latest packages provided by the base image project.

License

Author Information