SlideShare a Scribd company logo
Container Orchestration
With Docker Swarm and Kubernetes
Will Hall
DevOps and Digital Architect
Container Orchestration
Orchestration probably exists to do two main things:
1. Resource Utilization
2. Scaling/healing
Provisioning, deployment and
integration between containers.
Orchestration Systems
There are a number of ways to do orchestration:
1. Kubernetes
2. Docker Swarm
3. Mesos
4. Nomad
5. Amazon ECS
Managing your platform as a cluster
You have a number of machines, they theoretically can act as 1 total machine (and you
add/remove nodes as the workload determines).
Kubernetes
Pros:
● Large, healthy ecosystem
● PaaS provided by GCP, Amazon, Azure, DigitalOcean
● Future of software delivery??
Cons:
● Complex management
● New tooling
Docker Swarm
Pros:
● Simple setup
● Simpler management (than Kubernetes)
Cons:
● No PaaS (Docker Enterprise?)
● Scale issues
● Vendor support
Amazon ECS
Pros:
● PaaS
● Integration with Amazon toolsets
Cons:
● Vendor lock-in
● Limited community support
Here is where I hit you
with an orchestration
dictionary
Docker Swarm
Docker Swarm Terms: Swarm and Service
Swarm. Like a cluster in Kubernetes, a swarm is a set of nodes with at least one master
node and several worker nodes that can be virtual or physical machines.
Service. A service is the tasks a manager or agent nodes must perform on the swarm, as
defined by a swarm administrator. A service defines which container images the swarm
should use and which commands the swarm will run in each container. A service in this
context is analogous to a microservice; for example, it’s where you’d define
configuration parameters for an nginx web server running in your swarm. You also
define parameters for replicas in the service definition.
Docker Swarm Terms: Manager, Worker and
Task
Manager node. When you deploy an application into a swarm, the manager node provides several functions: it
delivers work (in the form of tasks) to worker nodes, and it also manages the state of the swarm to which it
belongs. The manager node can run the same services worker nodes do, but you can also configure them to only
run manager node-related services.
Worker nodes. These nodes run tasks distributed by the manager node in the swarm. Each worker node runs an
agent that reports back to the master node about the state of the tasks assigned to it, so the manager node can
keep track of services and tasks running in the swarm.
Task. Tasks are Docker containers that execute the commands you defined in the service. Manager nodes assign
tasks to worker nodes, and after this assignment, the task cannot be moved to another worker. If the task fails in
a replica set, the manager will assign a new version of that task to another available node in the swarm.
Docker Swarm Tools: Docker/Docker
Compose
If you can use Docker and Docker Compose, you can deploy and manage things inside
Docker Swarm. It is the same toolset!
Let’s play
You can come back and look at these some other time.
https://play-with-docker.com
Kubernetes
Kubernetes Terms: Master and Kubelet
Kubernetes master. The master manages the scheduling and deployment of
application instances across nodes, and the full set of services the master node runs is
known as the control plane. The master communicates with nodes through the
Kubernetes API server. The scheduler assigns nodes to pods (one or more containers)
depending on the resource and policy constraints you’ve defined.
Kubelet. Each Kubernetes node runs an agent process called a kubelet that’s
responsible for managing the state of the node: starting, stopping, and maintaining
application containers based on instructions from the control plane. A kubelet receives
all of its information from the Kubernetes API server.
Kubernetes Terms: Pods and Deployments...
Pods. The basic scheduling unit, which consists of one or more containers guaranteed
to be co-located on the host machine and able to share resources. Each pod is assigned
a unique IP address within the cluster, allowing the application to use ports without
conflict. You describe the desired state of the containers in a pod through a YAML or
JSON object called a PodSpec. These objects are passed to the kubelet through the API
server
Deployments, replicas, and ReplicaSets. A deployment is a YAML object that defines
the pods and the number of container instances, called replicas, for each pod. You
define the number of replicas you want to have running in the cluster via a ReplicaSet,
which is part of the deployment object.
Kubernetes Tools: kubeadm/kubectl
You use kubeadm to administer your Kubernetes cluster
You can use kubectl to deploy applications, inspect and manage cluster resources, and
view logs.
Kubernetes Tools: Networking
Networking is a central part of Kubernetes, but it can be challenging to understand
exactly how it is expected to work. There are 4 distinct networking problems to
address:
1. Highly-coupled container-to-container communications
2. Pod-to-Pod communications
3. Pod-to-Service communications
4. External-to-Service communications
Kubernetes Tools: Helm
Helm helps you manage Kubernetes applications — Helm Charts help you define,
install, and upgrade even the most complex Kubernetes application.
Helm Charts are easy to create, version, share, and publish — so start using Helm and
stop the copy-and-paste.
Let’s play
You can come back and look at these some other time.
https://play-with-k8s.com
Takeaways
● Orchestration is both efficient and cost-saving
● It can deliver significant scaling and healing potential
● Choose the right solution for your problem

More Related Content

PDF
Kubernetes - introduction
PDF
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
PPTX
Docker and kubernetes
PDF
Aks pimarox from zero to hero
PPTX
AKS - Azure Kubernetes Services - kubernetes meetup may 2018
PDF
Kubernetes Basics
PPTX
Kubernetes Helm: Why It Matters
PDF
Docker Introduction
Kubernetes - introduction
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Docker and kubernetes
Aks pimarox from zero to hero
AKS - Azure Kubernetes Services - kubernetes meetup may 2018
Kubernetes Basics
Kubernetes Helm: Why It Matters
Docker Introduction

What's hot (20)

PPTX
Kubernetes Introduction
PPTX
Kubernetes for Beginners: An Introductory Guide
PDF
(Draft) Kubernetes - A Comprehensive Overview
ODP
Openshift Container Platform
PDF
Open shift 4 infra deep dive
PPTX
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
PDF
Kubernetes Application Deployment with Helm - A beginner Guide!
PPTX
Why to Cloud Native
PDF
Introduction to container based virtualization with docker
PPTX
A brief study on Kubernetes and its components
PDF
Docker in real life
PPTX
Azure kubernetes service (aks)
PDF
Introduction to Docker
PPTX
Introduction to Docker - 2017
PDF
Rancher 2.0 Technical Deep Dive
PDF
Introduction of Kubernetes - Trang Nguyen
PPTX
Docker introduction for the beginners
PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
VMware Tanzu Introduction
Kubernetes Introduction
Kubernetes for Beginners: An Introductory Guide
(Draft) Kubernetes - A Comprehensive Overview
Openshift Container Platform
Open shift 4 infra deep dive
Docker Tutorial For Beginners | What Is Docker And How It Works? | Docker Tut...
Kubernetes Application Deployment with Helm - A beginner Guide!
Why to Cloud Native
Introduction to container based virtualization with docker
A brief study on Kubernetes and its components
Docker in real life
Azure kubernetes service (aks)
Introduction to Docker
Introduction to Docker - 2017
Rancher 2.0 Technical Deep Dive
Introduction of Kubernetes - Trang Nguyen
Docker introduction for the beginners
Hands-On Introduction to Kubernetes at LISA17
VMware Tanzu Introduction
Ad

Similar to Container Orchestration with Docker Swarm and Kubernetes (20)

PDF
Kubernetes Architecture with Components
PPTX
Kubernetes Immersion
PPTX
Docker and kubernetes
PPTX
Introduction to Kubernetes
PDF
Kubernetes Interview Questions PDF By ScholarHat
PPTX
Kubernetes-Fundamentals.pptx
PPTX
KubernetesPPT.pptx
PDF
Getting started with google kubernetes engine
PPTX
Kubernetes
PPTX
Kubernetes #1 intro
PPTX
Containers kuberenetes
PPTX
Containers kuberenetes
PDF
Google Cloud Platform Kubernetes Workshop IYTE
PDF
Containers kuberenetes
PDF
Kubernetes From Scratch .pdf
PPTX
Newesis - Introduction to Containers
PPTX
Kubernetes
PPTX
Kubernetes 101 for Beginners
PDF
What is the Difference Between Kubernetes and Docker?
PPTX
aks_training_document_Azure_kuberne.pptx
Kubernetes Architecture with Components
Kubernetes Immersion
Docker and kubernetes
Introduction to Kubernetes
Kubernetes Interview Questions PDF By ScholarHat
Kubernetes-Fundamentals.pptx
KubernetesPPT.pptx
Getting started with google kubernetes engine
Kubernetes
Kubernetes #1 intro
Containers kuberenetes
Containers kuberenetes
Google Cloud Platform Kubernetes Workshop IYTE
Containers kuberenetes
Kubernetes From Scratch .pdf
Newesis - Introduction to Containers
Kubernetes
Kubernetes 101 for Beginners
What is the Difference Between Kubernetes and Docker?
aks_training_document_Azure_kuberne.pptx
Ad

More from Will Hall (16)

PPTX
Accelerating Infrastructure as Code with CI in AWS.
PPTX
GitLab, AWS and Terraform: The Perfect Combination
PPTX
Front Page of Hacker News with GitLab Pages
PPTX
Solving IoT Hardware Issues With Docker
PPTX
DevSecOps and Drupal: Securing your applications in a modern IT landscape
PPTX
Docker Compose: Docker Configuration for the Real World
PPTX
Docker Command Line, Using and Choosing containers
PPTX
DockerCon Copenhagen,What Happened?!
PPTX
Docker DevTools: Docker as part of your development toolset
ODP
Wordpress Up and Running
ODP
Rules for Fools: The Rules Module
ODP
Things i wish i knew about drupal commerce
PDF
Upgrading migration and moving house
ODP
Drupal 7 migration
ODP
Open Source Content Management Systems for Small and Medium Businesses, Chari...
ODP
Migration to Drupal
Accelerating Infrastructure as Code with CI in AWS.
GitLab, AWS and Terraform: The Perfect Combination
Front Page of Hacker News with GitLab Pages
Solving IoT Hardware Issues With Docker
DevSecOps and Drupal: Securing your applications in a modern IT landscape
Docker Compose: Docker Configuration for the Real World
Docker Command Line, Using and Choosing containers
DockerCon Copenhagen,What Happened?!
Docker DevTools: Docker as part of your development toolset
Wordpress Up and Running
Rules for Fools: The Rules Module
Things i wish i knew about drupal commerce
Upgrading migration and moving house
Drupal 7 migration
Open Source Content Management Systems for Small and Medium Businesses, Chari...
Migration to Drupal

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced IT Governance
PPT
Teaching material agriculture food technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced IT Governance
Teaching material agriculture food technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm

Container Orchestration with Docker Swarm and Kubernetes

  • 1. Container Orchestration With Docker Swarm and Kubernetes Will Hall DevOps and Digital Architect
  • 2. Container Orchestration Orchestration probably exists to do two main things: 1. Resource Utilization 2. Scaling/healing
  • 4. Orchestration Systems There are a number of ways to do orchestration: 1. Kubernetes 2. Docker Swarm 3. Mesos 4. Nomad 5. Amazon ECS
  • 5. Managing your platform as a cluster You have a number of machines, they theoretically can act as 1 total machine (and you add/remove nodes as the workload determines).
  • 6. Kubernetes Pros: ● Large, healthy ecosystem ● PaaS provided by GCP, Amazon, Azure, DigitalOcean ● Future of software delivery?? Cons: ● Complex management ● New tooling
  • 7. Docker Swarm Pros: ● Simple setup ● Simpler management (than Kubernetes) Cons: ● No PaaS (Docker Enterprise?) ● Scale issues ● Vendor support
  • 8. Amazon ECS Pros: ● PaaS ● Integration with Amazon toolsets Cons: ● Vendor lock-in ● Limited community support
  • 9. Here is where I hit you with an orchestration dictionary
  • 11. Docker Swarm Terms: Swarm and Service Swarm. Like a cluster in Kubernetes, a swarm is a set of nodes with at least one master node and several worker nodes that can be virtual or physical machines. Service. A service is the tasks a manager or agent nodes must perform on the swarm, as defined by a swarm administrator. A service defines which container images the swarm should use and which commands the swarm will run in each container. A service in this context is analogous to a microservice; for example, it’s where you’d define configuration parameters for an nginx web server running in your swarm. You also define parameters for replicas in the service definition.
  • 12. Docker Swarm Terms: Manager, Worker and Task Manager node. When you deploy an application into a swarm, the manager node provides several functions: it delivers work (in the form of tasks) to worker nodes, and it also manages the state of the swarm to which it belongs. The manager node can run the same services worker nodes do, but you can also configure them to only run manager node-related services. Worker nodes. These nodes run tasks distributed by the manager node in the swarm. Each worker node runs an agent that reports back to the master node about the state of the tasks assigned to it, so the manager node can keep track of services and tasks running in the swarm. Task. Tasks are Docker containers that execute the commands you defined in the service. Manager nodes assign tasks to worker nodes, and after this assignment, the task cannot be moved to another worker. If the task fails in a replica set, the manager will assign a new version of that task to another available node in the swarm.
  • 13. Docker Swarm Tools: Docker/Docker Compose If you can use Docker and Docker Compose, you can deploy and manage things inside Docker Swarm. It is the same toolset!
  • 14. Let’s play You can come back and look at these some other time. https://play-with-docker.com
  • 16. Kubernetes Terms: Master and Kubelet Kubernetes master. The master manages the scheduling and deployment of application instances across nodes, and the full set of services the master node runs is known as the control plane. The master communicates with nodes through the Kubernetes API server. The scheduler assigns nodes to pods (one or more containers) depending on the resource and policy constraints you’ve defined. Kubelet. Each Kubernetes node runs an agent process called a kubelet that’s responsible for managing the state of the node: starting, stopping, and maintaining application containers based on instructions from the control plane. A kubelet receives all of its information from the Kubernetes API server.
  • 17. Kubernetes Terms: Pods and Deployments... Pods. The basic scheduling unit, which consists of one or more containers guaranteed to be co-located on the host machine and able to share resources. Each pod is assigned a unique IP address within the cluster, allowing the application to use ports without conflict. You describe the desired state of the containers in a pod through a YAML or JSON object called a PodSpec. These objects are passed to the kubelet through the API server Deployments, replicas, and ReplicaSets. A deployment is a YAML object that defines the pods and the number of container instances, called replicas, for each pod. You define the number of replicas you want to have running in the cluster via a ReplicaSet, which is part of the deployment object.
  • 18. Kubernetes Tools: kubeadm/kubectl You use kubeadm to administer your Kubernetes cluster You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
  • 19. Kubernetes Tools: Networking Networking is a central part of Kubernetes, but it can be challenging to understand exactly how it is expected to work. There are 4 distinct networking problems to address: 1. Highly-coupled container-to-container communications 2. Pod-to-Pod communications 3. Pod-to-Service communications 4. External-to-Service communications
  • 20. Kubernetes Tools: Helm Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application. Helm Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste.
  • 21. Let’s play You can come back and look at these some other time. https://play-with-k8s.com
  • 22. Takeaways ● Orchestration is both efficient and cost-saving ● It can deliver significant scaling and healing potential ● Choose the right solution for your problem

Editor's Notes

  • #22: 1. Initializes cluster master node: kubeadm init --apiserver-advertise-address $(hostname -i) 2. Initialize cluster networking: kubectl apply -n kube-system -f \ "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"