Skip to content

Commit 2ddcef7

Browse files
author
Kunal Kapoor
committed
Added images to readme
1 parent c272377 commit 2ddcef7

11 files changed

+35
-15
lines changed

README.md

+35-15
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,77 @@
11
# Kubernetes
22

3-
Kubernetes is an open source system for automating the deployment, scaling and management of applications running on containers. Kubernetes is an open source container and cluster manager that was designed by Google and donated to the **Cloud Native Computing Foundation.** It usually works with Docker Containers and manages the traffic in between the cluster of hosts that are running the Docker containers.
3+
Kubernetes is an open source system for automating the deployment, scaling and management of applications running on containers. Kubernetes is an open source container and cluster manager that was designed by Google and donated to the **Cloud Native Computing Foundation.** It usually works with Docker Containers and manages the traffic in between the cluster of hosts that are running the Docker containers.
44

5-
### History
5+
![kubernetes](https://github.com/debalin/devops-kubernetes/blob/master/res/kubernetes.png "kubernetes")
6+
7+
## History
68
It was founded by **Joe Bada**, **Brendan Burns** and **Craig McLuckie** at Google in 2014.
79
The version v1.0 was launched on July 21, 2015. Later Google formed the **Cloud Native Computing Foundation (CNCF)** along with IBM, Docker and VMware through partnership with **Linux Foundation** and started offering Kubernetes as sees technology.
810

9-
### How Kubernetes Works
11+
## How Kubernetes Works
1012

11-
#### Kubernetes Clusters
13+
### Kubernetes Clusters
1214
Kubernetes Clusters are a collection of computers each running an application that are coordinated and synchronized as a single unit. Kubernetes can deploy these applications to a cluster without tying them on a particular machine.
1315
These makes the applications more flexible and available. A cluster contains the following:
1416
* **Master**: It co-ordinates the cluster and manages all the applications within it by performing operations such as scheduling applications, maintaining the desired state and rolling out new updates.
1517
* **Nodes**: It is a worker machine (that can be a virtual or a physical machine) on which the application runs. Every node runs a Kubelet which communicates the Kubernetes master.
1618

17-
#### Kubernetes Nodes
19+
![cluster](https://github.com/debalin/devops-kubernetes/blob/master/res/cluster.png "cluster")
20+
21+
### Kubernetes Nodes
1822
A node is a worker machine (that can be either virtual or physical) within the Kubernetes cluster. A cluster consists of many nodes on which the application instances are deployed to run. These nodes are managed by the master. Every node runs at least:
1923
* **Kubelet**: A process responsible for communication between the master and the nodes.
2024
* A container run time responsible for pulling the container image from registry, unpacking the container and running the application.
2125

22-
#### Kubernetes Pods
26+
![node](https://github.com/debalin/devops-kubernetes/blob/master/res/node.png "node")
27+
28+
### Kubernetes Pods
2329
A pod is an abstraction that represents a group of one or more application containers and their shared resources. It includes shared IP addresses and information as to how to run them. The containers in a pod are always co-located and co-scheduled and run in a shared context on the same node.
2430

2531
When we deploy an instance of an application, we create a pod which includes the application container inside it. This pod is tied to the node where it is scheduled and remains there until termination or deletion. A node can have multiple pods and the master automatically handles scheduling of pods across the nodes in a cluster.
2632

27-
#### Deploying a Kubernetes Application
33+
![pod](https://github.com/debalin/devops-kubernetes/blob/master/res/pod.png "pod")
34+
35+
### Deploying a Kubernetes Application
2836
A deployment is responsible for creating and updating instances of your application. The master creates pods to host the application instances and schedules these pods onto the nodes in a cluster.
2937

3038
The deployment controller continuously monitors those instances by sending regular pings to check node health and tracking resource usage of the pod. If the node hosting it goes down or is deleted, the instance is replaced by the deployment controller. This provides a self-healing mechanism and addresses machine failure and maintenance.
3139

32-
#### Kubernetes Services
40+
![deployment](https://github.com/debalin/devops-kubernetes/blob/master/res/deployment.png "deployment")
41+
42+
### Kubernetes Services
3343
A Kubernetes Service is an abstraction layer for a set of pods. It enables external traffic exposure, load balancing and service discovery. Services are categorized into the following types:
3444
* **ExternalName**: Maps the service to the contents of the `externalName` field by returning a `CNAME` record with its value. This does not set up any kind of proxy.
3545
* **ClusterIP**: This is the default type of service that is in use for pods. It ensures that the service is reachable only from within the cluster and is closed to external traffic.
3646
* **Node Port**: In addition to having an internal cluster IP, this exposes the service on a common port to each node in the cluster. This service can then be accessed using `<NodeIP>:<NodePort>` where `NodeIP` can be the IP of any node in the cluster and `NodePort` is the port that the service is exposed on (this is not the same as the internal cluster IP port).
3747
* **Load Balancer**: In addition to having an internal cluster IP and exposing a service on the NodePort, this asks the cloud provider to provide a load balancer that forwards to the service based on the `<NodeIP>:<NodePort>` for each node.
3848

39-
#### Scaling the Application
49+
![service](https://github.com/debalin/devops-kubernetes/blob/master/res/service.png "service")
50+
51+
### Scaling the Application
4052
Initially when we create a deployment, we create only one pod for a single application instance. When traffic increases we need to scale the deployment to spawn up multiple pods to service requests. Scaling is accomplished by changing the number of replicas in the deployment.
4153

4254
Scaling up a deployment will ensure that new Pods are created and scheduled to nodes with available resources. Scaling down will reduce the number of pods to the new desired state. Services have an integrated load balancer that will distribute the network traffic to all the pods of an exposed deployment. Once multiple instances are up and running, it is possible to do rolling updates without any downtime.
4355

4456
Kubernetes has a method to auto-scale an application based on the resource utilization. This is done using the **Horizontal Pod Autoscaler**. The HPA adjusts the number of pod replicas in the application controller based on the observed CPU utilization on each pod. It attempts to create enough pods to maintain an average CPU utilization specified by the user while within the boundaries of a minimum and maximum possible pod count specified by the user.
4557

46-
#### Performing a Rolling Update
58+
![scale](https://github.com/debalin/devops-kubernetes/blob/master/res/scale.png "scale")
59+
60+
### Performing a Rolling Update
4761
Rolling Updates allow deployments to occur with zero run time by incrementally updating pod instances with new ones. The new pods will be scheduled on nodes with available resources. Rolling updates allow the following actions:
4862
* Promote an application from one environment to another.
4963
* Rolling back to previous versions.
5064
* Continuous integration and continuous delivery with zero downtime.
5165

52-
### Minikube
66+
![update1](https://github.com/debalin/devops-kubernetes/blob/master/res/update1.png "update1")
67+
68+
![update2](https://github.com/debalin/devops-kubernetes/blob/master/res/update2.png "update2")
69+
70+
## Minikube
5371

5472
Kubernetes is intended for production-grade environments. It is difficult to actually get a Kubernetes cluster deployed locally for development and testing purposes. The easiest way to set this up is to use **minikube**. It is a lightweight Kubernetes implementation that can create a VM (inside VirtualBox) on your local machine and use that as a node in the cluster. Minikube can, however, create only single-node clusters and might be useful for initial small development purposes and is not intended to be used on the cloud.
5573

56-
### What problems does Kubernetes solve?
74+
## What problems does Kubernetes solve?
5775
* Easy deployment of containerized applications.
5876
* Scaling and auto-scaling of container replicas based on resource usage.
5977
* Ensuring that a request routes to the correct container like a proxy.
@@ -71,18 +89,20 @@ Kubenetes has the following features:
7189
* **Service Discovery and Load Balancing**: It can distribute the load across containers with their own IP addresses.
7290
* **Secret and Configuration Management**: Deploy and update secrets and application configuration without building the image.
7391

74-
### Limitations of Kubernetes
92+
## Limitations of Kubernetes
7593
* It has a steep learning curve.
7694
* Very limited options for local deployment and testing.
7795
* It requires different deployment and installation steps for different deployment platforms.
7896
* If you are using Kubernetes, you cannot use Docker CLI or Docker Compose to define new containers.
7997
* Migration of Docker workflows to Kubernetes would require a complete rework.
8098

81-
#### Kubernetes vs Docker Swarm
99+
### Kubernetes vs Docker Swarm
82100
Docker Swarm has similar functionalities as compared to Kubernetes but uses standard Docker API and CLI. This is advantageous when using existing Docker workflows. However, Docker Swarm is limited by existing Docker functionalities and we cannot leverage other types of containers using Docker Swarm.
83101

84102
Lately, docker has been getting lots of updates which brings up a question of whether the effort of learning the Kubernetes commands and API, and updating to Kubernetes is really advantageous considering how easy it is to use Docker Swarm with existing docker workflows. Docker has been trying to catch up to the features given by Kubernetes and is closing the gap.
85103

86-
### Link to Presentation Slides
104+
![swarm](https://github.com/debalin/devops-kubernetes/blob/master/res/swarm.png "swarm")
105+
106+
## Link to Presentation Slides
87107

88108
https://docs.google.com/presentation/d/1_GtjEXAfknv9VJW_Re8xrMPSM1NR33J4wgX1uNCm438/edit?usp=sharing

res/cluster.png

49.3 KB
Loading

res/deployment.png

29.9 KB
Loading

res/kubernetes.png

21.9 KB
Loading

res/node.png

29.4 KB
Loading

res/pod.png

22.7 KB
Loading

res/scale.png

12 KB
Loading

res/service.png

31.6 KB
Loading

res/swarm.png

346 KB
Loading

res/update1.png

32.9 KB
Loading

res/update2.png

30.9 KB
Loading

0 commit comments

Comments
 (0)