Starting the machine setup
This commit is contained in:
commit
9f1e8688e4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.vagrant/
|
26
README.md
Normal file
26
README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# K8S in Virtualbox
|
||||
<img width="180" src="https://upload.wikimedia.org/wikipedia/commons/8/87/Vagrant.png">Vagrant_logo</img>
|
||||
<img width="180" src="https://upload.wikimedia.org/wikipedia/commons/d/d5/Virtualbox_logo.png">Virtualbox_logo</img>
|
||||
<img width="180" src="https://www.freecodecamp.org/news/content/images/2021/09/ansble.png">Ansible_logo</img>
|
||||
<img width="180" src="https://sue.eu/wp-content/uploads/sites/6/2022/06/kubernetes-logo-920x920-sue-v0.png">K8S_logo</img>
|
||||
|
||||
|
||||
## Toolset
|
||||
- Virtualbox
|
||||
- Ansible
|
||||
- Vagrant
|
||||
|
||||
|
||||
## Vagrant and Ansible resources:
|
||||
https://developer.hashicorp.com/vagrant/docs/providers/virtualbox/networking
|
||||
https://friendsofvagrant.github.io/v1/docs/multivm.html
|
||||
https://developer.hashicorp.com/vagrant/docs/provisioning/Ansible
|
||||
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html
|
||||
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html
|
||||
|
||||
|
||||
|
||||
## Installation instructions source:
|
||||
https://levelup.gitconnected.com/a-step-by-step-guide-to-setup-kubernetes-cluster-in-virtualbox-ubuntu-20-04-image-91d4510bbf1c\?gi\=a8d7cb695930
|
||||
|
||||
https://medium.com/@mojabi.rafi/create-a-kubernetes-cluster-using-virtualbox-and-without-vagrant-90a14d791617
|
41
Vagrantfile
vendored
Normal file
41
Vagrantfile
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/debian12"
|
||||
config.vm.network "private_network", ip: "192.168.50.4", virtualbox__intnet: true
|
||||
|
||||
config.vm.define :control_plane do |machine|
|
||||
machine.vm.provider "virtualbox" do |v|
|
||||
v.name = "controlPlaneK8S"
|
||||
v.memory = 1024
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--groups", "/K8S"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define :node1 do |machine|
|
||||
machine.vm.provider "virtualbox" do |v|
|
||||
v.name = "Node1K8S"
|
||||
v.memory = 1024
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--groups", "/K8S"]
|
||||
end
|
||||
end
|
||||
config.vm.define :node2 do |machine|
|
||||
machine.vm.provider "virtualbox" do |v|
|
||||
v.name = "Node2K8S"
|
||||
v.memory = 1024
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--groups", "/K8S"]
|
||||
end
|
||||
end
|
||||
config.vm.define :node3 do |machine|
|
||||
machine.vm.provider "virtualbox" do |v|
|
||||
v.name = "Node3K8s"
|
||||
v.memory = 1024
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--groups", "/K8S"]
|
||||
end
|
||||
end
|
||||
end
|
12
controlplane.yml
Normal file
12
controlplane.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
- Tasks:
|
||||
- name: Add APT Repositories
|
||||
become: true
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "
|
||||
state: present
|
||||
|
||||
- name: Runtime interface installation
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
name:
|
Loading…
x
Reference in New Issue
Block a user