Migrating Swarm Applications
to Kubernetes
Janakiram MSV
Analyst | Advisor | Architect
Janakiram & Associates
Google Developer Expert
Joseph Jacks
Sr. Director
Apprenda
Founder, KubeCon
Announcing
The Kubernetes Webinar Series
● Monthly webinar focused on helping you get started with Kubernetes
● Delivered by the experts from the container ecosystem
● Each webinar introduces a concept to accelerate your learning
● No specific prerequisites
○ Basic understanding of Docker will help
● All attendees will get $100 Google Cloud Platform Credits
● Win free annual and monthly subscriptions of MAPT eBook library
● The recording of this webinar will be available at Kubernetes.live
Objectives
● Overview of Swarm-Mode
● Exploring the Reference Application Architecture
● Mapping Swarm Deployment to Kubernetes
● Scaling and Optimizing Application
Overview of Swarm Mode
● Swarm mode brings cluster management and orchestration to Docker
Engine
● Bundled with Docker Engine 1.12 or above - Based on Swarmkit
● Swarm mode is initialized in one of the nodes, which becomes the
manager
● Worker nodes join an existing Swarm controller
● Docker CLI is used for managing the cluster including adding and
removing nodes
Key Concepts of Swarm Mode
● Manager Node
○ Dispatches the submitted tasks to worker nodes
● Worker Node
○ Receive and execute tasks dispatched from manager nodes
● Service
○ Definition of tasks to execute on worker nodes
● Task
○ Carries a Docker container and the commands to run inside the container
● Load balancing
○ Manager node uses ingress load balancing to expose the services
Swarm Mode Architecture
Swarm Mode Architecture
Overview of Sample Deployment
● API Management service based on open source Kong
● PostgreSQL is used as the persistent backend
● Nginx is acting as the API proxy
● Node.js based Dashboard to manage APIs
● Each component is packaged as a Docker container
PostgreSQLKongDashboard
Demo
Deploying Microservices in Swarm Mode
Quick Recap - Kubernetes Architecture
Deployment
Master
kube-p
roxyDocker kubelet
Supervisord
fluentd
Web Pod
Node
DB Pod
Deployment
Web
DB
Mapping Swarm Concepts to Kubernetes
● Manager Node
● Worker Node
● Service
● Task
● Replicas
● DNS-based Service Discovery
● Ingress
● PublishedPort
● Volumes
● Overlay Network
Swarm Mode
● Master
● Node
● Deployment
● Pod
● Replica Set
● DNS-based Service Discovery
● Service
● Endpoint
● Persisted Volumes
● Flat Networking space
Kubernetes
Mapping Swarm Concepts to Kubernetes
Swarm Kubernetes
Controller Manager Master
Slave Worker Nodes
Workload Definition Service Deployment
Deployment Unit Task Pod
Scale-out Definition Replicas Replica Set
Service Discovery DNS DNS
Load Balancing Ingress Service
Port PublishedPort Endpoint
Storage Volumes Persistent Volumes / Claims
Network Overlay Flat Networking Space
Demo
Migrating the Application to Kubernetes
Thank You!
Send your Feedback / Questions / Comments
jani@janakiram.com

Swarm migration

  • 1.
    Migrating Swarm Applications toKubernetes Janakiram MSV Analyst | Advisor | Architect Janakiram & Associates Google Developer Expert Joseph Jacks Sr. Director Apprenda Founder, KubeCon
  • 2.
    Announcing The Kubernetes WebinarSeries ● Monthly webinar focused on helping you get started with Kubernetes ● Delivered by the experts from the container ecosystem ● Each webinar introduces a concept to accelerate your learning ● No specific prerequisites ○ Basic understanding of Docker will help ● All attendees will get $100 Google Cloud Platform Credits ● Win free annual and monthly subscriptions of MAPT eBook library ● The recording of this webinar will be available at Kubernetes.live
  • 3.
    Objectives ● Overview ofSwarm-Mode ● Exploring the Reference Application Architecture ● Mapping Swarm Deployment to Kubernetes ● Scaling and Optimizing Application
  • 4.
    Overview of SwarmMode ● Swarm mode brings cluster management and orchestration to Docker Engine ● Bundled with Docker Engine 1.12 or above - Based on Swarmkit ● Swarm mode is initialized in one of the nodes, which becomes the manager ● Worker nodes join an existing Swarm controller ● Docker CLI is used for managing the cluster including adding and removing nodes
  • 5.
    Key Concepts ofSwarm Mode ● Manager Node ○ Dispatches the submitted tasks to worker nodes ● Worker Node ○ Receive and execute tasks dispatched from manager nodes ● Service ○ Definition of tasks to execute on worker nodes ● Task ○ Carries a Docker container and the commands to run inside the container ● Load balancing ○ Manager node uses ingress load balancing to expose the services
  • 6.
  • 7.
  • 8.
    Overview of SampleDeployment ● API Management service based on open source Kong ● PostgreSQL is used as the persistent backend ● Nginx is acting as the API proxy ● Node.js based Dashboard to manage APIs ● Each component is packaged as a Docker container PostgreSQLKongDashboard
  • 9.
  • 10.
    Quick Recap -Kubernetes Architecture Deployment Master kube-p roxyDocker kubelet Supervisord fluentd Web Pod Node DB Pod Deployment Web DB
  • 11.
    Mapping Swarm Conceptsto Kubernetes ● Manager Node ● Worker Node ● Service ● Task ● Replicas ● DNS-based Service Discovery ● Ingress ● PublishedPort ● Volumes ● Overlay Network Swarm Mode ● Master ● Node ● Deployment ● Pod ● Replica Set ● DNS-based Service Discovery ● Service ● Endpoint ● Persisted Volumes ● Flat Networking space Kubernetes
  • 12.
    Mapping Swarm Conceptsto Kubernetes Swarm Kubernetes Controller Manager Master Slave Worker Nodes Workload Definition Service Deployment Deployment Unit Task Pod Scale-out Definition Replicas Replica Set Service Discovery DNS DNS Load Balancing Ingress Service Port PublishedPort Endpoint Storage Volumes Persistent Volumes / Claims Network Overlay Flat Networking Space
  • 13.
  • 14.
    Thank You! Send yourFeedback / Questions / Comments jani@janakiram.com