Leveraging Kubernetes for Automating FIWARE GEs Deployment
1. Leveraging Kubernetes for FIWARE GEs
Automation
28th Nov 2018
Atul Pandey (atul.pandey@india.nec.com )
NEC Technologies India Private Limited
https://www.linkedin.com/in/atul-pandey-a0173a3/
2. Agenda
q Kubernetes Basics :
q What is Docker ?
q What is Container Orchestration
q Need for Container Orchestration
q Container Orchestration Using Kubernetes
q Defining Kubernetes Again
q Basic Configuration of Kubernetes
q FIWARE GEs Cluster Deployment :
q Automation using Kubernetes API
q Kubernetes Dashboard Overview
q Example of Kubernetes Dashboard
q Kubernetes Monitoring via cAdvisor
q Example FIWARE Orion Service Creation
q Case Study - FIWARE GEs Automation Using Kubernetes
4. What is Docker
q Docker is an open-source project that automates the deployment
of applications inside software containers, by providing an
additional layer of abstraction and automation of operating
system–level virtualization on Linux.
q Provide a uniformed wrapper around a software package:
«Build, Ship and Run Any App, Anywhere»
Virtual Machine
Technology
Shift
Docker Container
5. Computer B
What is Container Based Orchestration
q Technology that makes software portable between computers and
implements rapid deployment
q Abstraction to control a set of containers
q Enumerates resources, network availability, placement
q Implements services by distributing processes across a cluster
Computer A Software
≒Container image
6. q Docker is convenient, but if there are multiple servers, will you
run docker on all servers?
docker run docker run docker run
docker run docker run
q What about clusters or NW settings?
Need for Container Orchestration
7. q Kubernetes is an Open Source Solution that implements
management, control for placing and executing containers on
multiple servers (nodes)
Ø User/operator does not need to be aware of which node the container is
running on.
Ø It provides various management functions such as scale-out/scale-in of
container, and rolling update of container image.
Container orchestration using Kubernetes k8s
#
Container
#
Container
#
Container
#
Container
8. q Developed based on the large container cluster management
technology called "Borg" developed for Google's internal system.
Ø It was published to public for the first time at GlueCon held in 2014, and after
that released as an OSS.
q Functions offered by Kubernetes:
Ø Grouping and managing related containers
Ø Concept of management, services by Pods
Ø Network / routing management between containers
Ø Container load balancing
Ø Management of storage assigned to containers
Ø Container monitoring
Defining Kubernetes again
#
) )
) ) )2
( )2 1 ) .
9. Overlay Network (Flannel/OpenVswitch)
Basic Configuration of Kubernetes(1/2)
q It is composed mainly of master and node
Ø Various controls are executed based on operation instructions via API.
Ø Masters and nodes can be configured with multiple units each considering their
availability
Operation instructions via API
Image
Repository
Worker Node
KubeProxy
C
1
C
2
C
3
Worker Node
KubeProxy
C
1
C
2
C
3
Master Node
API server
Scheduler
API
Physical Infrastructure
etcd
10. etcd
Schedules
Schedules Docker
Containers
Worker Node 2
Pods
Dynamic IP address
API
Replication
Controller
Service
Fixed, Virtual Fixed IPs
Master Node
Basic Configuration of Kubernetes(2/2)
q Each Component deployed as Pod
q Individually Update and scales Pod
q Use Services for Component Communication
q Networking:
Ø Each Pods get Virtual IPs
Ø Ports not shared with Other ports
Docker
Containers
Worker Node1
Pods
Dynamic IP address
12. Automation using Kubernetes API
q Deployment with minimum downtime
q Microservices and agile architecture help to scale/rollout easily
q Using Kubernetes REST API that give access to everything:
Ø /v1/namespaces/{name-spaces}/<api> ex. /v1/namespaces/{name-
spaces}/services
q First Implementation using Kubernetes for FIWARE Environment
Deployer
Node
Kubernetes
API
HA-Proxy
Service
CKAN Pod
Orion Pod
Mongo-db
Pod
1. Creates RC
Etcd
4. Switch Load balancer Backend
2. Creates
3. Health Check
ConfD
5. Watch
6. Generate Config
Deployment Flow
13. Kubernetes Dashboard Overview
q Kubernetes Dashboard - easy to use web UI providing the
following functionalities:
Ø Creation/Deletion of Applications
Ø Creation/Deletion Replication Controllers
Ø Specify advanced POD Options – privileged containers, CPU and
Memory constraints, Labels, Namespace etc
Ø Check Application State
Ø Allows uploading of YAML or JSON file for Deployment
15. Kubernetes Monitoring is via CAdvisor
Kubernetes
Cluster/
CAdvisor
Heapster
SinkSource
GrafanaInflux DB
q Kubernetes cAdvisor:
Ø Open source container resource usage and performance analysis agent
Ø Run on each Node.
Ø Auto-discovers all of the containers
Ø Collects CPU, memory, file system, and network usage statistics
Ø Provide Overall Node usages
17. Case Study – FIWARE GE Automation Using
Kubernetes in NLE*
Cloud Provisioning (Openstack)
Virtual Resource Provisioning(Virtual Machine)
Kubernetes Framework(Master,Worknodes.etcd)
FIWARE GE Orchestration
(Ex. Orion, STH, CKAN,Cygnus)
*NLE- NEC LAB EUROPE, Heidelberg Germany
**N=3 in NLE Case
Deployer Node
(OSS Automated
Deployment
Framework Tooling )
#Node1 #Node2 #Node…N**
End User Service Management Endpoints/Interfaces
Infra-as-a-ServiceApplicationOrchestration
IoT Application Instantiation(Containerized)