# Cloud

@youtube [\[ How to Deploy Kubernetes Cluster from Scratch \]](https://www.youtube.com/watch?v=t4H6hdvB9iQ)

@page [\[ Vagrant Housekeeping \]](https://codereviewvideos.com/course/vagrant-with-ansible-and-symfony2/video/vagrant-housekeeping)

![thx 2&#x20;
Supergiant ioSupergiant io
](https://4092223458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjY9ZUOIiOq3c33tSsV%2Fuploads%2FFN7B1ifrnXLUJz8Qs4kV%2Fimage.png?alt=media\&token=2981f88f-03ac-44ea-9edf-4b6bc9565bfa)

try this in virtal env:

<br>

```
sudo sudo apt-get install virtualbox
apt install virtualbox-ext-pack
sudo apt install vagrant
```

with vagrant we can now set up the ubuntu env

lets make a directory:

```
mkdir superUk8s
cd superUk8s
vagrant init ubuntu/xenial64
vagrant up --provider virtualbox
# now we are ready to login
vagrant ssh
sudo -i # we dont wanna write "sudo" each time here
```

```
#LEts update the new ubuntu 
apt update && apt upgrade

```

The first step we have to do now is to install Docker

```
apt install docker.io -y
```

![the acutal state](https://4092223458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjY9ZUOIiOq3c33tSsV%2Fuploads%2FtVfWLNOFCupdVNeEurgl%2Fimage.png?alt=media\&token=f4989f8a-880e-4507-8715-ab631d18a1d1)

```
#Lets get now the kubernetes server file
wget https://dl.k8s.io/v1.20.0/kubernetes-server-linux-amd64.tar.gz
#unpack it 
tar -xzf kubernetes-server-linux-amd64.tar.gz
#Go to the bin folder
cd kubernetes/server/bin
#Move the bins to the main bin directory to have straight access to them
mv kubectl kubelet kube-apiserver kube-controller-manager kube-scheduler kube-proxy /usr/bin/
#Remove the not needed tar file
cd 
rm -rf kubernetes-server-linux-amd64.tar.gz
#and try 
kubectl
#now we make a new directory for the manifest
mkdir -p /etc/kubernetes/manifest
#and make kublet avaible for the system
```

![kubelet](https://4092223458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjY9ZUOIiOq3c33tSsV%2Fuploads%2FFjDGUXtQNvPhkIbIoohz%2Fimage.png?alt=media\&token=a6979140-cffe-4c29-84f2-c59afeb16ecf)

Now it is creating ->

![](https://4092223458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjY9ZUOIiOq3c33tSsV%2Fuploads%2Fj9U5WyYaiDCmtMIGELjq%2Fimage.png?alt=media\&token=ec5f4272-1072-419f-a8c4-e4c738d7a6b9)
