openshift
  • container orchestration
  • kubernetes
  • architecture
  • key concepts
dockerfile
image
registry
kubernetes
deployment code, tooling
dockerfile
S2I
ocr
openshift
deployment code
image stream
registry
dockerfile
image
registry
kubernetes
deployment code, tooling

SWARM

Container Orchestration Engines (COE)

Features of  a COE

clustering

scheduling

load balancing

fault tolerance

scaling

app deployment

google

battle hardened

open

community

features

complex

zero to dev

non native

Features of  a k8s

clustering

scheduling

load balancing

fault tolerance

scaling

app deployment

Feature Concept
Colocation Pods
Scaling/Fault Tolerance replication controllers, replica sets
Load Balancing Services
App Deployment, Rollbacks deployments, rolling-updates
Stateful Apps stateful sets/ pet sets
configs, secrets config sets, secrets
app health checks liveness, readiness
logs and storage
monitoring

key concepts

projects

openshift
Project A
Project B
Project C

projects

stack = project
openshift
Project A
Project B
Project C

namespaces

stack = project
kubernetes
Project A
Project B
Project C

projects

quota
users and roles
network policies

pods

container

container

nginx
fsync
nginx
fsync

container

container

container

pod

debian
centos
nginx
fsync
eth0
10.0.4.25
  • process/pid namespace
  • root filesystem namespace
  • network namespace
    
  • hostname /uts namespace 
  • volumes

isolated

common

fsync
dst: /var/www/html
dst: /data
hostname = pod-xxx

A

K

M

S

PI Version

ind

etadata

pec

apiVersion: v1
kind: Pod
metadata:
  name: vote
  labels:
    app: voting
    role: ui
    tier: front
    env: dev
spec:
  containers:
    - name: vote
      image: schoolofdevops/vote:latest
      ports:
        - containerPort: 80

specs

deployments

app
replication 
controller
v1
v2
strategy
deployment / deployment config
deployment config (dc)
replication 
controller
pod spec
strategy
openshift
deploymen (deploy)
replicaSet
pod spec
strategy
kubernetes
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: frontend-canary
  namespace: mogambo
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  replicas: 3
  minReadySeconds: 40
  revisionHistoryLimit: 4
  paused: false
  template:
    metadata:
      name: frontend
      labels:
        tier: "1"
        app: frontend
        env: dev
        release: canary
    spec:
      containers:
        - name: frontend
          image: schoolofdevops/frontend:v2.0
          ports:
            - containerPort: 8079
              protocol: TCP

deployment

replicaSet
strategy
pod spec

replication controllers

1
2
3
replication controllers
2
replication controllers
labels:
app: carts
version: v2.1
env: dev
labels:
app: ui
version: v5.0
env: dev
selector:
app: carts
env: dev
replicationController
selector:
app: carts
env: dev
replicaSet
selector:
app: carts
env: dev
version: [v1,v2, v3]

 

set based ( A AND B AND (x or y) )
A AND B AND C

OLD

NEW

Release Strategy
v1
v2
Rolling
Recreate
custom
svc.k8s.io

Service Discovery and publishing apps

app.project1.svc.cluster.local
10.30.45.76
app:80
Service
Endpoints
Cluster IP
Nodeport
Load Balancer
ExtIP
host:80
host:30000
cloud
with selectors
ELB
L4
L4
L4
L7
Route
ui.xyz.com
api.xyz.com
xyz.com/carts
DNS
api
deplyoment config
project
service, route
ConfigMaps and Secrets
Persistent Volumes
Network and CNI
Network Policies
RBAC
Horizontal Pod Autoscaler

additional concepts

Additional Controllers

additional controllers

1
2
3

deplyoment configs

daemon set

e.g. Monitoring/Logging Agents

app.xyz.com

stateful set

app.svc.ns.cluster

stateful set

app.svc.ns.cluster

cron

Jobs

architecture

KUBERNETES Architecture

kubectl

Scheduler

API Server

Controllers Manager

etcd

kubelet

kube-proxy

Master
Node 1
Node 2

Docker

kubelet

kube-proxy

Docker

etcd
managers
High Available Design
etcd
etcd
LB
kubectl, ui, api clients
storage 
log mgmt
monitoring
nodes
Made with Slides.com