k8s thw 02 - compute resources (vbox)
this will install a bunch of ready to run - pre configured maschines - incl. ip configuration on your host
for rhel based maschines:
# get virtualbox reo and save it under /etc/yum.repos.d
> wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
# install kernel header and build-tools using EPEL
> dnf --enablerepo=epel install dkms
> dnf install kernel-devel-$(uname -r) kernel-headers gcc make perl
# install vbox headless
> dnf install --setopt=install_weak_deps=False VirtualBox-6.1
# test if installation was successfull
> VBoxManage --version
---
6.1.26r145957
# enable vbox service
> systemctl enable vboxdrv.service
# add user to vbox group
> usermod -a -G vboxusers vmadmin
# install vagrant
> dnf install yum-utils
> yum-config-manager \
--add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
> dnf install vagrant
# install git
> dnf install git-core
# clone mmumshad for of "kubernetes the hard way"
> git clone https://github.com/mmumshad/kubernetes-the-hard-way.git
> cd kubernetes-the-hard-way/vagrant
# start building maschines - takes about 10 minutes
> vagrant up --provider=virtualbox
# check vagrant status
> vagrant status
---
Current machine states:
master-1 running (virtualbox)
master-2 running (virtualbox)
loadbalancer running (virtualbox)
worker-1 running (virtualbox)
worker-2 running (virtualbox)
# test ssh login using dn
> vagrant ssh worker-1
# to manage things like scp - append maschines to ssh config
> vagrant ssh-config >> ~/.ssh/config
> chmod 644 ~/.ssh/config
— copyleft —
all commands shown on this page are from
mmumshad’s fork of “kubernetes-the-hard-way” by kelseyhightower
on github
19-09-2021