Kubernetes


1. Design
=========

API -> Primitives (Building Blocks) for 
1. deploy 
2. maintain 
3. scale 
apps. 

1.1 Pod
=======

* Scheduling unit
* Pod = 1+ co-located containers. 
* Pod has unique IP within cluster. 
* Can be managed by Kubernetes API or controller. 

1.2 Labels & Selectors
======================

* Key-Value pair
* attached to pod and node
* grouping mechanism 

1.3 Controllers
===============

* Manage a set of podes as per "Labels and Selector"
* reconciliation loop drive cluster state from actual to desirable 
E.g 
1. Replication controller: to scale up and down
2. Daemonset controller to run 1 pod on 1 machine, 
3. Job controller 

1.4 Services
============

* set of pods works together, E.g. tier in multi-tier
* set defined by labels & selector.
* service discovery by Kubernetes

2. Architecture
===============

* Master-slave

2.1 C-plane
===========

2.1.1 etcd
==========

* key value data store
* configuration data of cluster
* represent overall state of cluster
* other componenets monitors changed at etcd

2.1.2 API server
================

* JSON over HTTP
* Validate REST request and update API objects's state at etcd
* so client can configure workloads, containers across the worker nodes

2.1.3 Schedular
===============

* plugable 
* match resource "supploy" to workload "demands"
* select nod to run pod
* inputs
- resource availability
- resource untilization
- resource requirement
- QoS
- afinity requirements
- anti-afinity requirements
- data locality 

2.1.4 contoller manager
=======================
* process to run (1) Daemonset controller (2) Replication controller 
* communicate with API server to create, update, delete (1) pod, (2) service end points (3) etc.

2.2 Kubernetes Node
===================

= Worker = Minion 
* run container runtime. e.g Docker and below componenets

2.2.1 Kubelet
=============

* hearbeat for health of node.

2.2.2 Kube-proxy
================

* n/w proxy + load balancer
* route to container based on IP + port

2.2.3 cAdvisor
==============

Agent to collect resource usage. 

Other alternatives

1. Docker Swarm
2. Apache Meos

0 comments:

Post a Comment