Learning Kubernetes the Hard Way
And dumb way, maybe?
I always wanted to do tutorial on learning Kubernetes the hard way, but this time i will do it end to end.
Why so many unsuccessful attempts in the past?
Well if you look at prerequisites section, you will find that you need four machines each having 20 G of storage. I think this requirement remained a restriction for my learning. But this time, I won't be adhering to these requirements and i will spin up 1 debian machine on aws and everything on that.
Let's do it...
This is not a tutorial blog but journal of my learnings and gotchas. Kelsey already provided such a beautiful tutorial, why write another one.
Spinning up a single debian instance
Launhed an instance having following config:
- 30 GB storage
- 4 GB memory
- debian
Now best way to divide this VM into smaller Vms is to create multiple Vagrant boxes. so let's do that.
Successfully install Vagrant, now time to write a Vagrant file.
Vagrant.configure("2") do |config|
(1..4).each do |i|
config.vm.define "debian-#{i}" do |debian|
debian.vm.box = "debian/bullseye64"
debian.vm.hostname = "debian-#{i}"
debian.vm.network "private_network", type: "dhcp"
debian.vm.provider "virtualbox" do |vb|
vb.memory = "512"
vb.cpus = 1
end
end
end
end
Realised I need virtualbox, i installed it too from oracle website.
Now after installing different things, i came across virtualbox hypervisor limitation.
I cannot run VirtualBox.
So this is painful.
Another Approach, spin up 4 ec2 instances :)
This should solve problems.
spinned up 4 instances and all four have elastic ip attached to them :(
This is going to be a costly affair.
After following second part, i have installed and ran kubectl
I will keep on updating it...