Hello Team,
I am getting the below errors when i am trying to create 3 machines for provisioning cluster using kubeadm.
please find below the attachment of the error:
chinkleet@UbuntuServer-VirtualBox:~$ cd kubeadm/
chinkleet@UbuntuServer-VirtualBox:~/kubeadm$ ls
certified-kubernetes-administrator-course
chinkleet@UbuntuServer-VirtualBox:~/kubeadm$ cd certified-kubernetes-administrator-course/
chinkleet@UbuntuServer-VirtualBox:~/kubeadm/certified-kubernetes-administrator-course$ ls
docs README.md ubuntu-bionic-18.04-cloudimg-console.log
images ubuntu Vagrantfile
chinkleet@UbuntuServer-VirtualBox:~/kubeadm/certified-kubernetes-administrator-course$ vagrant status
Current machine states:
kubemaster not created (virtualbox)
kubenode01 not created (virtualbox)
kubenode02 not created (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run vagrant status NAME
.
chinkleet@UbuntuServer-VirtualBox:~/kubeadm/certified-kubernetes-administrator-course$ vagrant up
Bringing machine ‘kubemaster’ up with ‘virtualbox’ provider…
Bringing machine ‘kubenode01’ up with ‘virtualbox’ provider…
Bringing machine ‘kubenode02’ up with ‘virtualbox’ provider…
==> kubemaster: Importing base box ‘ubuntu/bionic64’…
==> kubemaster: Matching MAC address for NAT networking…
==> kubemaster: Setting the name of the VM: kubemaster
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 2711 is already in use
on the host machine.
To fix this, modify your current project’s Vagrantfile to use another
port. Example, where ‘1234’ would be replaced by a unique host port:
** config.vm.network :forwarded_port, guest: 22, host: 1234**
Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn’t allow modifying port forwarding. You could
try ‘vagrant reload’ (equivalent of running a halt followed by an up)
so vagrant can attempt to auto-correct this upon booting. Be warned
that any unsaved work might be lost.
chinkleet@UbuntuServer-VirtualBox:~/kubeadm/certified-kubernetes-administrator-course$ vagrant reload
==> kubemaster: Clearing any previously set network interfaces…
==> kubemaster: Preparing network interfaces based on configuration…
** kubemaster: Adapter 1: nat**
** kubemaster: Adapter 2: hostonly**
==> kubemaster: Forwarding ports…
** kubemaster: 22 (guest) => 2711 (host) (adapter 1)**
** kubemaster: 22 (guest) => 2222 (host) (adapter 1)**
==> kubemaster: Running ‘pre-boot’ VM customizations…
==> kubemaster: Booting VM…
==> kubemaster: Waiting for machine to boot. This may take a few minutes…
** kubemaster: SSH address: 127.0.0.1:2222**
** kubemaster: SSH username: vagrant**
** kubemaster: SSH auth method: private key**
** kubemaster: Warning: Connection reset. Retrying…**
** kubemaster: Warning: Remote connection disconnect. Retrying…**
** kubemaster: Warning: Connection reset. Retrying…**
** kubemaster: Warning: Remote connection disconnect. Retrying…**
** kubemaster: Warning: Connection reset. Retrying…**
** kubemaster: Warning: Remote connection disconnect. Retrying…**
** kubemaster: Warning: Connection reset. Retrying…**
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured (“config.vm.boot_timeout” value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout (“config.vm.boot_timeout”) value.
I have gone through all the steps as discussed in the lecture, didn’t change anything in the Vagrant configuration file however still stuck with the error.
Any help will be appreciated.
Regards,
Chinkleet