Define kubernetes ReplicaSets with Example and commands?

ReplicaSet: A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. There are many ways we can use replicasets such that always required number of pods running is guarangteed. While creating the deployment kubectl create deployment ramesh –image=scmgalaxy/nginx-devopsschoolv1 –replicas=3 -n=ramesh 2. While the deployment is running kubectl edit deploy ramesh -n=ramesh Replicas: 2 desired | 2

Read more

How kubernetes works? Explain each components with Short Summary

Kubernetes works with Kubernetes cluster and a control plane. Kubernetes cluster is a combination of nodes with atleast one Master node and a worked node. Control plane components: Api Server: Provides Api to connect to worker nodes Cluster store (etcd): Persistant storage of cluster state and it stores data in key and value pair in etcd db. Controller Manager: It is a controller of controllers. Kube schedular: It will just schedule the pods and assigns the work Node components: Kubelet

Read more

What is Kubernetes and its feature?

Kubernetes is an open source tool to manage containerized applications, it was initially developed by Google. Kubernetes solves the problem of managing containers to automatically scale-up/ scale-down when the nodes having the container fails, so it will deliver the required performance with the desired number of services are always running. Kubernetes also provides the load balancing technique in simple/ round-robin fashion though the same container is running in same node. Kubernetes guarantee the number of pods (containers/services) always running at

Read more

List out 10 Feature of Docker-compose

Multiple services can be defined and run together making it easier to run. Can make all the services up and down at a time. Can make even a single service up/down Multiple isolated environments on a single host Preserve volume data when containers are created Only recreate containers that have changed Variables and moving a composition between environments

Read more

Day-2 Assigment-2

5 Differences between CMD and ENTRYPOINT with example CMD Entrypoint the executable command will be replaced by the command 1. The executable command can’t be changedgiven while running the container We can’t pass the arguments for the CMD command 2. The commands passed while running the container will be appended to the RUN command Multiple times can be added in the dockerfile 3. same as CMDbut the last line will override the previous Choose CMD if you need to provide

Read more

Day-2 Assigment-1

What about if you 2 CMD? It will remove the intermediate container and take the latest changes. FROM ubuntu MAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>> ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get -y install tzdata RUN apt-get install git -y && apt-get install -yq apache2 CMD echo “Hello world” CMD echo “Hi” result: Hi Last CMD will be executed. What about if you 2 ENRTYPOINT? It will remove the intermediate container and take the latest changes. FROM ubuntu MAINTAINER Rajesh Kumar

Read more

Assigment-3

What is docker update and docker wait? Explain with example commands. Docker Update:Update the container configuration like cpu, memory, restart policy, etc. docker update –kernel-memory 512M rameshdocker update –restart=on-failure:3 rameshdocker update –cpus 2 rameshdocker update –restart=no ramesh Docker Wait: Block until one or more containers stop, then print their exit codes. docker wait ramesh127docker ps -a |grep ramesh7181391c7b98 ubuntu “bash” 50 minutes ago Exited (127) 30 seconds agodocker wait ramesh0docker stop rameshdocker wait ramesh137docker kill ramesh prints the exit codes

Read more

Assignment-2

What is diff between docker pause/unpause and stop/kill? Docker Pause will suspend all the process inside a container by sending SIGSTOP command, where as in Docker stop the main process will receive SIGTERM and after a grace period it receives SIGKILL. SIGSTOP is the pause signal. The only behavior is to pause the process; the signal cannot be caught or ignored. The shell uses pausing (and its counterpart, resuming via SIGCONT) to implement job control. SIGTERM is the termination signal.

Read more

Assignment-1

What is Docker? Docker provides a platform for running applications in a containerized approach, where in each container have a file system, pid map and own network. Docker directly interacts with kernel to create mount, pid map, network and a user for each application. Below are the docker components. Docker Engine Docker Engine is responsible for sending commands to kernel to create infrastructure for running an application Docker Image Docker Image contains executable code and instructions like a template. This

Read more