Author: rajukumar
What are the components of Kubernetes worker and explain each component’s function?
kubelet The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy. kube-proxy Kube-proxy is a network proxy that runs on each node in your cluster. kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster. container runtime like docker ctr
Read moreWhat are the components of Kubernetes master and explain each component’s function?
kube-api-server The API server is the front end for the kube master etcd – act as cluster data storage Scheduler assign tasks to the worker node controller manager manages the desire number of pods and notifies if something goes down
Read moreQ1. List out all INSTRUCTION statement of dockerfile and give one line explanation.
FROM – base OS we require to build our apps RUN – Run command in a container created from previous line/layer ARG – Set a variable for docker file ENV – 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 the destinationADD – Copy the folder in the destination USER – specify the user to run PID1 WORKDIR – to set workdir
Read moreWrite a example docker file with 2 CMD, 2 ENTRYPOINT
Test1: docker run 27d064e1c81aHEllo from second entrypoint /bin/sh -c echo “Hello world from second cmd” Test2: root@ip-172-31-28-155:/home/ubuntu/raju# docker run 27d064e1c81a echo testHEllo from second entrypoint echo test Explanation: Only the second cmd or entrypoint is being considered. Moreover if we try to replace cmd during run time then second entrypoint and run time cmd is considered.
Read moreWhat is Storage Driver and types of Storage Driver? Explained with Images.
Ideally, very little data is written to a container’s writable layer, and you use Docker volumes to write data. However, some workloads require you to be able to write to the container’s writable layer. This is where storage drivers come in.
Read moreWhat is the use of “docker update” commands? with example and image
Docker update command updates the container properties. In the below example I have update –memory-reservation
Read moreList of Top 5 docker images from hub.docker.com and create a running container of it and try to use it.
Image 1: Ran golang image and executed the image to get the go version. Image2:Ran python image and executed the container Image3:Ran openjdk image and executed the container for java version Image4:Searched for some fun image and got cat image (docker run –rm -it wernight/funbox nyancat) Image5: Create a container for alpine image and excuted to add curl into the container
Read moreQ2. What is the difference between docker stop and docker kill?
One can stop and kill a running container. Docker stop will only stop the container gracefully. Docker kill will immediately kills all the process. There is a difference in exit code..
Read moreWhat is the difference between docker pause and docker unpause?
Docker pause suspends all the process to container. Docker unpause will un-suspend all the process to container
Read moreQuestion 1: What is docker container with image?
– Inside a container all the necessary files/libraries/code to execute a program will be present. Running instance of image is called container Created a container started a container stopped a container
Read more