0% found this document useful (0 votes)
14 views6 pages

KUBERNETES

The document provides a tutorial on deploying a MERN app using Kubernetes, an orchestration tool for managing containerized applications. It discusses key concepts such as configurations, environment variables, secrets, config maps, deployments, and services, emphasizing the importance of managing these elements for efficient application deployment. Additionally, it highlights the advantages of using Docker containers to address compatibility issues and streamline the development environment setup.

Uploaded by

leonelgomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

KUBERNETES

The document provides a tutorial on deploying a MERN app using Kubernetes, an orchestration tool for managing containerized applications. It discusses key concepts such as configurations, environment variables, secrets, config maps, deployments, and services, emphasizing the importance of managing these elements for efficient application deployment. Additionally, it highlights the advantages of using Docker containers to address compatibility issues and streamline the development environment setup.

Uploaded by

leonelgomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

-------------------------------------KUBERNETES----------------------------------------

Tutorial deploy MERN app

Kubernetes is a orchestration tool. It simple way that you have containerized your app with
Docker. Now you have thousands of this dockers maybe you have Microservices or something just a
single app.
These containers can be broght up, broght down if somebody goes down we need to bring it up back
and there should be a mechanism to control it and that’s what kubernetes offer it.

Keyword
Kubernetes

CTL =command line interface(interact with kubernetes)

Minikube= very very resource consuming in case that you have to deploy serves on the cloud which is
not really ideal. It.’s not affordable for everyone.
It is like whole big kubernetes things happening inside that but given to us in a smaller form so that
we can work out with that.

Worker
node//pod

Control plane where we use KubeTL to communicate the node worker.

CONCEPTS:

CONFIG: Why this config is important. Because whenever we actually go ahead and talk about our app
we need to provide a URL to our application. Usually kept the database into internal network so
where apps lying internal network the database is there so the latency is low.

Another chanllenges is secrets. Secrets are also known as enviroment variables. Enviroment variable
is something
The minicube works it gives you an entire enviroment in which the control panels and the worker
nodes and as much as you want to spin you can have all of it.
It cannot just do it magically it needs some kind of a virtual machine or a containerization enviroment.

Configure
DataURL

Deployment is just we put that container and make it available.


Services allows us to actually take that deployment and make it available to world.
This service exposes all the port

ENVIROMENT VARIABLES

An enviroment variable is a variable whose value is set outside of the program, typically through
functionality built into the operating system or microservice. An enviroment variable is made up of a
name/value pair, and any number may be created and available for reference at point in time.

SECRETS
We are worried about the secrets the most. These are almost like Envirment variable.
We need writing them in the configuration file, can be written in yaml or json.

Tutorial, the secrets is associated with mongoDb.

Keep your secrets separate, so your app secret should be web.app.secret.yaml, mongodb.secret.yaml,
and so on.

CONFIG MAPS
The cofig map allows you to decouple enviroment

Example, Let’s just say right now you’re hosting you’re entire database within the kubernetes.
And one day you decide you want to keep it outside of the kubenentes or maybe someplace else.
At that point of time these configMaps makes your life so much easier.
NodePort: it is make available the outside world

DEPLOYMENTS

Deployments
A Deployment provides declarative updates for Pods and ReplicaSets.

You describe a desired state in a Deployment, and the Deployment Controller changes the actual state
to the desired state at a controlled rate.

Hithesh: you just tell me how many parts you need or how many worker nodes you need

--- break the yaml file.

SERVICE
An abstract way to expose an app running on a set of PODS as a network service.
With kubernetes you don’t need to modify your app to use an unfamiliar service discovery
mechanism.

Kubernetes the PODs keeps on dying and Kubernetes get them back now when the POD gets back up
it gets its own IP and every time finding that IP could be really challenging so for that the services
actually comes into the picture once you enable or stick a service to a POD.
Service discover the pods and all these things I don’t really care.
Kubernetes overview

CONTAINER + ORCHESTRATION

Why do we need docker/containers?

We had a lot of issues developing this app

The architecture of our app changed over time. We’ve had to upgrade to newer versions of these
components or change the database etc.Every time something changed we had to go through the
same process of checking compatibility between these various components and the underlying
infrastructure.

This compatibility matrix issue is usually referred to as the matrix from hell.
Next every time we had a new developer on board we found it really difficult to set up a new
enviroment. The new developer had to follow a large set of instructions and run hundreds of
commands to set up their enviroments.
We couldn’t guarantee that the app that we were building would run the same way in different
enviroments.
So we need something that could help us with the compatibiliy issue something that will allow us
modify or change these components without affecting the other components and even modify the
underlying system.
That’s why landed Docker , I was able to run each component in a separate container with its own
libraries and its own dependencies. All on the same VM and the OS but within separate enviroments.
We just had to build the docker configuration once and all our developers could now get started with
simple docker run command.
What are containes???
The containers are completely isolated enviroments as in they can have their own processes or
services, their own networking interfaces, their own mounts just like virtual machines except they’re
all shared the same operating kernel.

Images vs Container

Image is a package or a template just like VM template. It is used to create one or more containers.
Containers are running instances of images that are isolated and have their own enviroments and set
of processes.

You might also like