Skip to content

Instantly share code, notes, and snippets.

@0x646e78
Last active October 7, 2022 00:03
Show Gist options
  • Save 0x646e78/63e5402760b15f45bfef81199aaeab0b to your computer and use it in GitHub Desktop.
Save 0x646e78/63e5402760b15f45bfef81199aaeab0b to your computer and use it in GitHub Desktop.
Vagrant lab for Kubernetes with VMware Fusion
#!/usr/bin/env bash
swapoff -a
sed -i 's/^.*swap.*$//g' /etc/fstab
apt-get update
apt-get install -y vim
Vagrant.configure("2") do |config|
config.vm.define "k8smaster" do |k8smaster|
k8smaster.vm.box = "generic/ubuntu1804"
k8smaster.vm.hostname = "k8smaster"
k8smaster.vm.network "private_network", ip: "192.168.10.2"
k8smaster.vm.provider "vmware_fusion" do |v|
v.memory = 6144
v.cpus = 3
end
end
config.vm.define "k8sworker1" do |k8sworker1|
k8sworker1.vm.box = "generic/ubuntu1804"
k8sworker1.vm.hostname = "k8sworker1"
k8sworker1.vm.network "private_network", ip: "192.168.10.3"
k8sworker1.vm.provider "vmware_fusion" do |v|
v.memory = 4096
v.cpus = 2
end
end
config.vm.box_check_update = false
config.vm.provision "shell", path: "provision.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment