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 more

Q1. 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 more

Write 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 more

List 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 more