Provision cluster with kubeadm in Kubernetes for beginners

Hi all,

I have almost completed all the basics of k8s for beginners course, on the last module of setting up kubeadm and creating a cluster with it. I installed virtualBox, vagrant and also cloned CKA-course repository as mentioned. The repo structure is also not same now as shown in the video and Vagrantfile content does not look same to what its shown in the tutorial. I am new to vagrant so can’t understand the issue too, Error getting :

The guest machine entered an invalid state while waiting for it
to boot. Valid states are ‘starting, running’. The machine is in the
‘aborted’ state. Please verify everything is configured
properly and try again.
If the provider you’re using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you’re using VirtualBox, run vagrant up while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you’re using
is not properly configured. This is very rarely a Vagrant issue.

Vagrant version : 2.4.1
VirtualBox version: 7.0.15_BETA4r161959, as system is ARM64

Using a beta version of virtualBox could be an issue?

I don’t think Virtualbox works on ARM processors at all. If you’re using an M1 or M2 macintosh with Virtualbox, then it flat out does not work. Instead, you should use the “Apple Silicon” version of the kubeadm tutorial, which uses multipass. It works very well on the newer Macs.
If you’re using an ARM Windows machine, not sure what you should be using. But I know people who know people, they will know :slight_smile:

Hi Rob, thank you for your reply! I’m using macOS ARM64 and was planning to buy CKA course too, but in index I checked there is again use of virtualBox with Vagrant. Can you tell any alternative to it?

Use this tutorial from the CKA repo. This uses the multipass utility instead of virtualbox and vagrant, and it will work very well on your M1 or M2 Mac.

1 Like

Hi Rob, thank you for providing the documentation. For me, I used VMWare instead as Multipass was not running properly and throwing lot of errors and no solution present online for it.

If anybody faces any issue, please follow:

Automatically Create and manage VMs with Vagrant on Mac M1 chip | by zamartech | Medium

VMWare Fusion is certainly one way to solve the problem. Did you create the virtuals manually, or did you use the Vagrantfile with it, possibly with changes?

@Ayush-Behl Bear in mind that the Multipass solution indicated by Rob is developed by KodeKloud, is known to work and is supported by us.
We do not have tested solutions for other hypervisors.

Hi Alistair,

Surely didn’t know that, it is a really good thing that kodekloud has worked upon! However after installing it with brew and executing multipass start in CLI

It showed:

start failed: cannot connect to the multipass socket

If you could help me solving this issue, would be great as VMWare that I am using is of a free trial.

Version : multipass 1.13.1+mac

Hi Rob, I’m using the same VagrantFile that is provided in the tutorial and kodekloud github repo, only changed the name of vm.provider in VagrantFile.

Not sure whether multipass and VMware interfere with each other.
Uninstall both and reinstall multipass. Perhaps try installing multipass via the package rather than with brew.
When I installed it, I used the package. Rob may or may not have used brew.
Ensure you follow the instructions on their site carefully.

Regarding the vagrantfile, it’s unlikely it would work just by changing vm.provider. Different providers have different options.

@Alistair_KodeKloud I install multipass with brew; works fine. I’m not sure why @Ayush-Behl is having problems with multipass, but it’s unlikely to be due to VMWare; I’m using both packages right now on my M2 Mac, and they cohabit fine.

Also: don’t be too surprised that the VMWare vagrant provider works that easily with our virtualbox files. If you’re only using the high level networking hooks in your scripts, this is by Hashicorp’s (the vendor for the provider) design. It’s supposed to be a drop-in replacement for virtualbox. Happy to hear from @Ayush-Behl that it indeed is that cross-compatible.