Demo: Preparing Kops install
First, we will setup a vagrant, and provision an Ubuntu Vm using vagrant and virtualbox.
Following are the steps to setup kops installation.
Step #1: Downlaod and install Virtualbox as per your platform – https://www.virtualbox.org/wiki/Downloads
Step #2: Download and install vagrant as per your platform – https://www.vagrantup.com/downloads.html
Note: Below steps are tested on MacOS.
Step #3: Create a directory named ubuntu-box, and goto that directory using below command.
$ mkdir $HOME/ubuntu-box
$ cd $HOME/ubuntu-box
Step #4: Run below commands to run Ubuntu Virtual machine. (On Vagrant website, you can find other boxes as well, if you want.)
vagrant init will create a Vagrantfile
$ vagrant init ubuntu/xenial64
vagrant up will use Virtualbox to setup this ubunut/xenial64 box for you.
This might take couple of minutes
$ vagrant up
➜ ubuntu-box vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'ubuntu/xenial64'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'ubuntu/xenial64' version '20191024.0.0' is up to date... ==> default: A newer version of the box 'ubuntu/xenial64' for provider 'virtualbox' is ==> default: available! You currently have version '20191024.0.0'. The latest is version ==> default: '20191108.0.0'. Run `vagrant box update` to update. ==> default: Setting the name of the VM: ubuntu-box_default_1573432329297_29440 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection reset. Retrying... default: Warning: Remote connection disconnect. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 5.1.38 default: VirtualBox Version: 5.2 ==> default: Mounting shared folders... default: /vagrant => /Users/sushiver/ubuntu-box
Now do vagrant ssh-config to login to the virtual machine.
$ vagrant ssh-config
➜ ubuntu-box vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile /Users/sushiver/ubuntu-box/.vagrant/machines/default/virtualbox/private_key IdentitiesOnly yes LogLevel FATAL
Important points for Windows Users:
Windows user should take a look at
IdentityFile in above output. They must use
private_key to connect to Virtual Machine using Putty tool.
Windows user will first convert private_key to public key using
puttygen, and then use
putty or WinSCP to connect to VM.
Windows user can also use vagrant
ssh, but for that they need to install
openssh-client on Windows machine.
Till now, you have setup Ubuntu virtual machine, and you are good to setup kops tool on it.
723 total views, 2 views today