-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
40 lines (33 loc) · 1.07 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV['VAGRANT_NO_PARALLEL'] = 'yes'
Vagrant.configure(2) do |config|
config.vm.provision "shell", path: "bootstrap.sh"
# Kubernetes Master Server
config.vm.define "kmaster" do |kmaster|
kmaster.vm.box = "bento/ubuntu-18.04"
kmaster.vm.hostname = "kmaster.example.com"
kmaster.vm.network "private_network", ip: "172.42.42.100"
kmaster.vm.provider "virtualbox" do |v|
v.name = "kmaster"
v.memory = 2048
v.cpus = 2
end
kmaster.vm.provision "shell", path: "bootstrap_kmaster.sh"
end
NodeCount = 2
# Kubernetes Worker Nodes
(1..NodeCount).each do |i|
config.vm.define "kworker#{i}" do |workernode|
workernode.vm.box = "bento/ubuntu-18.04"
workernode.vm.hostname = "kworker#{i}.example.com"
workernode.vm.network "private_network", ip: "172.42.42.10#{i}"
workernode.vm.provider "virtualbox" do |v|
v.name = "kworker#{i}"
v.memory = 1024
v.cpus = 1
end
workernode.vm.provision "shell", path: "bootstrap_kworker.sh"
end
end
end