Day-3: 4.What is pod in Kubernetes. Explain in 15 Points with image as example

Pod is the basic unit of work It is application or service Pod is an atomic unit of scheduling in Node Kubernetes manages pod and not container Kubernetes job is to keep the pods running based on desired state State is the pod up and running Health is the application in the pod running Pod shares the same resource with all containers in it Pod shares the same IP to all containers in it Preferred approach is one container in

Read more

Day-3: 3.What are the component of Kubernetes worker node and explain each component’s functions

a) Kubelete Main Kubernetes agent Registers node with cluster (decide who is the master node) Watches api server Instantiates the pods ( not creating the pod) Reports back to master Expose endpoint on 10255 b) kube-proxy Manages the kubernetes networking Assigning pod IP address (indirectly) All containers in a pod share a single IP Load balances across all pods in service Can use different network plugins/drivers like calico (CNI plugins) c) Container Engine Container Management Pulling images start/stop the containers

Read more

Day-3: 2.What are the components of Kuberentes master and explain each component’s functions

a) kube-apiserver Server of Api’s Front end to the Master Node Any request from Inside or outside the kubernetes is received by API server Exposes the REST API Consumes JSON (via manifest file) b) Cluser store Persist storage for cluster state and config Uses etcd to manage c) Kube-Controller-Manager Manager/Controller of Controllers such as Node Controller, Endpoint controller, Namespace controller etc Watches the changes in API Server Helps maintain the desired state d) Kube-scheduler Watches apiserver for new pods Schedule

Read more

Day-3: 1. Write down 10 fearures of Kubernetes with image

Kubernetes manages 1 to many containers Load Balancing – Manages the load balance of multiple containers running with same port in one host Auto healing Keep desired state of containers Allow to view the data center as a computer by managing all containers hosted in multiple host Container orchestration Automated Rollbacks Auto Scaling – addressing scalability challenges Absorb changes quickly Workload placements Infrastructure abstraction

Read more

Day2: 1. List out number of storage/volume drivers supported by docker?

Docker supports several storage drivers, using a pluggable architecture. The storage driver controls how images and containers are stored and managed on your Docker host overlay2 is the preferred storage driver for all currently supported Linux distributions, and requires no extra configuration. The legacy overlay driver was used for kernels that did not support the “multiple-lowerdir” feature required for overlay2 All currently supported Linux distributions now provide support for this, and it is therefore deprecated. The aufs storage driver Was the preferred storage driver for Docker 18.06

Read more

Day2-1. List out all INSTRUCTION statement of docker and give one line explanation.

FROM – base image to start creating the new image RUN – Run command in a container created from previous line/layer ARG – Set a variable for docker file execution and reuse using $(varname) ENV – Meta layer to set environment for the container EXPOSE – Sepcify information port for the container and also can be used during port forwarding COPY – Copy the file in same location as Docker file to container locationADD – Copy the file in same

Read more

Day2:Create one image which have base as centos and with git -ntp – httpd

root@ip-172-31-28-155:/var/lib/docker/overlay2# docker run -itd –name anoop_centos_2 centos460aebb7de8bde42112d32e5e37df7617fb8e0588a9bdccf79f47d98357cede7 [root@ip-172-31-28-155:/var/lib/docker/overlay2# docker ps | grep anoop460aebb7de8b centos “/bin/bash” 4 seconds ago Up 3 seconds anoop_centos_2 root@ip-172-31-28-155:/var/lib/docker/overlay2# docker attach 460aebb7de8b [root@460aebb7de8b /]# yum update [root@460aebb7de8b /]# yum install git [root@460aebb7de8b /]# yum install epel-release [root@460aebb7de8b /]# yum install -y ntp –> failed [root@460aebb7de8b /]# yum install httpd [root@460aebb7de8b /]# read escape sequenceroot@ip-172-31-28-155:/var/lib/docker/overlay2# docker ps | grep anoop460aebb7de8b centos “/bin/bash” 12 minutes ago Up 12 minutes anoop_centos_2 root@ip-172-31-28-155:/var/lib/docker/overlay2# docker commit -a “anoop” -m “centos with

Read more

Day2: Create one image which have base as ubuntu and with git -ntp – apache2

root@ip-172-31-28-155:/var/lib/docker# docker run -itd –name anoop_ubuntu_base ubuntubcba3eb8cfb3d221c9f8f753a65c86ee5ea924d8c69438342d3e83d429d572a9root@ip-172-31-28-155:/var/lib/docker# docker ps | grep anoopbcba3eb8cfb3 ubuntu “bash” 5 seconds ago Up 4 seconds anoop_ubuntu_baseroot@ip-172-31-28-155:/var/lib/docker# docker attach bcba3eb8cfb3 root@bcba3eb8cfb3:/# apt-get update root@bcba3eb8cfb3:/# apt-get install git root@bcba3eb8cfb3:/# apt-get install httpd root@bcba3eb8cfb3:/# apt-get install mini-httpd root@bcba3eb8cfb3:/# which git/usr/bin/git root@bcba3eb8cfb3:/# mini_httpdbind: Address already in use root@bcba3eb8cfb3:/# apt-get install ntpReading package lists… Done root@ip-172-31-28-155:/var/lib/docker# docker ps | grep anoopbcba3eb8cfb3 ubuntu “bash” 6 minutes ago Up 6 minutes anoop_ubuntu_base root@ip-172-31-28-155:/var/lib/docker# docker commit -a “anoop” -m “ubuntu with git, ntp

Read more

Day-2: What is Docker Images and Explain in 10 bullet lines?

Docker image is a collection of file system (Root FS, USER FS and APP FS) One copy of Docker image get attached to each container created from the image We can create multiple containers from same image docker image made up of file system layered over each other i.e Layer-n(image n)….. –> Layer1(image 1) –> Layer 0 (image 0) Layer 0 in the docker image is base image and requires root file system Higher layers always win when there is

Read more

Day-1: Q1.Explain what is docker container with images?

Docker image: Docker image is a collection of file system (Root FS, User FS and App FS). Use “docker images” command to see the docker images Docker Container: Docker container is the runnable instance of docker image. Docker container contains 1 ROOT FS, 1 PID, 1 NET and 1 USER and attach ROOT FS, PID and NET to user. One copy of docker image get attached to each container Use “docker ps” command to see all docker containers with status

Read more