SlideShare a Scribd company logo
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Why use an orchestrator
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Application Anatomy
Application Server
Database
Web Server
Login Service Photo Upload
Like Service Comment Service
Profile Service Logging Service
Photo Processing Friend Requests
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Redesign Image Sharing App
Microservice 1 Microservice 2 Microservice
n
Team 1 Team 2 Team n
…
DB1 …
DB2 DBn
Web front End iOS App Android App
API Service
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Autonomous
• Microservice can be upgraded independent of other systems
• Microservice can iterate as quickly as it needs
• Polyglot application stacks (Technology Heterogenity)
• Other microservices are black boxes to other services
• Service can be used by other projects in the organization
Advantages of Microservices
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Using docker CLI is all well and good as a developer..
But you’re probably not going to manage production like this…
Host / VM 2
Linux Kernel
Docker Engine
Container
$ssh host1
host1# docker run container
$ssh host2
host2# docker run container
$ssh host3
host3# docker run container
Host / VM 3
Linux Kernel
Docker Engine
Container
Host / VM 1
Linux Kernel
Docker Engine
Container
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Container Container
Container
Kubernetes
Load Balancing
Health Checks Log Aggregation / Access
Developer API
Container orchestration is a must.
$kubectl scale deployment <name> --replicas=3
Once you’ve built your containers and pushed them. Container Orchestrators manage running
containers across a pool of resources for you
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Docker Swarm / EE
• Apache Marathon
• Rancher (seem to be moving towards k8s)
What are other orchestrators?
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
What is kubernetes?
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Container Orchestration
• Keeping your containers up, scaling them, routing traffic to them
• Kubernetes != Docker though K8S uses Docker (or CoreOS rkt)
What is Kubernetes?
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• MiniKube (local workstation)
• Installers (on-prem, hybrid, custom)
• Kops (part of core kubernetes.io github)
• Kubespray (Ansible + Terraform)
• Etc, etc…
• Cloud
• Google Container Engine (GKE J)
• Azure Container Service
• Amazon EKS
• Etc…
Installation options
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Step-by-step tutorial of how to assemble a kubernetes cluster
• https://github.com/kelseyhightower/kubernetes-the-hard-way
Sidebar: K8S the hard way
Source: http://x-team.com/2016/07/introduction-kubernetes-architecture/
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Kubernetes Components
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Kubernetes main Features
Pods Deployments Services Ingress
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Group of one or more containers, shared storage, and options for
how to run the containers
• Share IP address and port space
• Atomic unit of management
Pods
Source: http://kubernetes.io/docs/user-guide/pods/
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Rolling upgrades
• Declare intent: How many replicas should be running of a given
pod?
• Namespace
• Labels
• Ports that should be exposed
Deployments
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Abstraction for the mortality of Pods
• Provide single stable name and address for a set of pods inside the
cluster (aka service discovery).
Services
Source: http://kubernetes.io/docs/user-guide/services/
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Abstraction for services
• An Ingress is a set of rules for directing inbound traffic to a service.
• An Ingress Controller is a service that listens for the creation of new
services and does reverse proxy (nginx, traefik, f5 loadbalancer)
Ingress
See: http://kubernetes.io/docs/user-guide/ingress/
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
K8S templates: deployment
# k8s/dev/api-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rest-api-swagger
spec:
replicas: 2
template:
metadata:
labels:
app: rest-api-swagger
spec:
containers:
- name: rest-api-swagger
image: ciscodevnet/rest-api-swagger:latest
ports:
- containerPort: 10010
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
K8S templates: service
# k8s/services/api-service-lb.yaml
kind: Service
apiVersion: v1
metadata:
name: rest-api-swagger
spec:
type: LoadBalancer # or NodePort, etc.
ports:
- name: http
port: 8080
targetPort: 10010
protocol: TCP
selector:
app: rest-api-swagger
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Manual kubectl deployment
$ kubectl apply -f k8s/dev/api-deployment.yaml
$ kubectl apply -f k8s/services/api-service-lb.yaml
$ kubectl describe deployment
$ kubectl describe service rest-api-swagger
$ kubectl delete -f k8s/dev/api-deployment.yaml
$ kubectl delete -f k8s/services/api-service-lb.yaml

More Related Content

Similar to introduction to kubernetes slide deck by Roach (20)

PPTX
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
PPTX
Kubernetes 101
Huy Vo
 
PDF
Kubernetes
Diego Pacheco
 
PPTX
Kubernetes 101
Vishwas N
 
PDF
From Containerized Application to Secure and Scaling With Kubernetes
Shikha Srivastava
 
PDF
Kubernetes for the PHP developer
Paul Czarkowski
 
PDF
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Amazon Web Services Korea
 
PPTX
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
PPTX
Devoxx 2016 - Docker Nuts and Bolts
Patrick Chanezon
 
PPTX
Microservices with containers in the cloud
Eugene Fedorenko
 
PDF
Kubernetes for Java developers
Robert Barr
 
PDF
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
Docker-Hanoi
 
PPTX
kubernetesforbeginners.pptx
BaskarKannanK
 
PPTX
Episode 1: Building Kubernetes-as-a-Service
Mesosphere Inc.
 
PPTX
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
PPTX
Container orchestration and microservices world
Karol Chrapek
 
PDF
Kubernetes intro
Pravin Magdum
 
PDF
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
PPTX
Introducing Cloud Development with Mantl
Cisco DevNet
 
PDF
Introducing Cloud Development with Project Shipped and Mantl: a deep dive
Cisco DevNet
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
Kubernetes 101
Huy Vo
 
Kubernetes
Diego Pacheco
 
Kubernetes 101
Vishwas N
 
From Containerized Application to Secure and Scaling With Kubernetes
Shikha Srivastava
 
Kubernetes for the PHP developer
Paul Czarkowski
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Amazon Web Services Korea
 
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Devoxx 2016 - Docker Nuts and Bolts
Patrick Chanezon
 
Microservices with containers in the cloud
Eugene Fedorenko
 
Kubernetes for Java developers
Robert Barr
 
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
Docker-Hanoi
 
kubernetesforbeginners.pptx
BaskarKannanK
 
Episode 1: Building Kubernetes-as-a-Service
Mesosphere Inc.
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
Container orchestration and microservices world
Karol Chrapek
 
Kubernetes intro
Pravin Magdum
 
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
Introducing Cloud Development with Mantl
Cisco DevNet
 
Introducing Cloud Development with Project Shipped and Mantl: a deep dive
Cisco DevNet
 

Recently uploaded (20)

PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Dimensions of Societal Planning in Commonism
StefanMz
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Horarios de distribución de agua en julio
pegazohn1978
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Ad

introduction to kubernetes slide deck by Roach

  • 1. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Why use an orchestrator
  • 2. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Application Anatomy Application Server Database Web Server Login Service Photo Upload Like Service Comment Service Profile Service Logging Service Photo Processing Friend Requests
  • 3. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Redesign Image Sharing App Microservice 1 Microservice 2 Microservice n Team 1 Team 2 Team n … DB1 … DB2 DBn Web front End iOS App Android App API Service
  • 4. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Autonomous • Microservice can be upgraded independent of other systems • Microservice can iterate as quickly as it needs • Polyglot application stacks (Technology Heterogenity) • Other microservices are black boxes to other services • Service can be used by other projects in the organization Advantages of Microservices
  • 5. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Using docker CLI is all well and good as a developer.. But you’re probably not going to manage production like this… Host / VM 2 Linux Kernel Docker Engine Container $ssh host1 host1# docker run container $ssh host2 host2# docker run container $ssh host3 host3# docker run container Host / VM 3 Linux Kernel Docker Engine Container Host / VM 1 Linux Kernel Docker Engine Container
  • 6. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Container Container Container Kubernetes Load Balancing Health Checks Log Aggregation / Access Developer API Container orchestration is a must. $kubectl scale deployment <name> --replicas=3 Once you’ve built your containers and pushed them. Container Orchestrators manage running containers across a pool of resources for you
  • 7. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Docker Swarm / EE • Apache Marathon • Rancher (seem to be moving towards k8s) What are other orchestrators?
  • 8. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public What is kubernetes?
  • 9. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Container Orchestration • Keeping your containers up, scaling them, routing traffic to them • Kubernetes != Docker though K8S uses Docker (or CoreOS rkt) What is Kubernetes?
  • 10. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • MiniKube (local workstation) • Installers (on-prem, hybrid, custom) • Kops (part of core kubernetes.io github) • Kubespray (Ansible + Terraform) • Etc, etc… • Cloud • Google Container Engine (GKE J) • Azure Container Service • Amazon EKS • Etc… Installation options
  • 11. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Step-by-step tutorial of how to assemble a kubernetes cluster • https://github.com/kelseyhightower/kubernetes-the-hard-way Sidebar: K8S the hard way
  • 13. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Kubernetes Components
  • 14. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Kubernetes main Features Pods Deployments Services Ingress
  • 15. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Group of one or more containers, shared storage, and options for how to run the containers • Share IP address and port space • Atomic unit of management Pods Source: http://kubernetes.io/docs/user-guide/pods/
  • 16. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Rolling upgrades • Declare intent: How many replicas should be running of a given pod? • Namespace • Labels • Ports that should be exposed Deployments
  • 17. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Abstraction for the mortality of Pods • Provide single stable name and address for a set of pods inside the cluster (aka service discovery). Services Source: http://kubernetes.io/docs/user-guide/services/
  • 18. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public • Abstraction for services • An Ingress is a set of rules for directing inbound traffic to a service. • An Ingress Controller is a service that listens for the creation of new services and does reverse proxy (nginx, traefik, f5 loadbalancer) Ingress See: http://kubernetes.io/docs/user-guide/ingress/
  • 19. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public K8S templates: deployment # k8s/dev/api-deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: name: rest-api-swagger spec: replicas: 2 template: metadata: labels: app: rest-api-swagger spec: containers: - name: rest-api-swagger image: ciscodevnet/rest-api-swagger:latest ports: - containerPort: 10010
  • 20. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public K8S templates: service # k8s/services/api-service-lb.yaml kind: Service apiVersion: v1 metadata: name: rest-api-swagger spec: type: LoadBalancer # or NodePort, etc. ports: - name: http port: 8080 targetPort: 10010 protocol: TCP selector: app: rest-api-swagger
  • 21. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public Manual kubectl deployment $ kubectl apply -f k8s/dev/api-deployment.yaml $ kubectl apply -f k8s/services/api-service-lb.yaml $ kubectl describe deployment $ kubectl describe service rest-api-swagger $ kubectl delete -f k8s/dev/api-deployment.yaml $ kubectl delete -f k8s/services/api-service-lb.yaml