Kubernetes
We all have heard about kubernetes
But what is it , what does it provide ?
Basic information is
At its core, kubernetes provides a means to do Deployment
Scaling
Replication
It also gives you Monitoring of our application/s
Kubernetes gives these things, to manage the containers
Its a platform that you can build on and can extend it
So, kubernetes has a Master Node, which is called the Kubernetes Master
This master server is part of the Cluster
It knows of other servers , that you create , that you can then deploy containers to
Talking:
We talk to kubernetes , We tell it what kind of image we need it to create a container from and give it some critereon. It creates what is called as a deployment.
That would be our application in this case.
We can specify, i need a certain amount of CPU, i need a certain amount of RAM
Specified amount of file storage
All of these are held inside of our deployment
In kubernetes , we will keep track of that for you.
When we say keep track, its Not like Docker compose, where we specify things
A deployment is something, that keeps on going.
IT has a Deployment controller
In essence ,
If your application goes down, it will try to do everything it can to auto heal it
It will spin an another container up and recover itself.
Its because , the deployment is not something about the initial launching of the container
Its much bigger in kubernetes
Scaling:
---------
So, we see that we are getting more traffic than required. We may say like we are going to deploy one app per server.
Thats not the most efficient use of resources
We cant be cost effective if we are spinning up a server everytime we are scaling up our application, unless that server is exactly the right size for the Application.
The way scaling works in kubernetes is it will figure out where to put it for you
How many CPUs it needs , how much RAM it needs , it also can hold on to the scale.
We can say, i need to deploy 5 nginx instances, you put them in them in the best spot, given the hardware requirements.
That might bring us to another situation, how to connect to them ?
Kubernetes Services
Services let us manage all of these ,
Services let us connect to all of these servers.
###############################################################################
kubernetes
If you dont have 50 servers, you are not at scale
Lets encrypt ssl certificates automatically
Going through kubernetes in our weekly tutorials
Naive scaling
Good way to do it when you have a few application servers
Not able to spin applicaiton server everytime
Kubernetes will figure out for you
Scaling a deployment is like modifying a deployment
How many CPUs it needs
How much RAM it needs
IT also can hold on to the SCale
I need to deploy 5 different nginx nodes,
You put them in the best spot given these are the hard ware requirements
Kubernetes will then decide, where to place our deployment
This bring us to another situation , how am i going to connect to
my particular container
NOW another feature of kubernetes will come into play
NGINX is one of our services
We have multiple nodes that are running NGINX
We need to connect to them in smart fashion
Services let us manage these
They also put the LB in front and give public accessibility to a particular service
We can have multiple services and we can have multiple deployments
Service A or Nginx may be we need 2 containers for that
DB service needs only 1 container
These services might be on the same machine , or kubernetes might decide to
put them on different machines
IT depends on what the Scheduler thinks is the best usage of resources at that particular time
We can write/tweak our scheduler
So, where the containers run is based on the best usage of the resources at that time.
You can tweak that
Kubernetes will actually help us maintain our servers at scale
Automatic health checks, rolling restarts and deployments So, when we are deploying a new service, we are not cutting off access to anything that the service needs
Also, we have seen extensions to kubernetes that allow you to do things like
Lets encrypt the free ssl certificates automatically, so we dont have to do anything every 3 months
Building out some mock deployments and figuring out how to use each of these components
But what is it , what does it provide ?
Basic information is
At its core, kubernetes provides a means to do Deployment
Scaling
Replication
It also gives you Monitoring of our application/s
Kubernetes gives these things, to manage the containers
Its a platform that you can build on and can extend it
So, kubernetes has a Master Node, which is called the Kubernetes Master
This master server is part of the Cluster
It knows of other servers , that you create , that you can then deploy containers to
Talking:
We talk to kubernetes , We tell it what kind of image we need it to create a container from and give it some critereon. It creates what is called as a deployment.
That would be our application in this case.
We can specify, i need a certain amount of CPU, i need a certain amount of RAM
Specified amount of file storage
All of these are held inside of our deployment
In kubernetes , we will keep track of that for you.
When we say keep track, its Not like Docker compose, where we specify things
A deployment is something, that keeps on going.
IT has a Deployment controller
In essence ,
If your application goes down, it will try to do everything it can to auto heal it
It will spin an another container up and recover itself.
Its because , the deployment is not something about the initial launching of the container
Its much bigger in kubernetes
Scaling:
---------
So, we see that we are getting more traffic than required. We may say like we are going to deploy one app per server.
Thats not the most efficient use of resources
We cant be cost effective if we are spinning up a server everytime we are scaling up our application, unless that server is exactly the right size for the Application.
The way scaling works in kubernetes is it will figure out where to put it for you
How many CPUs it needs , how much RAM it needs , it also can hold on to the scale.
We can say, i need to deploy 5 nginx instances, you put them in them in the best spot, given the hardware requirements.
That might bring us to another situation, how to connect to them ?
Kubernetes Services
Services let us manage all of these ,
Services let us connect to all of these servers.
###############################################################################
kubernetes
If you dont have 50 servers, you are not at scale
Lets encrypt ssl certificates automatically
Going through kubernetes in our weekly tutorials
Naive scaling
Good way to do it when you have a few application servers
Not able to spin applicaiton server everytime
Kubernetes will figure out for you
Scaling a deployment is like modifying a deployment
How many CPUs it needs
How much RAM it needs
IT also can hold on to the SCale
I need to deploy 5 different nginx nodes,
You put them in the best spot given these are the hard ware requirements
Kubernetes will then decide, where to place our deployment
This bring us to another situation , how am i going to connect to
my particular container
NOW another feature of kubernetes will come into play
NGINX is one of our services
We have multiple nodes that are running NGINX
We need to connect to them in smart fashion
Services let us manage these
They also put the LB in front and give public accessibility to a particular service
We can have multiple services and we can have multiple deployments
Service A or Nginx may be we need 2 containers for that
DB service needs only 1 container
These services might be on the same machine , or kubernetes might decide to
put them on different machines
IT depends on what the Scheduler thinks is the best usage of resources at that particular time
We can write/tweak our scheduler
So, where the containers run is based on the best usage of the resources at that time.
You can tweak that
Kubernetes will actually help us maintain our servers at scale
Automatic health checks, rolling restarts and deployments So, when we are deploying a new service, we are not cutting off access to anything that the service needs
Also, we have seen extensions to kubernetes that allow you to do things like
Lets encrypt the free ssl certificates automatically, so we dont have to do anything every 3 months
Building out some mock deployments and figuring out how to use each of these components
Comments
Post a Comment