Wednesday, September 16, 2020

Steps to create an Ubuntu VM in Azure

1.    Create a free account on Azure by creating a profile using the below URL

Ø  https://azure.microsoft.com/en-in/free/

Ø  Click on “Start Free” as below

Ø  Create your profile using your mail-ID



Image 1

2.    On the Azure portal, create a new virtual machine

Image 2


3.    Create a new Virtual Machine as below


Image 3

4.    Click on “Select size” to open up Image 5

Image 4

Search for “D4ds_v4” as the image

                                                        >>       To get Premium SSD

 5.    Choose default configurations under “Create new disk”
























































Image 9

 

 

 

 

 

 

 

 

 

10. Choose default values and click “Next: Networking”


Image 10

 

 

 

11. Choose default values and click “Next: Networking”


Image 11

12. Default values and click “Next for Advanced and Tags”


 


 


 

13. Click on “Create” on the final screen


 

14. Click on “Generate new key pair” à Download private key and create resource


Image ‘a’

 

 

 

15. This downloads a “.pem file” with the name of the OS image


 

16. Open Putty Gen to Load and Save this .pem key as a private key (Do not click on “Generate”)


Image ‘b’

 

 

17. Select Load and choose “All Files” and select the .pem that was downloaded earlier.

 


Image ‘c’

 



18. Press “Save Private Key” and save the key on the desktop.


 

 

19. Get the Public IP from the Azure Console


 

 

 

 

 

 

 

 

 

 

20. Create a Putty session with the Public IP


 

 

 

 

 

 

 

 

21. Add the SSH à Auth Key as below


22. Use the login name was created in Azure Console


Software Installations

1.      Docker Installation

 

Ø  https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04

 

1)      sudo apt-get update

2)      sudo apt-get remove docker docker-engine docker.io

3)      sudo apt autoremove

4)      sudo apt install docker.io

5)      sudo apt-get update

6)      sudo apt-get remove docker docker-engine docker.io

7)      sudo apt install docker.io

8)      sudo systemctl start docker

9)      sudo systemctl enable docker

 

rajeshb@AzureUbuntu:~$ docker --version

Docker version 19.03.6, build 369ce74a3c

2.      Kubectl installation

 

Ø  https://kubernetes.io/docs/tasks/tools/install-kubectl/     

rajeshb@AzureUbuntu:~$ curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 41.0M  100 41.0M    0     0   245M      0 --:--:-- --:--:-- --:--:--  244M

rajeshb@AzureUbuntu:~$ chmod +x ./kubectl

rajeshb@AzureUbuntu:~$ sudo mv ./kubectl /usr/local/bin/kubectl

rajeshb@AzureUbuntu:~$ kubectl version --client

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:26:42Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

 

3.      MINIKUBE Installation

 

Ø  https://kubernetes.io/docs/tasks/tools/install-minikube/

 

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube

 

rajeshb@AzureUbuntu:~$ sudo mkdir -p /usr/local/bin/

rajeshb@AzureUbuntu:~$ sudo install minikube /usr/local/bin/

rajeshb@AzureUbuntu:~$ sudo minikube version

minikube version: v1.13.0

commit: 0c5e9de4ca6f9c55147ae7f90af97eff5befef5f-dirty

rajeshb@AzureUbuntu:~$ sudo minikube start --vm-driver none

rajeshb@AzureUbuntu:~$ sudo minikube start --vm-driver none

* minikube v1.13.0 on Ubuntu 18.04

* Using the none driver based on user configuration

X Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.19.0 requires conntrack to be installed in root's path

rajeshb@AzureUbuntu:~$ sudo apt-get install conntrack

rajeshb@AzureUbuntu:~$ sudo minikube start --vm-driver none


rajeshb@AzureUbuntu:~$ sudo chown -R $USER $HOME/.kube $HOME/.minikube

rajeshb@AzureUbuntu:~$ sudo minikube status


 

 

rajeshb@AzureUbuntu:~$ mkdir kubeflow

 

rajeshb@AzureUbuntu:~$ wget https://github.com/kubeflow/kfctl/releases/download/v1.0.2/kfctl_v1.0.2-0-ga476281_linux.tar.gz -O $PWD/kubeflow/kfctl_linux.tar.gz

 

wget https://raw.githubusercontent.com/kubeflow/manifests/v1.0-branch/kfdef/kfctl_k8s_istio.v1.0.2.yaml  -O $PWD/kubeflow/kfctl_k8s_istio.v1.0.2.yaml

rajeshb@AzureUbuntu:~$ cd kubeflow

rajeshb@AzureUbuntu:~$ ls -lrt


rajeshb@AzureUbuntu:~$ vim ~/.bashrc

---

export PATH=$PATH:~/kubeflow/

---

rajeshb@AzureUbuntu:~/kubeflow$ kfctl apply -V -f kfctl_k8s_istio.v1.0.2.yaml

 


 

 


 

rajeshb@AzureUbuntu:~/kubeflow$ sudo kubectl get pod -n kubeflow


 

Open the URL again with http://<Public_IP>:31380




No comments: