About me ‘omerio’ ● Co-founder GDG Reading, UK. 2015 - 2016 ● Co organizer GDG Cloud Emirates, UAE. 2017 - Now ● Google Developer Expert (Cloud) ● Open Source contributor (ecarf.io, cloudex.io) Google ● 16+ years as Tech Consultant (UK, Middle East & South East Asia) ● PhD Computer Science, University of Reading (Cloud + Big Data) ● Blog at omerio.com, Tweets @omerio Reading, UK Dubai, UAE
Content ● What is Kubernetes? ● What is a container? ● Virtualization Overview ● Where can I run it? ● What can Kubernetes do and why use it? ● Kubernets Cluster Overview
What is Kubernetes? Greek for “Helmsman”; also the root of the words “governor” and “cybernetic” • An Open Source system that runs and manages containers • Inspired and informed by Google’s experiences and internal systems • Supports multiple cloud and bare-metal environments • Supports multiple container runtimes (Docker, Rocket) • 100% Open source, written in Go Manage applications, not machines
What is a container? ● Lightweight environment ● Static application environment ● No external dependencies ● Application isolation ● Reusable, runnable artifacts ● Loosely coupled ● Portable Run containers on bare metal already: https://www.youtube.com/watch?v=coFIEH3vXPw
Where can I run it? Laptop to high-availability multi-node cluster Hosted or self managed On-Premise or Cloud (GCP, AWS, Azure, Bluemix, ..) Bare Metal or Virtual Machines Most OSes (inc. RedHat Atomic, Fedora, CentOS) Or just a bunch of Raspberry PIs Many options, See Matrix for details Kubernetes Cluster Matrix: http://bit.ly/1MmhpMW
What can Kubernetes do and why use it? ● co-locating helper processes, ● mounting storage systems (volumes), ● application health checking, ● replicating application instances, ● horizontal auto-scaling, ● load balancing, ● rolling updates, ● and resource monitoring. ● manage applications, not machines, ● better resource utilisation and scheduling, ● better application performance monitoring (APM), ● consolidated logging and reporting, ● ease of deployment management, Source: Google
Cluster Overview ● Pods ● Containers ● Labels ● Replication Controllers* ● Services ● Nodes ● Kubernetes Master http://omerio.com/2015/12/18/learn-the-kubernetes-key-concepts-in-10-minutes/ A Deployment that configures a ReplicaSet is now the recommended way to set up replication
Pods ● Smallest deployable unit ● Scheduled to nodes ● Hosts containers and volumes ● Ephemeral ● Each has its own routable IP (no NAT) ● Containers in a pod ○ Tightly coupled ○ Share IP, port and IPC namespaces ○ Talk to each other through localhost http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html
Pods Questions ● How to persist data across container restarts? ● How to create multiple copies of a Pod? ● How can containers reference each other reliably?
Replication Controllers / ReplicaSet ● Keeps Pods running ● Ensures N copies of Pods are running ● Provides direct control of Pods ● Uses a Pod template ● Determines constituent Pods using Label Selector
Services ● An abstraction ● Logical grouping of Pods ● Determines constituent Pods using Label Selector ● Load balancing between constituent Pods ● Gets a stable virtual IP, port & DNS name