...

Cloud Computing - Kubernetes

Back to Course

Lesson Description


Lession - #1168 Kubernetes IMAGE


Kubernetes

Kubernetes (Docker>
pictures are the key building block of Containerized Infrastructure. At this point, we are just supporting Kubernetes to help Docker pictures. Every container in a case has its Docker picture running inside it.

Whenever we are configuring a unit, the picture property in the arrangement document has a similar sentence structure as the Docker command does. The design document has a field to characterize the picture name, which we are intending to pull from the library.

Following is the normal arrangement structure which will pull picture from Docker vault and send in to Kubernetes holder.


apiVersion: v1
kind: pod
metadata:
   name: Tesing_for_Image_pull -----------> 1
   spec:
      containers:
         - name: neo4j-server ------------------------> 2
         image: ----------> 3
         imagePullPolicy: Always ------------->4
         command: ["echo", "SUCCESS"] ------------------->

In the above code, we have characterized −
name:Tesing_for_Image_pull − This name is given to recognize and really take a look at what is the name of the holder that would get made in the wake of pulling the pictures from Docker library. name: neo4j-server − This is the name given to the container that we are attempting to make. Like we have given neo4j-server.
picture: This is the name of the picture which we are attempting to pull from the Docker or interior library of pictures. We really want to characterize a total library way alongside the picture name that we are attempting to pull.
imagePullPolicy − Always - This picture pull strategy characterizes that at whatever point we run this document to make the holder, it will pull a similar name in the future.
command: ["echo", "SUCCESS"] − With this, when we make the container and on the off chance that everything goes fine, it will show a message when we will get to the holder.
To pull the picture and make a holder, we will run the following command.

$ kubectl create –f Tesing_for_Image_pull


Once we fetch the log, we will get the output as successful.

$ kubectl log Tesing_for_Image_pull


The above command will create a result of achievement or we will get a result as disappointment.

Note − It is suggested that you attempt every one of the commands yourself. -