Install Kubernetes from Scratch [21] - Run End To End Tests

preview_player
Показать описание
All the instructions required to deploy this cluster is recorded in the github repository here.

In this demo, we look at provisioning the environment required for our cluster. And then how to set up access to these VMs. The instructions for these tasks are available at the Provisioning Compute Resources section in the github repo.

First download the gitrepo if not already done so. In this case we have done that already.

Here I have a console on the left and the Oracle VirtualBox on the right. That way we can monitor the deployment process.

Cd into the vagrant directory. Run the vagrant up command.

It downloads the required images and provisions them on VirtualBox. Assigns them Ips and installs the required software on them.

It deploys the first master, then the second master, then the load balancer, then the first worker and then the second worker. It is now done with all activities. All 5 VMs are provisioned and ready.

So how do we gain access to these VMs? An easy way is to run the vagrant ssh command and specify the name of the VM. In this case master-11. And it will take you right in. In the system information section you can see the IP address assigned to the VM.

If you prefer to use your own SSH tool, you can access these using the SSH private Key generated for these VMs. But where is these keys located?

In the directory where you ran the vagrant up command from, you will see that it created a .vagrant folder, under which you have a folder named machines and under which you have a folder for each of the VMs deployed. Under each VM, the file containing the private key is located under the virtualbox folder.

You may use these with the SSH Terminal tool of your choice. In my case I use a tool named MobaXterm. You don't have to use the same. Use any SSH tool of your choice. I like this because it has some nice features to organize sessions and split screens and transfer files. Whatever tool you use, just make sure you are able to easy save sessions to each node and that you can easily access these nodes when required.

In my case I create a folder for this lab. Named kubernetes-the-hard-way. Under that I create a session for each node. I specify the IP address which is 102.168.15.11 for master-1. The username is vagrant. And then I copy the path to the location of the private_key file. And then set the session name to master-1. Click Ok and it logs me in.



Similarly, create a session for each node. Duplicate this session and change the details for each one. We are now done with creating SSH sessions to all nodes. Using private_keys we can SSH to any of these nodes securely.

#InstallKubernetesfromScratch #RunEndToEndTests
Рекомендации по теме
Комментарии
Автор

Excellent series, all the extra checks and info on top of the original K8 the hard way really make the difference. Thanks

bobfunk
Автор

Thanks a lot for this series and all the others Kubernetes introduction videos, really useful!

bigghe
Автор

I have been trying to pay for your course via your website but its been giving me errors messages. Kindly assist

jamesidu