Create a namespace with your name and assigne one dummy resourcesquota to it and deploy a app of mysql in your namespace.

Create a namespace with your name and assigne one dummy resourcesquota to it and deploy a app of mysql in your namespace. created the name spacekubectl create ns ajins created a ode in that name spacekubectl create deployment ajidep –image=mysql -n ajins applied the resourseskubectl apply -f rs.yaml –namespace=ajins kubectl get resourcequota mem-cpu-demo –namespace=ajinsNAME AGE REQUEST LIMITmem-cpu-demo 22s requests.cpu: 0/1, requests.memory: 0/1Gi limits.cpu: 0/2, limits.memory: 0/2Gi

Read more

What is pod. Explain 15 points

A pod is a unit which can have one or more unit which can be runIt will have a unique IPIt will have config info for a containerThe pod initialize the containerThe will in running state when the container is started.The pod ceases to exist when the container is terminatedPod can not be restarted, we can start a similar podIt is like a logical host for the containerEvery pod has the status likePending : created but the container is not

Read more

Components of Kubernetes master and explain

API Server : The apis to communicate with outside world and between components. It provides api for all the operationsetcd : it is a data store used by Kubernetes to store the config data. All the communication to etcd is via api server Controller Manager: It runs in a loop to check teh state of each node Scheduler: this is the service which manages teh workload of nodes

Read more

Write a example dockerfile with 2 CMD, 2 ENTRYPOINT and 1 CMD/1ENTRYPOINT and write down a behaviour of it.

FROM ubuntuMAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>>ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get updateRUN apt-get updateRUN apt-get -y install tzdataRUN apt-get update && apt-get install git -y && apt-get install -yq apache2ENTRYPOINT [“/bin/echo”, “Hello” && “/bin/echo”, “Second entrypoint”] FROM ubuntuMAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>>ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get updateRUN apt-get -y install tzdataRUN apt-get update && apt-get install git -y && apt-get install -yq apache2CMD echo “Hello world” /usr/sbin/apache2ctl -D FOREGROUND

Read more

List out all INSTRUCTION statement of dockerfile and give one line explanation.

FROM – to specify the parent image. Eg ubuntu from which you create an imageMAINTAINER – to set the author/creater of the imageRUN – to run a command like shell script in linux or execute a programARG – should be used along with FROM to speficy any arguments lie versionEXPOSE – To inform the docker that the container listern on the given portCOPY – to copy files or dir to the container destination pathADD – to copy files or dir

Read more