SlideShare a Scribd company logo
Kubernetes One-Click Deployment:
Hands-on Workshop
@joerg_schad @dcos
© 2018 Mesosphere, Inc. All Rights Reserved.
Agenda
● Introduction
● Overview Kubernetes and DC/OS
● Lab 1: DC/OS Setup/ First Steps
● Challenges in Kubernetes Deployments
● Kubernetes on DC/OS
● Lab 2: Install Kubernetes
● Lab 3: Deploy first POD
● Operating Kubernetes Cluster
● Lab 4: Kill nodes
● Current Limitations/Future plans
● Lab 5: SMACK meets Kubernetes
● Feedback
2
© 2018 Mesosphere, Inc. All Rights Reserved.
Introduction
● Who are you?
● What is your experience (DC/OS and Kubernetes)?
● What are your expectations for this workshop?
3
© 2017 Mesosphere, Inc. All Rights Reserved. 4
In the beginning
there was a big
Monolith
© 2016 Mesosphere, Inc. All Rights Reserved. 5
© 2017 Mesosphere, Inc. All Rights Reserved.
Hardware
Operating System
Application
6
COMPUTERS
© 2017 Mesosphere, Inc. All Rights Reserved.
noun | ˈmīkrō/ /ˈsərvəs/ :
an approach to application development in which a
large application is built as a suite of modular services.
Each module supports a specific business goal and
uses a simple, well-defined interface to communicate
with other modules.*
Microservices are designed to be flexible, resilient,
efficient, robust, and individually scalable.
*From whatis.com
OVERVIEW
© 2017 Mesosphere, Inc. All Rights Reserved.
Operating
System
Operating
System
Operating
System
ServiceApp ServiceServiceAppApp
8
MICROSERVICES
- Polyglot
- Single
Responsibility
- Smaller Teams
- Utilization
- Machine
types/groups
- Dependency hell
Machine
Infrastructure
Machine Machine
ServiceService ServiceServiceServiceService
© 2017 Mesosphere, Inc. All Rights Reserved. 9
Container …
!=
• container runtime* != container image != container instance
• beyond docker runtime
• Universal Container Runtime
• supports docker images
• CRI{-o}
•…
© 2017 Mesosphere, Inc. All Rights Reserved.
ServiceApp ServiceServiceAppApp
OS
10
CONTAINERS
- Rapid deployment
- Dependency
vendoring
- Container image
repositories
- Spreadsheet
scheduling
OS OS
Machine
Infrastructure
Machine Machine
Container Runtime Container Runtime Container Runtime
ServiceService ServiceServiceServiceService
© 2018 Mesosphere, Inc. All Rights Reserved. 11
CONTAINER
SCHEDULING
RESOURCE
MANAGEMENT
SERVICE
MANAGEMENT
- Load Balancing
- Readiness Checking
CONTAINER ORCHESTRATION
© 2018 Mesosphere, Inc. All Rights Reserved. 12
CONTAINER
SCHEDULING
- Placement
- Replication/Scaling
- Resurrection
- Rescheduling
- Rolling Deployment
- Upgrades
- Downgrades
- Collocation
RESOURCE
MANAGEMENT
- Memory
- CPU
- GPU
- Volumes
- Ports
- IPs
- Images/Artifacts
SERVICE
MANAGEMENT
- Labels
- Groups/Namespaces
- Dependencies
- Load Balancing
- Readiness Checking
CONTAINER ORCHESTRATION
© 2017 Mesosphere, Inc. All Rights Reserved.
Orchestration
13
Machine Infrastructure
Web Apps & Services
Scheduling
Resource Management
Container Runtime
Machine & OS
Service Management
CONTAINER
ORCHESTRATION
Machine & OS Machine & OS
Container Runtime Container Runtime
© 2018 Mesosphere, Inc. All Rights Reserved. 14
Mesos and Kubernetes
Machine Infrastructure
Container Runtime
Machine & OS Machine & OS Machine & OS
Container Runtime Container RuntimeContainer Runtime
Machine & OS Machine & OS
Container Runtime
Orchestration
Scheduling
Resource Management
Service Management
Web Apps & Services
Machine Infrastructure
DC/OS / Apache Mesos
OrchestrationScheduling
Resource Management
Service Management
Web Apps & Services
© 2018 Mesosphere, Inc. All Rights Reserved. 15
Mesos and Kubernetes
Machine Infrastructure
Container Runtime
Machine & OS Machine & OS Machine & OS
Container Runtime Container RuntimeContainer Runtime
Machine & OS Machine & OS
Container Runtime
Machine Infrastructure
DC/OS / Apache Mesos
Web Apps & Services
etcd etcdetcd
api-ser
ver
api-ser
ver
api-ser
ver
Kube-
proxy
Kube-
proxy
scheduler
Kube-
proxy
scheduler
schedulercontrollercontroller
controller
kubelet kubelet kubelet
...
© 2018 Mesosphere, Inc. All Rights Reserved. 16
Mesos and Kubernetes
Machine Infrastructure
Container Runtime
Machine & OS Machine & OS Machine & OS
Container Runtime Container RuntimeContainer Runtime
Machine & OS Machine & OS
Container Runtime
Machine Infrastructure
DC/OS / Apache Mesos
Web Apps & Services
etcd etcdetcd
api-ser
ver
api-ser
ver
api-ser
ver
Kube-
proxy
Kube-
proxy
scheduler
Kube-
proxy
scheduler
schedulercontrollercontroller
controller
kubelet kubelet kubelet
...
© 2018 Mesosphere, Inc. All Rights Reserved. 17
Mesos and Kubernetes
Orchestration
Machine Infrastructure
Web Apps & Services
Scheduling
Resource Management
Container Runtime
Machine & OS
Service Management
Machine & OS Machine & OS
Container Runtime Container RuntimeContainer Runtime
Machine & OS Machine & OS
Container Runtime
Orchestration
Scheduling
Resource Management
Service Management
Web Apps & Services
Machine Infrastructure
DC/OS / Apache Mesos
Big Data
Services
● Spark
● Flink
● Kafka
● ….
© 2018 Mesosphere, Inc. All Rights Reserved. 18
Reality
Machine Infrastructure
Container Runtime
Machine & OS Machine & OS Machine & OS
Container Runtime Container RuntimeContainer Runtime
Machine & OS Machine & OS
Container Runtime
Orchestration
Scheduling
Resource Management
Service Management
Web Apps & Services
Machine Infrastructure
DC/OS/Apache
Mesos
© 2016 Mesosphere, Inc. All Rights Reserved. 19
MESOS: FUNDAMENTAL ARCHITECTURE
Mesos
Master
Mesos
Master
Mesos
Master
Mesos AgentMesos Agent Service
Cassandra
Executor
Cassandra
Task
Cassandra
Scheduler
Container
Scheduler
Spark
Scheduler
Spark
Executor
Spark
Task
Mesos AgentMesos Agent Service
Docker
Executor
Docker
Task
Spark
Executor
Spark
Task
Two-level Scheduling
1. Agents advertise resources to Master
2. Master offers resources to Framework
3. Framework rejects / uses resources
4. Agent reports task status to Master
© 2018 Mesosphere, Inc. All Rights Reserved. 20
Mesos and Kubernetes
© 2018 Mesosphere, Inc. All Rights Reserved. 21
Mesos and Kubernetes
© 2017 Mesosphere, Inc. All Rights Reserved. 22
Kubernetes
Overview
© 2018 Mesosphere, Inc. All Rights Reserved.
KUBERNETES Concepts
kind: Deployment
kind: ReplicaSet
kind: Pod
scales
N instances
of Pod
Set of
Containers
Upgrades
deployes
23
© 2018 Mesosphere, Inc. All Rights Reserved.
Configuration File
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
24
© 2018 Mesosphere, Inc. All Rights Reserved.
Configuration File
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
ReplicaSet
Pod
25
© 2018 Mesosphere, Inc. All Rights Reserved.
Service Spec & Labels
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
Label
26
© 2018 Mesosphere, Inc. All Rights Reserved.
kubectl
$ kubectl create -f https://k8s.io/docs/user-guide/nginx-deployment.yaml
$ kubectl get deployments
$ kubectl decribe
$ kubectl logs --tail=20 nginx-deployment
27
© 2018 Mesosphere, Inc. All Rights Reserved.
KUBERNETES ARCHITECTURE
28
© 2018 Mesosphere, Inc. All Rights Reserved.
Kubernetes Component Role
etcd Distributed key/value store
kube-apiserver Central API server to interact with the cluster components
kube-controller-manager Reconciles scale events for fault tolerant objects (e.g. Replication
Controllers)
kube-scheduler Schedules containers on the various worker nodes
kubelet Agent running on each worker. Serves as an init daemon to start containers
kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the
cluster
kubectl CLI to interact with the cluster, and deploy containers
Kubernetes Components and Analogies
29
© 2017 Mesosphere, Inc. All Rights Reserved. 30
DC/OS
Overview
© 2018 Mesosphere, Inc. All Rights Reserved. 31
Mesos and Kubernetes
© 2017 Mesosphere, Inc. All Rights Reserved. 32
Datacenter
© 2017 Mesosphere, Inc. All Rights Reserved. 33
Datacenter
Typical Datacenter
siloed, over-provisioned servers,
low utilization
Kubernetes
Jenkins
Kafka
Spark
Kubernetes
© 2017 Mesosphere, Inc. All Rights Reserved. 34
© 2017 Mesosphere, Inc. All Rights Reserved. 35
Datacenter
Typical Datacenter
siloed, over-provisioned servers,
low utilization
Mesos/ DC/OS
automated schedulers, workload multiplexing onto the
same machines
Tensorflow
Jenkins
Kafka
Spark
Tensorflow
© 2016 Mesosphere, Inc. All Rights Reserved. 36
Lab 1
DC/OS and CLI
© 2017 Mesosphere, Inc. All Rights Reserved. 37
INSTALLING THE CLI
© 2017 Mesosphere, Inc. All Rights Reserved. 38
UI
© 2017 Mesosphere, Inc. All Rights Reserved. 39
First non Kubernetes, non docker container
© 2017 Mesosphere, Inc. All Rights Reserved. 40
First non Kubernetes, non docker container
© 2017 Mesosphere, Inc. All Rights Reserved. 41
DC/OS
Kubernetes
Integration
© 2018 Mesosphere, Inc. All Rights Reserved.
● Unaltered upstream Kubernetes, unlike OpenShift
● Stand-alone Kubernetes clusters are exposed, not a PaaS using Kubernetes
● Simple install onto a DC/OS cluster
● Integration with DC/OS data services
● HA and Secure by default in EE
● Customers have choice between Marathon and Kubernetes
DC/OS Kubernetes
42
© 2018 Mesosphere, Inc. All Rights Reserved.
Kubernetes Component Role DC/OS Component
etcd Distributed key/value store Zookeeper
kube-apiserver Central API server to interact with the cluster components
kube-controller-manager Reconciles scale events for fault tolerant objects (e.g. Replication
Controllers)
kube-scheduler Schedules containers on the various worker nodes Marathon
kubelet Agent running on each worker. Serves as an init daemon to start containers Mesos Agent
kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the
cluster
Minuteman
kubectl CLI to interact with the cluster, and deploy containers dcos CLI
Kubernetes Components and Analogies
43
© 2018 Mesosphere, Inc. All Rights Reserved. 44
Default Setup
© 2018 Mesosphere, Inc. All Rights Reserved. 45
● CNI - Container Networking Interface
● Kube-DNS - Kubernetes DNS server
● Kube-proxy - East-west loadbalancer
● Ingress - North-South loadbalancer
Networking in Kubernetes
© 2018 Mesosphere, Inc. All Rights Reserved. 46
● CNI - Container Networking Interface
● Spartan - DC/OS DNS server
● Minuteman - East-west loadbalancer
● Marathon-LB - North-South loadbalancer
Networking in DC/OS
© 2018 Mesosphere, Inc. All Rights Reserved. 47
Networking in Kubernetes on DC/OS
© 2018 Mesosphere, Inc. All Rights Reserved. 48
Secure TLS Support
OSS EE
© 2016 Mesosphere, Inc. All Rights Reserved. 49
Lab 2
Install DC/OS Kubernetes
© 2018 Mesosphere, Inc. All Rights Reserved. 50
© 2018 Mesosphere, Inc. All Rights Reserved. 51
© 2018 Mesosphere, Inc. All Rights Reserved. 52
© 2018 Mesosphere, Inc. All Rights Reserved. 53
© 2018 Mesosphere, Inc. All Rights Reserved. 54
© 2018 Mesosphere, Inc. All Rights Reserved. 55
© 2018 Mesosphere, Inc. All Rights Reserved. 56
© 2018 Mesosphere, Inc. All Rights Reserved. 57
© 2016 Mesosphere, Inc. All Rights Reserved. 58
Lab 2a
Configure Kubectl
© 2016 Mesosphere, Inc. All Rights Reserved. 59
1. Install Kubectl
a. https://kubernetes.io/docs/tasks/tools/install-kubectl/
2. SSH Tunnel
a. ssh -4 -N -L 9000:apiserver-insecure.kubernetes.l4lb.thisdcos.directory:9000 core@<HOST>
b. Check: http://localhost:9000
3. Configure Kubectl
a. kubectl config set-cluster dcos-k8s --server=http://localhost:9000
kubectl config set-context dcos-k8s --cluster=dcos-k8s --namespace=default
kubectl config use-context dcos-k8s
b. Check: kubectl get nodes
Setting up Kubectl
© 2016 Mesosphere, Inc. All Rights Reserved. 60
1. Install Kubectl
a. https://kubernetes.io/docs/tasks/tools/install-kubectl/
2. SSH Tunnel
a. ssh-add
https://gist.github.com/joerg84/4dd5f2761e9d0b9e046d41d026f87d4b
b. ssh -4 -N -L 9000:apiserver-insecure.kubernetes.l4lb.thisdcos.directory:9000 core@<HOST>
c. Check: http://localhost:9000
3. Configure Kubectl
a. kubectl config set-cluster dcos-k8s --server=http://localhost:9000
kubectl config set-context dcos-k8s --cluster=dcos-k8s --namespace=default
kubectl config use-context dcos-k8s
b. Check: kubectl get nodes
Setting up Kubectl
© 2018 Mesosphere, Inc. All Rights Reserved. 61
● $ kubectl proxy
Starting to serve on 127.0.0.1:8001
● http://localhost:8001/ui/
Dashboard
© 2016 Mesosphere, Inc. All Rights Reserved. 62
Lab 3
Deploying First Pod
© 2018 Mesosphere, Inc. All Rights Reserved.
First deployment
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
$ kubectl create -f https://k8s.io/docs/user-guide/nginx-deployment.yaml
63
© 2018 Mesosphere, Inc. All Rights Reserved.
kubectl
$ kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx-deployment 3 3 3 3 2m
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
nginx-deployment-431080787-15tf1 1/1 Running 0 2m
nginx-deployment-431080787-6bxft 1/1 Running 0 2m
nginx-deployment-431080787-xn4q1 1/1 Running 0 2m
$ kubectl get rs
$ kubectl logs --tail=20 nginx-deployment-431080787-15tf1
64
© 2017 Mesosphere, Inc. All Rights Reserved. 65
Operations
© 2017 Mesosphere, Inc. All Rights Reserved. 66
Keep it running!
© 2017 Mesosphere, Inc. All Rights Reserved. 67
SERVICE OPERATIONS
● Configuration Updates (ex: Scaling, re-configuration)
● Binary Upgrades
● Cluster Maintenance (ex: Backup, Restore, Restart)
● Monitor progress of operations
● Debug any runtime blockages
© 2017 Mesosphere, Inc. All Rights Reserved. 68
SERVICE OPERATIONS
● Configuration Updates (ex: Scaling, re-configuration)
● Binary Upgrades
● Cluster Maintenance (ex: Backup, Restore, Restart)
● Monitor progress of operations
● Debug any runtime blockages
© 2016 Mesosphere, Inc. All Rights Reserved. 69
Lab 4
Operations
© 2017 Mesosphere, Inc. All Rights Reserved. 70
Kill kubelet process
● dcos task exec -it kube-node-0-kubelet bash
● ps aux | grep "./kubelet "
root 62 2.3 0.6 741984 100580 ? Sl 15:16 3:25
./kubelet --address=10.0.4.5
--hostname-override=kube-node-1-kubelet.kubernetes.mesos
● kill -9 62
© 2017 Mesosphere, Inc. All Rights Reserved. 71
Watch the kubelet being restarted
© 2017 Mesosphere, Inc. All Rights Reserved. 72
Watch it being restarted
© 2017 Mesosphere, Inc. All Rights Reserved. 73
DC/OS
Ecosystem
And
Kubernetes
© 2018 Mesosphere, Inc. All Rights Reserved. 74
Ecosystem
© 2016 Mesosphere, Inc. All Rights Reserved. 75
Lab 5
OS Detector
© 2018 Mesosphere, Inc. All Rights Reserved. 76
Prepare Cassandra
# Install Cassandra
$ dcos package install cassandra
# Add marathon app with cql
$ dcos marathon app add
https://raw.githubusercontent.com/joerg84/dcos-kubernetes-quickstart/4633d7ecb
3963e999683ee1e112c01f69e1116fd/examples/os-detector/cassandra-cql.json
# Exec into cql task
$ dcos task exec -it cassandra-cql bash
© 2018 Mesosphere, Inc. All Rights Reserved. 77
Prepare Cassandra
$ cqlsh node-0-server.cassandra.autoip.dcos.thisdcos.directory
cqlsh> CREATE KEYSPACE browsers WITH REPLICATION = { 'class' :
'SimpleStrategy', 'replication_factor' : 1 };
cqlsh> CREATE TABLE browsers.browser_counts (
counter counter,
os varchar,
PRIMARY KEY (os)
);
© 2018 Mesosphere, Inc. All Rights Reserved. 78
OS Detector
# Deploy OS Detector
$ kubectl apply -f
https://raw.githubusercontent.com/mesosphere/dcos-kubernet
es-quickstart/master/examples/os-detector/os-detector.yaml
# Check Pod
$ kubectl get pods
# Forward port
$ kubectl port-forward osdetect-3187877689-5lm4c
8080:8080
# Access locally
http://localhost:8080
© 2016 Mesosphere, Inc. All Rights Reserved. 79
Lab 6
SMACK Stack/ Apache Flink
© 2018 Mesosphere, Inc. All Rights Reserved. 80
SMACK Stack
Generator Display
1. Financial data created
by generator
2. Written to
Kafka topics
3. Kafka Topics
consumed by Spark or
Flink
4. Results written back into Kafka
stream (another topic)
7. Results displayed
© 2018 Mesosphere, Inc. All Rights Reserved. 81
Install Apache Flink & Kafka
© 2018 Mesosphere, Inc. All Rights Reserved. 82
Deploy Flink Job
https://s3-eu-west-1.amazonaws.com/downloads.mesosphere.com/flink/flink-job-1.0.jar
© 2018 Mesosphere, Inc. All Rights Reserved. 83
Deploy Microservices
https://s3-eu-west-1.amazonaws.com/downloads.mesosphere.com/flink/flink-job-1.0.jar
© 2018 Mesosphere, Inc. All Rights Reserved. 84
Deploy Microservices
# Deploy Display
$ kubectl apply -f
https://raw.githubusercontent.com/dcos-labs/dcos-kubernetes-
workshop/master/flinkDemo/flink-demo-actor.yaml
# Deploy Generator
$ kubectl apply -f
https://raw.githubusercontent.com/dcos-labs/dcos-kubernetes-
workshop/master/flinkDemo/flink-demo-generator.yaml
$ kubectl get pods
$ kubectl logs flink-demo-actor-655890656-8d1ls
© 2017 Mesosphere, Inc. All Rights Reserved. 85
Future and
Feedback
© 2017 Mesosphere, Inc. All Rights Reserved.
DC/OS Kubernetes Roadmap
Beta
● Simple provisioning
● TLS Throughout (EE)
● Monitoring
Dashboards & Alerts
● Add kubelet’s to the
cluster
GA
● Edge-LB
Integration
● Tunnel-less kubectl
● Rolling upgrades
● Internal DNS
(DC/OS and K8S)
● OSS (?)
Sept
‘17
Future
Future
● Hybrid-Cloud
● DC/OS Secrets
● Central Logging
● DC/OS Storage
● Disaster Recovery
● Identity Provider
integration
Feb
‘18
© 2018 Mesosphere, Inc. All Rights Reserved.
Feedback...
● DC/OS Kubernetes package
● What do you need?
● What challenges are you experiencing?
● Workshop
● How can we improve?
87
© 2017 Mesosphere, Inc. All Rights Reserved. 88
THANK YOU!
ANY
QUESTIONS?
@dcos
users@dcos.io
/groups/8295652
/dcos
/dcos/examples
/dcos/demos
chat.dcos.io
https://github.com/mesosphere/dcos-kubernetes-quickstart
https://mesosphere.com/blog/another-kubernetes-service/
© 2017 Mesosphere, Inc. All Rights Reserved. 89
Container
Best Practices
© 2017 Mesosphere, Inc. All Rights Reserved.
Immutable Container Images
© 2017 Mesosphere, Inc. All Rights Reserved.
Dockerhub
works great for
our test
cluster…
Private Container Registries
© 2017 Mesosphere, Inc. All Rights Reserved.
Repeatable Container Builds
`docker
commit` is
great*…
© 2017 Mesosphere, Inc. All Rights Reserved. 93
Write Once Run Any Where
The (Java) container
was running fine in
testing…
…

More Related Content

PDF
The Operator Pattern - Managing Stateful Services in Kubernetes
PPTX
Kubernetes @ meetic
PDF
(Draft) Kubernetes - A Comprehensive Overview
PPTX
Introduction to Kubernetes
PDF
Evolution of containers to kubernetes
PPTX
DevOps with Kubernetes
PDF
Hands-On Introduction to Kubernetes at LISA17
ODP
Kubernetes Architecture
The Operator Pattern - Managing Stateful Services in Kubernetes
Kubernetes @ meetic
(Draft) Kubernetes - A Comprehensive Overview
Introduction to Kubernetes
Evolution of containers to kubernetes
DevOps with Kubernetes
Hands-On Introduction to Kubernetes at LISA17
Kubernetes Architecture

What's hot (20)

PPTX
DevOps: Kubernetes + Helm with Azure
PPTX
Introduction to helm
PDF
From Code to Kubernetes
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
PDF
Kubernetes 101
PDF
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
PPTX
Platform as a Service with Kubernetes and Mesos
PDF
Kubernetes Architecture - beyond a black box - Part 2
PPTX
Intro to cluster scheduler for Linux containers
PPTX
Ultimate Guide to Microservice Architecture on Kubernetes
PDF
Kubernetes - A Comprehensive Overview
PDF
Kubernetes: The Next Research Platform
PDF
Apache Stratos 4.1.0 Architecture
PPTX
Why kubernetes matters
PPTX
Service Discovery In Kubernetes
PDF
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
PDF
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
PDF
Kubernetes 101
PDF
Top 3 reasons why you should run your Enterprise workloads on GKE
PPTX
Deploy your favorite apps on Kubernetes
DevOps: Kubernetes + Helm with Azure
Introduction to helm
From Code to Kubernetes
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes 101
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Platform as a Service with Kubernetes and Mesos
Kubernetes Architecture - beyond a black box - Part 2
Intro to cluster scheduler for Linux containers
Ultimate Guide to Microservice Architecture on Kubernetes
Kubernetes - A Comprehensive Overview
Kubernetes: The Next Research Platform
Apache Stratos 4.1.0 Architecture
Why kubernetes matters
Service Discovery In Kubernetes
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Kubernetes 101
Top 3 reasons why you should run your Enterprise workloads on GKE
Deploy your favorite apps on Kubernetes
Ad

Similar to Kubernetes One-Click Deployment: Hands-on Workshop (Munich) (20)

PPTX
Episode 2: Deploying Kubernetes at Scale
PPTX
Webinar: Operating Kubernetes at Scale
PPTX
Operating Kubernetes at Scale (Australia Presentation)
PDF
OSDC 2018 | From batch to pipelines – why Apache Mesos and DC/OS are a soluti...
PDF
DevOps vs. Site Reliability Engineering (SRE) in Age of Kubernetes
PDF
Kubernetes on Top of Mesos on Top of DCOS
PPTX
Episode 4: Operating Kubernetes at Scale with DC/OS
PPTX
DevOps in Age of Kubernetes
PPTX
Dealing with kubesprawl tetris style !
PDF
Downtime is not an option - day 2 operations - Jörg Schad
PDF
SMACK stack and beyond
PDF
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
PDF
Mesos and the Architecture of the New Datacenter
PPTX
Operating Flink on Mesos at Scale
PDF
Webinar - Nightmares of a Container Orchestration System - Jorg Schad
PDF
Webinar: Nightmares of a Container Orchestration System - Jorg Schad
PPTX
Episode 3: Kubernetes and Big Data Services
PDF
Using DC/OS for Continuous Delivery - DevPulseCon 2017
PDF
Flink forward SF 2017: Elizabeth K. Joseph and Ravi Yadav - Flink meet DC/OS ...
PDF
Flink forward sf 17
Episode 2: Deploying Kubernetes at Scale
Webinar: Operating Kubernetes at Scale
Operating Kubernetes at Scale (Australia Presentation)
OSDC 2018 | From batch to pipelines – why Apache Mesos and DC/OS are a soluti...
DevOps vs. Site Reliability Engineering (SRE) in Age of Kubernetes
Kubernetes on Top of Mesos on Top of DCOS
Episode 4: Operating Kubernetes at Scale with DC/OS
DevOps in Age of Kubernetes
Dealing with kubesprawl tetris style !
Downtime is not an option - day 2 operations - Jörg Schad
SMACK stack and beyond
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Mesos and the Architecture of the New Datacenter
Operating Flink on Mesos at Scale
Webinar - Nightmares of a Container Orchestration System - Jorg Schad
Webinar: Nightmares of a Container Orchestration System - Jorg Schad
Episode 3: Kubernetes and Big Data Services
Using DC/OS for Continuous Delivery - DevPulseCon 2017
Flink forward SF 2017: Elizabeth K. Joseph and Ravi Yadav - Flink meet DC/OS ...
Flink forward sf 17
Ad

More from QAware GmbH (20)

PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
Frontends mit Hilfe von KI entwickeln.pdf
PDF
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
PDF
50 Shades of K8s Autoscaling #JavaLand24.pdf
PDF
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
PPTX
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
PDF
Down the Ivory Tower towards Agile Architecture
PDF
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
PDF
Make Developers Fly: Principles for Platform Engineering
PDF
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
PDF
Was kommt nach den SPAs
PDF
Cloud Migration mit KI: der Turbo
PDF
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
PDF
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
PDF
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
PDF
Kubernetes with Cilium in AWS - Experience Report!
PDF
50 Shades of K8s Autoscaling
PDF
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
PDF
Service Mesh Pain & Gain. Experiences from a client project.
PDF
50 Shades of K8s Autoscaling
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
Frontends mit Hilfe von KI entwickeln.pdf
Mit ChatGPT Dinosaurier besiegen - Möglichkeiten und Grenzen von LLM für die ...
50 Shades of K8s Autoscaling #JavaLand24.pdf
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Down the Ivory Tower towards Agile Architecture
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
Make Developers Fly: Principles for Platform Engineering
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Was kommt nach den SPAs
Cloud Migration mit KI: der Turbo
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Kubernetes with Cilium in AWS - Experience Report!
50 Shades of K8s Autoscaling
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Service Mesh Pain & Gain. Experiences from a client project.
50 Shades of K8s Autoscaling

Recently uploaded (20)

PPTX
Essential Infomation Tech presentation.pptx
DOCX
The Five Best AI Cover Tools in 2025.docx
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Transform Your Business with a Software ERP System
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Online Work Permit System for Fast Permit Processing
PDF
medical staffing services at VALiNTRY
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Operating system designcfffgfgggggggvggggggggg
Essential Infomation Tech presentation.pptx
The Five Best AI Cover Tools in 2025.docx
ISO 45001 Occupational Health and Safety Management System
Materi-Enum-and-Record-Data-Type (1).pptx
ai tools demonstartion for schools and inter college
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Migrate SBCGlobal Email to Yahoo Easily
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Transform Your Business with a Software ERP System
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
System and Network Administration Chapter 2
Design an Analysis of Algorithms II-SECS-1021-03
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo POS Development Services by CandidRoot Solutions
Online Work Permit System for Fast Permit Processing
medical staffing services at VALiNTRY
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Operating system designcfffgfgggggggvggggggggg

Kubernetes One-Click Deployment: Hands-on Workshop (Munich)

  • 1. Kubernetes One-Click Deployment: Hands-on Workshop @joerg_schad @dcos
  • 2. © 2018 Mesosphere, Inc. All Rights Reserved. Agenda ● Introduction ● Overview Kubernetes and DC/OS ● Lab 1: DC/OS Setup/ First Steps ● Challenges in Kubernetes Deployments ● Kubernetes on DC/OS ● Lab 2: Install Kubernetes ● Lab 3: Deploy first POD ● Operating Kubernetes Cluster ● Lab 4: Kill nodes ● Current Limitations/Future plans ● Lab 5: SMACK meets Kubernetes ● Feedback 2
  • 3. © 2018 Mesosphere, Inc. All Rights Reserved. Introduction ● Who are you? ● What is your experience (DC/OS and Kubernetes)? ● What are your expectations for this workshop? 3
  • 4. © 2017 Mesosphere, Inc. All Rights Reserved. 4 In the beginning there was a big Monolith
  • 5. © 2016 Mesosphere, Inc. All Rights Reserved. 5
  • 6. © 2017 Mesosphere, Inc. All Rights Reserved. Hardware Operating System Application 6 COMPUTERS
  • 7. © 2017 Mesosphere, Inc. All Rights Reserved. noun | ˈmīkrō/ /ˈsərvəs/ : an approach to application development in which a large application is built as a suite of modular services. Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other modules.* Microservices are designed to be flexible, resilient, efficient, robust, and individually scalable. *From whatis.com OVERVIEW
  • 8. © 2017 Mesosphere, Inc. All Rights Reserved. Operating System Operating System Operating System ServiceApp ServiceServiceAppApp 8 MICROSERVICES - Polyglot - Single Responsibility - Smaller Teams - Utilization - Machine types/groups - Dependency hell Machine Infrastructure Machine Machine ServiceService ServiceServiceServiceService
  • 9. © 2017 Mesosphere, Inc. All Rights Reserved. 9 Container … != • container runtime* != container image != container instance • beyond docker runtime • Universal Container Runtime • supports docker images • CRI{-o} •…
  • 10. © 2017 Mesosphere, Inc. All Rights Reserved. ServiceApp ServiceServiceAppApp OS 10 CONTAINERS - Rapid deployment - Dependency vendoring - Container image repositories - Spreadsheet scheduling OS OS Machine Infrastructure Machine Machine Container Runtime Container Runtime Container Runtime ServiceService ServiceServiceServiceService
  • 11. © 2018 Mesosphere, Inc. All Rights Reserved. 11 CONTAINER SCHEDULING RESOURCE MANAGEMENT SERVICE MANAGEMENT - Load Balancing - Readiness Checking CONTAINER ORCHESTRATION
  • 12. © 2018 Mesosphere, Inc. All Rights Reserved. 12 CONTAINER SCHEDULING - Placement - Replication/Scaling - Resurrection - Rescheduling - Rolling Deployment - Upgrades - Downgrades - Collocation RESOURCE MANAGEMENT - Memory - CPU - GPU - Volumes - Ports - IPs - Images/Artifacts SERVICE MANAGEMENT - Labels - Groups/Namespaces - Dependencies - Load Balancing - Readiness Checking CONTAINER ORCHESTRATION
  • 13. © 2017 Mesosphere, Inc. All Rights Reserved. Orchestration 13 Machine Infrastructure Web Apps & Services Scheduling Resource Management Container Runtime Machine & OS Service Management CONTAINER ORCHESTRATION Machine & OS Machine & OS Container Runtime Container Runtime
  • 14. © 2018 Mesosphere, Inc. All Rights Reserved. 14 Mesos and Kubernetes Machine Infrastructure Container Runtime Machine & OS Machine & OS Machine & OS Container Runtime Container RuntimeContainer Runtime Machine & OS Machine & OS Container Runtime Orchestration Scheduling Resource Management Service Management Web Apps & Services Machine Infrastructure DC/OS / Apache Mesos OrchestrationScheduling Resource Management Service Management Web Apps & Services
  • 15. © 2018 Mesosphere, Inc. All Rights Reserved. 15 Mesos and Kubernetes Machine Infrastructure Container Runtime Machine & OS Machine & OS Machine & OS Container Runtime Container RuntimeContainer Runtime Machine & OS Machine & OS Container Runtime Machine Infrastructure DC/OS / Apache Mesos Web Apps & Services etcd etcdetcd api-ser ver api-ser ver api-ser ver Kube- proxy Kube- proxy scheduler Kube- proxy scheduler schedulercontrollercontroller controller kubelet kubelet kubelet ...
  • 16. © 2018 Mesosphere, Inc. All Rights Reserved. 16 Mesos and Kubernetes Machine Infrastructure Container Runtime Machine & OS Machine & OS Machine & OS Container Runtime Container RuntimeContainer Runtime Machine & OS Machine & OS Container Runtime Machine Infrastructure DC/OS / Apache Mesos Web Apps & Services etcd etcdetcd api-ser ver api-ser ver api-ser ver Kube- proxy Kube- proxy scheduler Kube- proxy scheduler schedulercontrollercontroller controller kubelet kubelet kubelet ...
  • 17. © 2018 Mesosphere, Inc. All Rights Reserved. 17 Mesos and Kubernetes Orchestration Machine Infrastructure Web Apps & Services Scheduling Resource Management Container Runtime Machine & OS Service Management Machine & OS Machine & OS Container Runtime Container RuntimeContainer Runtime Machine & OS Machine & OS Container Runtime Orchestration Scheduling Resource Management Service Management Web Apps & Services Machine Infrastructure DC/OS / Apache Mesos Big Data Services ● Spark ● Flink ● Kafka ● ….
  • 18. © 2018 Mesosphere, Inc. All Rights Reserved. 18 Reality Machine Infrastructure Container Runtime Machine & OS Machine & OS Machine & OS Container Runtime Container RuntimeContainer Runtime Machine & OS Machine & OS Container Runtime Orchestration Scheduling Resource Management Service Management Web Apps & Services Machine Infrastructure DC/OS/Apache Mesos
  • 19. © 2016 Mesosphere, Inc. All Rights Reserved. 19 MESOS: FUNDAMENTAL ARCHITECTURE Mesos Master Mesos Master Mesos Master Mesos AgentMesos Agent Service Cassandra Executor Cassandra Task Cassandra Scheduler Container Scheduler Spark Scheduler Spark Executor Spark Task Mesos AgentMesos Agent Service Docker Executor Docker Task Spark Executor Spark Task Two-level Scheduling 1. Agents advertise resources to Master 2. Master offers resources to Framework 3. Framework rejects / uses resources 4. Agent reports task status to Master
  • 20. © 2018 Mesosphere, Inc. All Rights Reserved. 20 Mesos and Kubernetes
  • 21. © 2018 Mesosphere, Inc. All Rights Reserved. 21 Mesos and Kubernetes
  • 22. © 2017 Mesosphere, Inc. All Rights Reserved. 22 Kubernetes Overview
  • 23. © 2018 Mesosphere, Inc. All Rights Reserved. KUBERNETES Concepts kind: Deployment kind: ReplicaSet kind: Pod scales N instances of Pod Set of Containers Upgrades deployes 23
  • 24. © 2018 Mesosphere, Inc. All Rights Reserved. Configuration File apiVersion: apps/v1beta2 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 24
  • 25. © 2018 Mesosphere, Inc. All Rights Reserved. Configuration File apiVersion: apps/v1beta2 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 ReplicaSet Pod 25
  • 26. © 2018 Mesosphere, Inc. All Rights Reserved. Service Spec & Labels kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 Label 26
  • 27. © 2018 Mesosphere, Inc. All Rights Reserved. kubectl $ kubectl create -f https://k8s.io/docs/user-guide/nginx-deployment.yaml $ kubectl get deployments $ kubectl decribe $ kubectl logs --tail=20 nginx-deployment 27
  • 28. © 2018 Mesosphere, Inc. All Rights Reserved. KUBERNETES ARCHITECTURE 28
  • 29. © 2018 Mesosphere, Inc. All Rights Reserved. Kubernetes Component Role etcd Distributed key/value store kube-apiserver Central API server to interact with the cluster components kube-controller-manager Reconciles scale events for fault tolerant objects (e.g. Replication Controllers) kube-scheduler Schedules containers on the various worker nodes kubelet Agent running on each worker. Serves as an init daemon to start containers kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster kubectl CLI to interact with the cluster, and deploy containers Kubernetes Components and Analogies 29
  • 30. © 2017 Mesosphere, Inc. All Rights Reserved. 30 DC/OS Overview
  • 31. © 2018 Mesosphere, Inc. All Rights Reserved. 31 Mesos and Kubernetes
  • 32. © 2017 Mesosphere, Inc. All Rights Reserved. 32 Datacenter
  • 33. © 2017 Mesosphere, Inc. All Rights Reserved. 33 Datacenter Typical Datacenter siloed, over-provisioned servers, low utilization Kubernetes Jenkins Kafka Spark Kubernetes
  • 34. © 2017 Mesosphere, Inc. All Rights Reserved. 34
  • 35. © 2017 Mesosphere, Inc. All Rights Reserved. 35 Datacenter Typical Datacenter siloed, over-provisioned servers, low utilization Mesos/ DC/OS automated schedulers, workload multiplexing onto the same machines Tensorflow Jenkins Kafka Spark Tensorflow
  • 36. © 2016 Mesosphere, Inc. All Rights Reserved. 36 Lab 1 DC/OS and CLI
  • 37. © 2017 Mesosphere, Inc. All Rights Reserved. 37 INSTALLING THE CLI
  • 38. © 2017 Mesosphere, Inc. All Rights Reserved. 38 UI
  • 39. © 2017 Mesosphere, Inc. All Rights Reserved. 39 First non Kubernetes, non docker container
  • 40. © 2017 Mesosphere, Inc. All Rights Reserved. 40 First non Kubernetes, non docker container
  • 41. © 2017 Mesosphere, Inc. All Rights Reserved. 41 DC/OS Kubernetes Integration
  • 42. © 2018 Mesosphere, Inc. All Rights Reserved. ● Unaltered upstream Kubernetes, unlike OpenShift ● Stand-alone Kubernetes clusters are exposed, not a PaaS using Kubernetes ● Simple install onto a DC/OS cluster ● Integration with DC/OS data services ● HA and Secure by default in EE ● Customers have choice between Marathon and Kubernetes DC/OS Kubernetes 42
  • 43. © 2018 Mesosphere, Inc. All Rights Reserved. Kubernetes Component Role DC/OS Component etcd Distributed key/value store Zookeeper kube-apiserver Central API server to interact with the cluster components kube-controller-manager Reconciles scale events for fault tolerant objects (e.g. Replication Controllers) kube-scheduler Schedules containers on the various worker nodes Marathon kubelet Agent running on each worker. Serves as an init daemon to start containers Mesos Agent kube-proxy Process to configure Linux Netfilter (iptable) rules to route traffic across the cluster Minuteman kubectl CLI to interact with the cluster, and deploy containers dcos CLI Kubernetes Components and Analogies 43
  • 44. © 2018 Mesosphere, Inc. All Rights Reserved. 44 Default Setup
  • 45. © 2018 Mesosphere, Inc. All Rights Reserved. 45 ● CNI - Container Networking Interface ● Kube-DNS - Kubernetes DNS server ● Kube-proxy - East-west loadbalancer ● Ingress - North-South loadbalancer Networking in Kubernetes
  • 46. © 2018 Mesosphere, Inc. All Rights Reserved. 46 ● CNI - Container Networking Interface ● Spartan - DC/OS DNS server ● Minuteman - East-west loadbalancer ● Marathon-LB - North-South loadbalancer Networking in DC/OS
  • 47. © 2018 Mesosphere, Inc. All Rights Reserved. 47 Networking in Kubernetes on DC/OS
  • 48. © 2018 Mesosphere, Inc. All Rights Reserved. 48 Secure TLS Support OSS EE
  • 49. © 2016 Mesosphere, Inc. All Rights Reserved. 49 Lab 2 Install DC/OS Kubernetes
  • 50. © 2018 Mesosphere, Inc. All Rights Reserved. 50
  • 51. © 2018 Mesosphere, Inc. All Rights Reserved. 51
  • 52. © 2018 Mesosphere, Inc. All Rights Reserved. 52
  • 53. © 2018 Mesosphere, Inc. All Rights Reserved. 53
  • 54. © 2018 Mesosphere, Inc. All Rights Reserved. 54
  • 55. © 2018 Mesosphere, Inc. All Rights Reserved. 55
  • 56. © 2018 Mesosphere, Inc. All Rights Reserved. 56
  • 57. © 2018 Mesosphere, Inc. All Rights Reserved. 57
  • 58. © 2016 Mesosphere, Inc. All Rights Reserved. 58 Lab 2a Configure Kubectl
  • 59. © 2016 Mesosphere, Inc. All Rights Reserved. 59 1. Install Kubectl a. https://kubernetes.io/docs/tasks/tools/install-kubectl/ 2. SSH Tunnel a. ssh -4 -N -L 9000:apiserver-insecure.kubernetes.l4lb.thisdcos.directory:9000 core@<HOST> b. Check: http://localhost:9000 3. Configure Kubectl a. kubectl config set-cluster dcos-k8s --server=http://localhost:9000 kubectl config set-context dcos-k8s --cluster=dcos-k8s --namespace=default kubectl config use-context dcos-k8s b. Check: kubectl get nodes Setting up Kubectl
  • 60. © 2016 Mesosphere, Inc. All Rights Reserved. 60 1. Install Kubectl a. https://kubernetes.io/docs/tasks/tools/install-kubectl/ 2. SSH Tunnel a. ssh-add https://gist.github.com/joerg84/4dd5f2761e9d0b9e046d41d026f87d4b b. ssh -4 -N -L 9000:apiserver-insecure.kubernetes.l4lb.thisdcos.directory:9000 core@<HOST> c. Check: http://localhost:9000 3. Configure Kubectl a. kubectl config set-cluster dcos-k8s --server=http://localhost:9000 kubectl config set-context dcos-k8s --cluster=dcos-k8s --namespace=default kubectl config use-context dcos-k8s b. Check: kubectl get nodes Setting up Kubectl
  • 61. © 2018 Mesosphere, Inc. All Rights Reserved. 61 ● $ kubectl proxy Starting to serve on 127.0.0.1:8001 ● http://localhost:8001/ui/ Dashboard
  • 62. © 2016 Mesosphere, Inc. All Rights Reserved. 62 Lab 3 Deploying First Pod
  • 63. © 2018 Mesosphere, Inc. All Rights Reserved. First deployment apiVersion: apps/v1beta2 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 $ kubectl create -f https://k8s.io/docs/user-guide/nginx-deployment.yaml 63
  • 64. © 2018 Mesosphere, Inc. All Rights Reserved. kubectl $ kubectl get deployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-deployment 3 3 3 3 2m $ kubectl get pod NAME READY STATUS RESTARTS AGE nginx-deployment-431080787-15tf1 1/1 Running 0 2m nginx-deployment-431080787-6bxft 1/1 Running 0 2m nginx-deployment-431080787-xn4q1 1/1 Running 0 2m $ kubectl get rs $ kubectl logs --tail=20 nginx-deployment-431080787-15tf1 64
  • 65. © 2017 Mesosphere, Inc. All Rights Reserved. 65 Operations
  • 66. © 2017 Mesosphere, Inc. All Rights Reserved. 66 Keep it running!
  • 67. © 2017 Mesosphere, Inc. All Rights Reserved. 67 SERVICE OPERATIONS ● Configuration Updates (ex: Scaling, re-configuration) ● Binary Upgrades ● Cluster Maintenance (ex: Backup, Restore, Restart) ● Monitor progress of operations ● Debug any runtime blockages
  • 68. © 2017 Mesosphere, Inc. All Rights Reserved. 68 SERVICE OPERATIONS ● Configuration Updates (ex: Scaling, re-configuration) ● Binary Upgrades ● Cluster Maintenance (ex: Backup, Restore, Restart) ● Monitor progress of operations ● Debug any runtime blockages
  • 69. © 2016 Mesosphere, Inc. All Rights Reserved. 69 Lab 4 Operations
  • 70. © 2017 Mesosphere, Inc. All Rights Reserved. 70 Kill kubelet process ● dcos task exec -it kube-node-0-kubelet bash ● ps aux | grep "./kubelet " root 62 2.3 0.6 741984 100580 ? Sl 15:16 3:25 ./kubelet --address=10.0.4.5 --hostname-override=kube-node-1-kubelet.kubernetes.mesos ● kill -9 62
  • 71. © 2017 Mesosphere, Inc. All Rights Reserved. 71 Watch the kubelet being restarted
  • 72. © 2017 Mesosphere, Inc. All Rights Reserved. 72 Watch it being restarted
  • 73. © 2017 Mesosphere, Inc. All Rights Reserved. 73 DC/OS Ecosystem And Kubernetes
  • 74. © 2018 Mesosphere, Inc. All Rights Reserved. 74 Ecosystem
  • 75. © 2016 Mesosphere, Inc. All Rights Reserved. 75 Lab 5 OS Detector
  • 76. © 2018 Mesosphere, Inc. All Rights Reserved. 76 Prepare Cassandra # Install Cassandra $ dcos package install cassandra # Add marathon app with cql $ dcos marathon app add https://raw.githubusercontent.com/joerg84/dcos-kubernetes-quickstart/4633d7ecb 3963e999683ee1e112c01f69e1116fd/examples/os-detector/cassandra-cql.json # Exec into cql task $ dcos task exec -it cassandra-cql bash
  • 77. © 2018 Mesosphere, Inc. All Rights Reserved. 77 Prepare Cassandra $ cqlsh node-0-server.cassandra.autoip.dcos.thisdcos.directory cqlsh> CREATE KEYSPACE browsers WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; cqlsh> CREATE TABLE browsers.browser_counts ( counter counter, os varchar, PRIMARY KEY (os) );
  • 78. © 2018 Mesosphere, Inc. All Rights Reserved. 78 OS Detector # Deploy OS Detector $ kubectl apply -f https://raw.githubusercontent.com/mesosphere/dcos-kubernet es-quickstart/master/examples/os-detector/os-detector.yaml # Check Pod $ kubectl get pods # Forward port $ kubectl port-forward osdetect-3187877689-5lm4c 8080:8080 # Access locally http://localhost:8080
  • 79. © 2016 Mesosphere, Inc. All Rights Reserved. 79 Lab 6 SMACK Stack/ Apache Flink
  • 80. © 2018 Mesosphere, Inc. All Rights Reserved. 80 SMACK Stack Generator Display 1. Financial data created by generator 2. Written to Kafka topics 3. Kafka Topics consumed by Spark or Flink 4. Results written back into Kafka stream (another topic) 7. Results displayed
  • 81. © 2018 Mesosphere, Inc. All Rights Reserved. 81 Install Apache Flink & Kafka
  • 82. © 2018 Mesosphere, Inc. All Rights Reserved. 82 Deploy Flink Job https://s3-eu-west-1.amazonaws.com/downloads.mesosphere.com/flink/flink-job-1.0.jar
  • 83. © 2018 Mesosphere, Inc. All Rights Reserved. 83 Deploy Microservices https://s3-eu-west-1.amazonaws.com/downloads.mesosphere.com/flink/flink-job-1.0.jar
  • 84. © 2018 Mesosphere, Inc. All Rights Reserved. 84 Deploy Microservices # Deploy Display $ kubectl apply -f https://raw.githubusercontent.com/dcos-labs/dcos-kubernetes- workshop/master/flinkDemo/flink-demo-actor.yaml # Deploy Generator $ kubectl apply -f https://raw.githubusercontent.com/dcos-labs/dcos-kubernetes- workshop/master/flinkDemo/flink-demo-generator.yaml $ kubectl get pods $ kubectl logs flink-demo-actor-655890656-8d1ls
  • 85. © 2017 Mesosphere, Inc. All Rights Reserved. 85 Future and Feedback
  • 86. © 2017 Mesosphere, Inc. All Rights Reserved. DC/OS Kubernetes Roadmap Beta ● Simple provisioning ● TLS Throughout (EE) ● Monitoring Dashboards & Alerts ● Add kubelet’s to the cluster GA ● Edge-LB Integration ● Tunnel-less kubectl ● Rolling upgrades ● Internal DNS (DC/OS and K8S) ● OSS (?) Sept ‘17 Future Future ● Hybrid-Cloud ● DC/OS Secrets ● Central Logging ● DC/OS Storage ● Disaster Recovery ● Identity Provider integration Feb ‘18
  • 87. © 2018 Mesosphere, Inc. All Rights Reserved. Feedback... ● DC/OS Kubernetes package ● What do you need? ● What challenges are you experiencing? ● Workshop ● How can we improve? 87
  • 88. © 2017 Mesosphere, Inc. All Rights Reserved. 88 THANK YOU! ANY QUESTIONS? @dcos users@dcos.io /groups/8295652 /dcos /dcos/examples /dcos/demos chat.dcos.io https://github.com/mesosphere/dcos-kubernetes-quickstart https://mesosphere.com/blog/another-kubernetes-service/
  • 89. © 2017 Mesosphere, Inc. All Rights Reserved. 89 Container Best Practices
  • 90. © 2017 Mesosphere, Inc. All Rights Reserved. Immutable Container Images
  • 91. © 2017 Mesosphere, Inc. All Rights Reserved. Dockerhub works great for our test cluster… Private Container Registries
  • 92. © 2017 Mesosphere, Inc. All Rights Reserved. Repeatable Container Builds `docker commit` is great*…
  • 93. © 2017 Mesosphere, Inc. All Rights Reserved. 93 Write Once Run Any Where The (Java) container was running fine in testing… …