@walidshaari
walid.shaari@gmail.com
https://www.linkedin.com/in/walidshaari/
Containers
DOCKER HISTORY
▪ Started as internal project @ dotcloud
▪ Open Sourced in 2013
▪ Developed in the open
▪ Quiz: Pay Attention to commands
Solomon Hykes run
http://www.taos.com/from-dotcloud-to-docker/
Docker exercise I
Run your first container using two container runtimes http://bit.ly/pydata01
- docker
- podman
Objective
- Learn and Be Curious
- Core containers operations from Solomon Hykes lighting talk
- run - images
- history - search ??
https://www.docker.com/blog/introducing-the-docker-index/
Why use containers?
Docker exercise II
Build your first container http://bit.ly/pydata02
Objective
- How to containerize if you can not find what you want available?
- Prototyping a coding project
- Customizing
- What else?
1- git clone https://github.com/jakewright/tutorials
6- cd product
7- docker build -t product-service .
8- docker run -p 5001:80 --rm -d product-service
9- docker ps
10- curl localhost:5001
11- docker images
build, tag, push, pull,
build, tag, ....
Cache .. tag:latest
Push… Pull
• Standardized packaging for
software and dependencies
• Isolate apps from each other
• Share the same OS kernel
• Works for all major Linux
distributions
• Containers are mostly Linux,
however there is native Windows
containers too.
Recap: What are Docker
containers?
Containers are an app
level construct
VMs are an infrastructure level
construct to turn one machine
into many servers
Comparing VMs and Containers
Infrastructure
Libs
App A App B
App C App D
Traditional Bare
Metal servers
Containers and VMs together
Containers and VMs together provide a tremendous amount of
flexibility for IT to optimally deploy and manage apps.
Thank the giants
What are containers?
Containers are processes
born from tarballs
anchored to namespaces
controlled by cgroups
Alice Goldfuss - The Container Operator’s Manual
Docker Compose
https://azure.microsoft.com/en-us/resources/kubernetes-learning-path/
Project
Overview
What Does “Kubernetes” Mean?
Greek for “pilot” or
“Helmsman of a ship”
Image Source
What is Kubernetes?
● Project that was spun out of Google as an open source
container orchestration platform.
● Built from the lessons learned in the experiences of
developing and running Google’s Borg and Omega.
● Designed from the ground-up as a loosely coupled
collection of components centered around deploying,
maintaining and scaling workloads.
25
What Does Kubernetes do?
● Known as the linux kernel of distributed systems.
● Abstracts away the underlying hardware of the
nodes and provides a uniform interface for workloads to
be both deployed and consume the shared pool of
resources.
● Works as an engine for resolving state by converging
actual and the desired state of the system.
Decouples Infrastructure and Scaling
● All services within Kubernetes are natively
Load Balanced.
● Can scale up and down dynamically.
● Used both to enable self-healing and
seamless upgrading or rollback of
applications.
Self Healing
Kubernetes will ALWAYS try and steer the cluster to its
desired state.
● Me: “I want 3 healthy instances of redis to always be
running.”
● Kubernetes: “Okay, I’ll ensure there are always 3
instances up and running.”
● Kubernetes: “Oh look, one has died. I’m going to
attempt to spin up a new one.”
What can Kubernetes REALLY do?
● Autoscale Workloads
● Blue/Green Deployments
● Fire off jobs and scheduled cronjobs
● Manage Stateless and Stateful Applications
● Provide native methods of service discovery
● Easily integrate and support 3rd party apps
Most Importantly...
Use the SAME API
across bare metal and
EVERY cloud provider!!!
Who “Manages” Kubernetes?
The CNCF is a child entity of the Linux Foundation and
operates as a vendor neutral governance group.
Project Stats
● Over 55,000 stars on Github
● 2000+ Contributors to K8s Core
● Most discussed Repository by a large
margin
● 70,000+ users in Slack Team
07/2019
Project Stats
A Couple
Key Concepts...
Pods
● Atomic unit or smallest
“unit of work”of Kubernetes.
● Pods are one or MORE
containers that share
volumes, a network
namespace, and are a part
of a single context.
Pods
They are
also
Ephemeral!
Services
● Unified method of accessing
the exposed workloads of Pods.
● Durable resource
○ static cluster IP
○ static namespaced
DNS name
Services
● Unified method of accessing
the exposed workloads of Pods.
● Durable resource
○ static cluster IP
○ static namespaced
DNS name
NOT Ephemeral!
Architecture
Overview
Kubernetes’ High-Level Architecture Overview
Source: https://www.weave.works/blog/what-does-production-ready-really-mean-for-a-kubernetes-cluster
Kubernetes’ High-Level Architecture Overview
Portability through Abstraction
Application dependency on Kubernetes primitives
Source: Kubernetes effect by Bilgin Ibryam
Kubernetes Architecture 101
Source: https://www.aquasec.com/wiki/display/containers/Kubernetes+Architecture+101
Create a two worker
node kind k8s cluster
kind create cluster --name pydate --config .kind.yaml
Deployment, ReplicaSet,
Pod, and Service
kind create cluster --name pydate --config .kind.yaml
http://bit.ly/pydata-wildwest
https://training.play-with-kubernetes.com/
Application dependency on Kubernetes primitives
Source: Kubernetes effect by Bilgin Ibryam
50
Thank you

Pydata 2020 containers meetup