...

Cloud Computing - Kubernetes

Back to Course

Lesson Description


Lession - #1166 Kubernetes SETUP


Kubernetes

It is critical/important to set up the Virtual Datmasternter (vDC>
prior to setting up Kubernetes. This can be thought of as a cluster of machines where they can speak with one another through the organization. For active methodology, you can set up vDC on PROFITBRICKS on the off chance that you don't have a physical or cloud foundation set up.

When the IaaS arrangement/setup on any cloud is finished, you want to design the Master and the Node.

Note − The arrangement is displayed for Ubuntu machines. The equivalent can be set up on other Linux machines too.


prerequisites
Introducing Docker − Docker is expected on every one of the cases of Kubernetes. Following are the means to introduce the Docker.

Stage 1 − Log on to the machine with the root client account.

Stage 2 − Update the package data. Ensure that the adept package is working.

Stage 3 − Run the following commands.

$ sudo apt-get update
$ sudo apt-get install apt-transport-https ca-certificates


Stage 4 − Add the new GPG key.


$ sudo apt-key adv \
   --keyserver hkp://ha.pool.sks-keyservers.net:80 \
   --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee
/etc/apt/sources.list.d/docker.list


Stage 5 − Update the API package picture.

$ sudo apt-get update


When all the above assignments are finished, you can begin with the real establishment of the Docker motor. Notwithstanding, before this you really want to check that the portion adaptation you are utilizing is right.


Installing Docker Engine
Run the following commands to install the Docker engine.

Step 1 − Logon to the machine.

Step 2 − Update the package index.

$ sudo apt-get update Step 3 − Install the Docker Engine using the following command.

$ sudo apt-get install docker-engine


Step 4 − Start the Docker daemon.

$ sudo apt-get install docker-engine


Step 5 − To very if the Docker is installed, use the following command.

$ sudo docker run hello-world


Introduce etcd 2.0
This should be introduced on Kubernetes Master Machine. To introduce it, run the following commands.


$ curl -L https://github.com/coreos/etcd/releases/download/v2.0.0/etcd
-v2.0.0-linux-amd64.tar.gz -o etcd-v2.0.0-linux-amd64.tar.gz ->1
$ tar xzvf etcd-v2.0.0-linux-amd64.tar.gz ------>2
$ cd etcd-v2.0.0-linux-amd64 ------------>3
$ mkdir /opt/bin ------------->4
$ cp etcd* /opt/bin ----------->5


In the above set of command −

  • In the first plmaster, we download the etcd. Save this with determined name.
  • Then, we need to un-tar the tar package.
  • We make a dir. inside the/select named container.
  • Duplicate the extricated record to the objective area.
  • Presently we are prepared to construct Kubernetes. We really want to introduce Kubernetes on every one of the machines on the group.


  • 
    $ git clone https://github.com/GoogleCloudPlatform/kubernetes.git
    $ cd kubernetes
    $ make release
    


    The above command will make a _output dir in the base of the kubernetes envelope. Then, we can remove the catalog into any of our preferred registry/select/container, and so forth.

    Then, comes the systems administration part wherein we want to really begin with the arrangement of Kubernetes expert and hub. To do this, we will make a section in the host record which should be possible on the hub machine.
    
    $ echo " kube-master
    < IP address of Node Machine>" >> /etc/hosts
    
    thyen you wul get output

    Are Docker and Kubernetes the same? The difference between the two is that Docker is about packaging containerized applications on a single node and Kubernetes is meant to run them across a cluster.

    Okteto Realistic development environments. Your development container reuses the same variables, secrets, sidecars, volumes, etc as your original deployment.