Introduction to Kubernetes
Hello Eeryone, Today I am here to give you a brief information about Kubernetes. Here I will tell you what is Kubernetes, how it works, how it was made, what was the thought behind it and some use cases of the companies that uses it. so guys lets start with it.
What is Kubernetes?
Why use Kubernetes?
Kubernetes is the de facto open source container orchestration tool for enterprises. It provides application deployment, scaling, container management, and other capabilities, and it enables enterprises to optimize hardware resource utilization and increase production uptime through fault-tolerant functionality at speed. The project was initially developed by Google, which donated the project to the Cloud-Native Computing Foundation. In 2018, it became the first CNCF project to graduate. This is all well and good, but it doesn't explain why development and operations should invest their valuable time and effort in Kubernetes. The reason Kubernetes is so useful is that it helps dev and ops quickly solve the problems they struggle with every day. Following are five ways Kubernetes' capabilities help dev and ops professionals address their most common problems.
1. Vendor-agnostic :- Many public cloud providers not only serve managed Kubernetes services but also lots of cloud products built on top of those services for on-premises application container orchestration. Being vendor-agnostic enables operators to design, build, and manage multi-cloud and hybrid cloud platforms easily and safely without risk of vendor lock-in. Kubernetes also eliminates the ops team's worries about a complex multi/hybrid cloud strategy.
2. Service discovery :- To develop microservices applications, Java developers must control service availability (in terms of whether the application is ready to serve a function) and ensure the service continues living, without any exceptions, in response to the client's requests. Kubernetes' service discovery feature means developers don't have to manage these things on their own anymore.
3. Invocation :- How would your DevOps initiative deploy polyglot, cloud-native apps over thousands of virtual machines? Ideally, dev and ops could trigger deployments for bug fixes, function enhancements, new features, and security patches. Kubernetes' deployment feature automates this daily work. More importantly, it enables advanced deployment strategies, such as blue-green and canary deployments.
4. Elasticity :- Autoscaling is the key capability needed to handle massive workloads in cloud environments. By building a container platform, you can increase system reliability for end users. Kubernetes Horizontal Pod Auto scaler (HPA) allows a cluster to increase or decrease the number of applications (or Pods) to deal with peak traffic or performance spikes, reducing concerns about unexpected system outages.
5. Resilience :- In a modern application architecture, failure-handling codes should be considered to control unexpected errors and recover from them quickly. But it takes a lot of time and effort for developers to simulate all the occasional errors. Kubernetes' Replica Set helps developers solve this problem by ensuring a specified number of Pods are kept alive continuously.
Conclusion :- Kubernetes enables enterprises to solve common dev and ops problems easily, quickly, and safely. It also provides other benefits, such as building a seamless multi/hybrid cloud strategy, saving infrastructure costs, and speeding time to market.
Features of Kubernetes?
2. Service Discovery & Load balancing :- With Kubernetes there is no need to worry about networking and communication because Kubernetes will automatically assign IP addresses to containers and a single DNS name for a set of containers, that can load-balance traffic inside the cluster.
3. Storage Orchestration :- With Kubernetes you can mount the storage system of your choice. You can either opt for local storage, or choose a public cloud provider such as GCP or AWS, or perhaps use a shared network storage system such as NFS, iSCSI, etc.
4. Self-Healing :- Kubernetes can automatically restart containers that fail during execution and kills those containers that don’t respond to user-defined health checks. But if nodes itself die, then it replaces and reschedules those failed containers on other available nodes.
5. Secret & Configuration Management :- Kubernetes can help you deploy and update secrets and application configuration without rebuilding your image and without exposing secrets in your stack configuration.
6. Batch Execution :- In addition to managing services, Kubernetes can also manage your batch and CI workloads, thus replacing containers that fail, if desired.
7. Horizontal Scaling :- Kubernetes needs only 1 command to scale up the containers, or to scale them down when using the CLI. Else, scaling can also be done via the Dashboard (kubernetes UI).
8. Automatic Rollbacks & Rollouts :- Kubernetes progressively rolls out changes and updates to your application or its configuration, by ensuring that not all instances are worked at the same instance. Even if something goes wrong, Kubernetes will rollback the change for you. These were some of the notable features of Kubernetes. Let me delve into the attractive aspects of Kubernetes with a real-life implementation of it and how it solved a major industry worry.
Architecture of Kubernetes?
Master Node of Kubernetes :- Master Node is a collection of components like Storage, Controller, Scheduler, API-server that makes up the control plan of the Kubernetes. When you interact with Kubernetes by using CLI you are communicating with the Kubernetes cluster’s master node. All the processes run on a single node in the cluster, and this node is also referred to as the master.
Master Node Components :-
1) Kube API-server performs all the administrative tasks on the master node. A user sends the rest commands as YAML/JSON format to the API server, then it processes and executes them. The Kube API-server is the front end of the Kubernetes control plane.
2) etcd is a distributed key-value store that is used to store the cluster state. Kubernetes stores the file in a database called the etcd. Besides storing the cluster state, etcd is also used to store the configuration details such as the subnets and the config maps.
3) Kube-scheduler is used to schedule the work to different worker nodes. It also manages the new requests coming from the API Server and assigns them to healthy nodes.
4) Kube Controller Manager task is to obtain the desired state from the API Server. If the desired state does not meet the current state of the object, then the corrective steps are taken by the control loop to bring the current state the same as the desired state.
There are different types of control manager in Kubernetes architecture:
- Node Manager, it manages the nodes. It creates new nodes if any node is unavailable or destroyed.
- Replication Controller, it manages if the desired number of containers is running in the replication group.
- Endpoints controller, it populates the endpoints object that is, joins Services & Pods.
Kubernetes Worker Node :- The worker nodes in a cluster are the machines or physical servers that run your applications. The Kubernetes master controls each node. there are multiple nodes connected to the master node. On the node, there are multiple pods running and there are multiple containers running in pods.
Worker Node Components :-
Industrial use cases of Kubernetes ?


This is it for today guys. keep learning keep enjoying and we'll meet next time with some other topic to enlighten you with another perpesctive.
Comments
Post a Comment