Define Kubernetes ReplicaSets with Examples and commands

ReplicaSets Definition – It is a Kubernetes object that maintains the number of pods (i.e. replicas of a given pod) and checks if the current number of pods are matching the desired number specified for the figure given in replicasets. Advantage – 1.Its powerful – since at any point of time you can manage the scale of your app by this single configuration in the YAML. 2. Also – even if a pod gets killed/terminated – the ReplicaSet will always

Read more

How Kubernetes works? Explain each components with Short Summary

Kubernetes Essential Components Kubernetes initially developed by Google and now an Open source project in CNCF. It has following major components Kubernetes Master Kubernetes Worker aka Minion aka Node Workstation usage – Kubectl Kubernetes Master It is the control plane of the cluster – it receives request for the desired state of the cluster and also the current state from the workers’ agent and is responsible to schedule workloads aka containers accordingly. Normally kept as replica of 3 to manage

Read more

What is Kubernetes and its features ?

Demystifying Kubernetes Kubernetes (aka k8s) helps solves multi fold problems we can face while putting an application that’s required to scale while on production. It is mainly used as an orchestrator of containers in a cluster environment (i.e. multi-node environment for distributed applications). The following are the problems and the role it plays in solving :- Problems Kubernetes features Managing containers on different nodes Workload placement in multi-node clusterAim – Manage services/application or their replicas spread acrossdifferent nodes effectively –

Read more

10 Features of Docker-compose

1. Main feature – Put configuration of all App Layers in 1 place Specify logically as “Services” all the docker containers needed for different parts of your overall application.For ex: – WebApp, Business service, DB Layer and even the networking needed along with necessary information like ports. Also can specify which service depends on what. 2. Start your App services in 1 shot – Docker-compose up 3.Key ways to stop app in 1 shot – Docker-compose stop v/s Docker-compose down

Read more

Docker D2 – Assignment2 – What is tempfs in docker volume and how it use it?

What is tmpfs ? Assign memory from host’s RAM to the container which is normally outside of the write-able memory that the container gets when its created and run. This memory will eventually get removed once container lifecyle ends How to create tmpfs ? Command to mount on /app in container with permission of 1770 As we can see the filesystem for /app is created. Also notice this path /app doesn’t exist usually in a default ubuntu container

Read more

Docker D2 Assignment – CMD V/s Entrypoint

5 Differences CMD Entrypoint It can be replaced by commandin docker run Ex:-[root@ip-172-31-17-58 sample3]# docker run -it test-sample1 /bin/bashroot@373fb5615122:/# Although dockerfile had CMD /usr/sbin/apache2ctl -D FOREGROUND If attempted to be replaced via docker run commandit will instead be added as a run time argument to actual entry point commandEx:-[root@ip-172-31-17-58 sample3]# docker run test-sample3 /bin/bashHello /bin/bash where dockerfile had entrypoint as below ENTRYPOINT [“/bin/echo”, “Hello”] CMD will be included as a 2nd command to be executed alongwith Entrypoint For ex –

Read more

Docker Lab Day 2

What is docker update ? We can change the configurations of an already running container which is observed by the docker server for > 10 seconds in the following test which we are going to run using the restart policy. Then went inside the container using bash and killed it using process id 1 Although the container got terminated by itself still due to restart policy came back again One more thing to note is when we did a docker

Read more

Docker Lab-Day1

Difference between docker kill/stop For docker kill – process exits with a bad status code – 137 For docker stop – process exits with a good status code – 0 That validates what is specified in the documentation that for docker kill – process is terminated unexpectedly whereas for docker stop – process is terminated abruptly. Note for the containers above we had got the status codes post below commands Difference between docker pause/unpause We can apply pause on a

Read more

Docker Introduction

What is Docker ? Docker is a tool and a platform to simplify the way we create apps and deploy them. Its based on containerization and since its more light weight, cuts across platforms it is being used all across the industry. It allows :- To create docker images where we store our app content To publish the docker images – host our app content for consumption To run the app as docker container – run application as containers What

Read more