Skip to content

Commit c272377

Browse files
authored
Updated Readme
1 parent e2d7903 commit c272377

File tree

1 file changed

+61
-70
lines changed

1 file changed

+61
-70
lines changed

README.md

Lines changed: 61 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,75 @@
1-
# Kubernetes
1+
# Kubernetes
22

3-
### Slide
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-
https://docs.google.com/presentation/d/1_GtjEXAfknv9VJW_Re8xrMPSM1NR33J4wgX1uNCm438/edit?usp=sharing
5+
### History
6+
It was founded by **Joe Bada**, **Brendan Burns** and **Craig McLuckie** at Google in 2014.
7+
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.
68

7-
### Scratch
9+
### How Kubernetes Works
810

9-
https://docs.google.com/document/d/1GWdnvgtoqhpivx3t-jv1-OJBVFtdgcTqMylCCYfphgk/edit
11+
#### Kubernetes Clusters
12+
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.
13+
These makes the applications more flexible and available. A cluster contains the following:
14+
* **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.
15+
* **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.
1016

11-
### KUBERNETES
17+
#### Kubernetes Nodes
18+
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:
19+
* **Kubelet**: A process responsible for communication between the master and the nodes.
20+
* A container run time responsible for pulling the container image from registry, unpacking the container and running the application.
1221

13-
Kubernetes is an open source system for automating the deployment, scaling and management of applications running on containers.
14-
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.
22+
#### Kubernetes Pods
23+
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.
1524

16-
### History
17-
It was founded by **Joe Bada**, **Brendan Burns** and **Craig McLuckie** and was founded by Google in 2014.
18-
The version v1.0 was launched on July 21, 2015. Later Google released the **Cloud Native Computing Foundation (CNCF)** through partnership with **Linux Foundation** and started offering Kubernetes as sees technology.
25+
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.
1926

20-
### Kubernetes Advantages
21-
• Kubernetes has the following advantages: -
22-
• Kubernetes has high scalability and can scale without increasing the ops team.
23-
• Kubernetes has high flexibility as it allows you run a variety of applications irrespective of the complexity of the application.
24-
• Kubernetes provide a public cloud infrastructure and allows you to run your applications from anywhere.
27+
#### Deploying a Kubernetes Application
28+
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.
2529

26-
Kubenetes has the following features: -
27-
* **Automatic binpacking**: Places containers on their resource requirements while not sacrificing availability.
28-
* **Horizontal Scaling**: Allows you to scale your application automatically with a simple command.
29-
* **Automated Rollouts and Rollbacks**: It automatically roles out the changes to your application and rollsback the changes for you.
30-
* **Storage Orchestration**: Mounts the required storage system from your local storage or a public cloud provider such as GCP and AWS and a network storage system like NFS.
31-
* **Self Healing**: It can replace containers when they fail and replace and reschedule containers when the node dies and kill unresponsive containers.
32-
* **Service Discovery and Load Balancing**: It can distribute the load across containers with their own IP addresses.
33-
* **Secret and Configuration Management**: Deploy and update secrets and application configuration without building the image.
30+
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.
3431

35-
### Kubernetes Clusters
36-
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.
37-
These makes the applications more flexible and available. A cluster contains the following: - </br>
38-
**Master**: It co-ordinates the cluster and manages all the applications like scheduling applications, maintaining the desired state and rolling out new updates. </br>
39-
**Nodes**: It is a VM or a worker machine that acts as a worker machine on which the application runs. Every node runs a Kubelet which communicates the Kubernetes master. Every Node runs at least:-
40-
* **Kubelet**: A process responsible for communication between the master and the nodes.
41-
* A container run time responsible for pulling the container image from registry, unpacking the container and running the application.
32+
#### Kubernetes Services
33+
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:
34+
* **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.
35+
* **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.
36+
* **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).
37+
* **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.
38+
39+
#### Scaling the Application
40+
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.
41+
42+
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.
4243

43-
For Kubernetes development **minikube** can be used. It is a lightweight Kubernetes implementation that cam create a VM on your local machine and deploy a cluster containing one node in that.
44+
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.
4445

45-
### Deploying a Kubernetes Application
46-
It is responsible for creating and updating instances of your application. The master schedules the application instances onto the nodes in a cluster.
47-
The deployment controller continuously monitors those instances. If the Node hosting it goes down or deleted the instance is replaced by the Deployment controller. This provides a self-healing mechanism and addressed machine failure and maintenance.
46+
#### Performing a Rolling Update
47+
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:
48+
* Promote an application from one environment to another.
49+
* Rolling back to previous versions.
50+
* Continuous integration and continuous delivery with zero downtime.
4851

49-
### Kubernetes Pods
50-
Pod is an abstraction and it represents a group of one or more application containers and their shared resources. A Pod is a group of one or more application containers and 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. </br>
51-
When we create Deployment, we create Pods with containers inside them. Each Pod is tied to the Node where it is scheduled and remains there until termination or deletion. </br>
52-
A node can have multiple pods and the master automatically handles scheduling of pods across the Nodes in a cluster.
52+
### Minikube
5353

54-
### Kubernetes Services
55-
Kubernetes Service enables external traffic exposure, load balancing and service discovery. The abstraction exposes Pods to traffic originating from the cluster. This can be done in following ways: - </br>
56-
* **Load Balancer**: Provides a public IP address.
57-
* **Node Port**: Exposes the Service on the same port on each Node of the cluster using NAT. </br>
58-
Service provides load balancing of traffic across the Pods. Services are also responsible for service discovery within the cluster
59-
Services match a set of pods using Labels, a grouping which allows logical operation on Labels. Labels are key/value pairs that are attached to objects like Pods. They are used to organize related objects in a meaningful way based upon the Production environment, application version and type of service/server.
54+
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.
6055

61-
### Scaling the Application
62-
Scaling is accomplished by changing the number of replicas in the Deployment. 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.
56+
### What problems does Kubernetes solve?
57+
* Easy deployment of containerized applications.
58+
* Scaling and auto-scaling of container replicas based on resource usage.
59+
* Ensuring that a request routes to the correct container like a proxy.
60+
* Ensuring that a request routes to the appropriate node based on how busy the nodes are like a load balancer.
61+
* Perform self-healing by replacing container instances in nodes that fail or are deleted.
62+
* Seamlessly roll out new features with rolling updates.
63+
* Run the application on several cloud providers including GCE, GKE, AWS, Azure, Vagrant, vSphere and Rackspace.
6364

64-
### Performing a Rolling Update
65-
Rolling Updates allow Deployments to occur with zero Run time by incrementally updating Pods with new ones. The new Pods will be scheduled on Nodes with available resources. Rolling updates allow the following: -
66-
* Promote an application from one environment to another.
67-
* Rolling back to previous versions.
68-
* Continuous integration and Continuous delivery with zero downtime.
65+
Kubenetes has the following features:
66+
* **Automatic binpacking**: Places containers on their resource requirements while not sacrificing availability.
67+
* **Horizontal Scaling**: Allows you to scale your application automatically with a simple command.
68+
* **Automated Rollouts and Rollbacks**: It automatically roles out the changes to your application and rollsback the changes for you.
69+
* **Storage Orchestration**: Mounts the required storage system from your local storage or a public cloud provider such as GCP and AWS and a network storage system like NFS.
70+
* **Self Healing**: It can replace containers when they fail and replace and reschedule containers when the node dies and kill unresponsive containers.
71+
* **Service Discovery and Load Balancing**: It can distribute the load across containers with their own IP addresses.
72+
* **Secret and Configuration Management**: Deploy and update secrets and application configuration without building the image.
6973

7074
### Limitations of Kubernetes
7175
* It has a steep learning curve.
@@ -74,24 +78,11 @@ Rolling Updates allow Deployments to occur with zero Run time by incrementally u
7478
* If you are using Kubernetes, you cannot use Docker CLI or Docker Compose to define new containers.
7579
* Migration of Docker workflows to Kubernetes would require a complete rework.
7680

77-
### Kubernetes vs Docker Swarm
78-
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.
79-
80-
### The following criteria will be used in evaluating your talk (each worth 5 points):
81+
#### Kubernetes vs Docker Swarm
82+
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.
8183

82-
* summarize the main purpose of the tool?
83-
* relate the tool to previously presented articles?
84-
* present the tool in a clear, logical manner?
85-
* critique the tool and present possible limitations?
86-
* justify his or her own opinions about the tool?
87-
* personalize the topic, such as by bringing in their own experiences?
88-
* demonstrates how to use the tool with simple example?
89-
* conveys value of tool in demonstration?
90-
* facilitate a lively discussion of the tool?
91-
* acts as an expert about the tool, answering clarifying questions as they arise?
84+
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.
9285

93-
### A repo and report describing tool will be also be graded on the following criteria:
86+
### Link to Presentation Slides
9487

95-
* Provides a high level report about tool (10 points)
96-
* Provides setup instructions (sample code, configuration files, install scripts) 20 points
97-
* Provides a screencast or demo environment (e.g. virtual machine) using tool on a sample task (20 points).
88+
https://docs.google.com/presentation/d/1_GtjEXAfknv9VJW_Re8xrMPSM1NR33J4wgX1uNCm438/edit?usp=sharing

0 commit comments

Comments
 (0)