We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Overview
- Containers vs VMs
- Docker
- What is Kubernetes
- Use Cases
About Me
- Stephen M. Reaves
- BSCS from the real USC in 2018
- Last year of OMSCS from GT
- Distributed Computing
- HPC
- 6+ years as a software developer
- 3 years spent at Red Hat working
- OpenShift/Kubernetes and container tooling
- Distributed Computing
- HPC
- OpenShift/Kubernetes and container tooling
Overview
- Containers vs VMs
- Docker
- What is Kubernetes
- Use Cases
Overview
- Containers vs VMs
Docker Podman
- What is Kubernetes
- Use Cases
How do we ship software?
How do we ship software?
- Install directly on hardware
How do we ship software?
- Install directly on hardware
- Pros
- Simple
- Pros
- Simple
How do we ship software?
- Install directly on hardware
- Pros
- Simple
- Cons
- Collisions
- Pros
- Simple
- Cons
- Collisions
How do we ship software?
Install directly on hardware
- Virtual Machines
How do we ship software?
Install directly on hardware
- Virtual Machines
"an efficient, isolated duplicate of a real computer machine."
Popek and Goldberg, 1974, "Formal Requirements for Virtualizable Third Generation Architectures"
Popek and Goldberg, 1974, "Formal Requirements for Virtualizable Third Generation Architectures"
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Pros
- Isolation
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Cons
- Overhead
- Pros
- Isolation
- Cons
- Overhead
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Cons
- Overhead
- Redudancy
- Pros
- Isolation
- Cons
- Overhead
- Redudancy
- Overhead
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Cons
- Overhead
- Complex
- Pros
- Isolation
- Cons
- Overhead
- Complex
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Cons
- Overhead
- Complex
- paravirtualization vs full virtualization
- KVM vs Xen vs Hyper-V vs VMWare
- Pros
- Isolation
- Cons
- Overhead
- Complex
- paravirtualization vs full virtualization
- KVM vs Xen vs Hyper-V vs VMWare
How do we ship software?
Install directly on hardware
- Virtual Machines
- Pros
- Isolation
- Cons
- Overhead
- Complex
- Still bound by hardware
- Pros
- Isolation
- Cons
- Overhead
- Complex
- Still bound by hardware
How do we ship software?
Install directly on hardware
Virtual Machines
- Containers
How do we ship software?
Install directly on hardware
Virtual Machines
- Containers
- LXC/LXD
- Chroot
- SystemD-nspawn
- Jails
- Docker
- LXC/LXD
- Chroot
- SystemD-nspawn
- Jails
- Docker
How do we ship software?
Install directly on hardware
Virtual Machines
- Containers
- LXC/LXD
- Chroot
- SystemD-nspawn
- Jails
- Docker
- LXC/LXD
- Chroot
- SystemD-nspawn
- Jails
- Docker
How do we ship software?
Install directly on hardware
Virtual Machines
- Containers
- OCI
- Docker
- Podman
- Kubernetes
- OCI
- Docker
- Podman
- Kubernetes
OCI
The Open Container Initiative (OCI) is a Linux Foundation project, started in June 2015 by Docker, CoreOS, and the maintainers of appc (short for "App Container") to design open standards for operating system-level virtualization (containers)
Wikipedia
Wikipedia
What is a Container?
What is a Container?
What is a Container?
- Dockerfile
- Docker image
- Docker container
FROM alpine:latest
RUN apk add --no-cache python2
CMD ["python2"]
FROM alpine:latest
RUN apk add --no-cache python2
CMD ["python2"]
What is a Container?
How do we ship software?
Install directly on hardware
Virtual Machines
- Docker
How do we ship software?
Install directly on hardware
Virtual Machines
- Docker
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
How do we ship software?
Install directly on hardware
Virtual Machines
- Docker
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- Cons
- Single host
- Manual scaling/orchestration
- Root daemon
- Combination of containers still requires extra tools (docker-compose)
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- Cons
- Single host
- Manual scaling/orchestration
- Root daemon
- Combination of containers still requires extra tools (docker-compose)
What is Podman?
Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
Podman
Podman
What is Podman?
Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
Podman
Podman
Drop in replacement for Docker
What is Podman?
Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
Podman
Podman
Drop in replacement for Docker
Superset of Docker that includes pods
What is a Pod?
Pods are groups of containers that run together and share the same resources, similar to Kubernetes pods.
Red Hat
Red Hat
What is a Pod?
What is a Pod?
How do we ship software?
Install directly on hardware
Virtual Machines
Docker Podman
How do we ship software?
Install directly on hardware
Virtual Machines
Docker Podman
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- No Root daemon
- Combination of containers out of the box
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- No Root daemon
- Combination of containers out of the box
How do we ship software?
Install directly on hardware
Virtual Machines
Docker Podman
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- No Root daemon
- Combination of containers out of the box
- Cons
- Single host
- Manual scaling/orchestration
- Pros
- Simple
- Interchangeable
- Isolation
- Fast
- Declarative building
- No Root daemon
- Combination of containers out of the box
- Cons
- Single host
- Manual scaling/orchestration
How do we ship software?
Install directly on hardware
Virtual Machines
Docker Podman
- Kubernetes
What is Kubernetes?
Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both `declarative configuration` and `automation`.
Kubernetes
Kubernetes
Before
After
Kubernetes Features
- Declarative configuration
Kubernetes Features
- Declarative configuration
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Kubernetes Features
- Declarative configuration
- GitOps
- GitOps
Kubernetes Features
- Declarative configuration
- GitOps
podman kube play -f nginx.yaml
podman kube gen -f nginx.yaml
- Can also be started via systemd
- GitOps
podman kube play -f nginx.yaml
podman kube gen -f nginx.yaml
- Can also be started via systemd
Kubernetes Features
- Declarative configuration
- Automatic scaling
Kubernetes Features
- Declarative configuration
- Automatic scaling
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3 # <----------------- How many pods?
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec: # <--------------------- Pod spec
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3 # <----------------- How many pods?
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec: # <--------------------- Pod spec
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Kubernetes Features
- Declarative configuration
- Automatic scaling
Kubernetes Features
- Declarative configuration
- Automatic scaling
- Self-healing
Kubernetes Features
- Declarative configuration
- Automatic scaling
- Self-healing
- Service discovery
Kubernetes Features
Kubernetes Features
Kubernetes Pieces
- App
- Deployment
- StatefulSet
- DaemonSet
- Networking
- Service
- Ingress/Gateway
- Storage
- Persistent Volume
- Persistent Volume Claim
- Environment
- ConfigMap
- Secret
- Deployment
- StatefulSet
- DaemonSet
- Service
- Ingress/Gateway
- Persistent Volume
- Persistent Volume Claim
- ConfigMap
- Secret
How does it work?
- ResourceDefintion
- Resource
- Controller
- Reconcile loop
- Reconcile loop
How does it work?
Extending with Operators
- ResourceDefintion -> CustomResourceDefinition
- Resource -> CustomResource
- Controller -> CustomController
How does it work?
Example: Ceph Operator
Openshift Data Foundation
Source: docs.redhat.com
Openshift Data Foundation
Source: docs.redhat.com
Openshift Data Foundation
Source: docs.redhat.com