SlideShare a Scribd company logo
How to install and use
Kubernetes
Luke Marsden, Developer Experience
@lmarsden
What does Weave do?
Weave helps devops
iterate faster with:
• observability &
monitoring
• continuous delivery
• container networks
& firewalls
Kubernetes is our #1
platform
Agenda
1. Concepts
2. Containers, Pods, Deployments, Services
3. Installing Kubernetes
4. Demos of Pods, Deployments, Services
5. Microservices sample app
6. What’s next?
Kubernetes: all you need to know
Pods
containers
Services
Deployments
Concepts
Computer
Concepts
Node
Concepts
nginx Container
image: nginx:1.7.9
Node
web
Concepts
nginx Container
Pod
logger
Node
web
Concepts
nginx Container
Pod
logger
IP addr
Node
web
Concepts
Podnginx
apiVersion: v1
kind: Pod
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
Node
Recap: all you need to know
Pods
containers
Container
Image
Docker container image, contains your application code in an isolated
environment.
Pod A set of containers, sharing network namespace and local volumes,
co-scheduled on one machine. Mortal. Has pod IP. Has labels.
Motivation for Deployments
Node 1
Pod
web
nginx
Node 2
Motivation for Deployments
Pod
web
nginx
Node 1 Node 2
Motivation for Deployments
Pod
web
nginx
Node 1 Node 2
Deployment
web
nginx
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
Node 1
Deployment
web
nginx
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
Node 1
Deployment
web
nginx
Node 1 Node 2
Deployment
web
nginx
Node 1 Node 2
Deployment
web
nginx
Node 1 Node 2
Deployment
web
nginx
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
Node 1
Deployment
web
nginx
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
Node 1
Deployment
web
nginx
web
nginx
Node 1 Node 2
Recap: all you need to know
Pods
containers
Deployments
Container
Image
Docker container image, contains your application code in an isolated
environment.
Pod A set of containers, sharing network namespace and local volumes,
co-scheduled on one machine. Mortal. Has pod IP. Has labels.
Deployment Specify how many replicas of a pod should run in a cluster. Then
ensures that many are running across the cluster.
Service discovery
• Kubernetes provides DNS for service
discovery
Service discovery
• Kubernetes provides DNS for service
discovery
WAIT! You said “service”.
What is a service?
Services: ClusterIP (internal things)
Computer 1
web
ruby
Computer 2
10.0.0.1
db
pgsql
10.0.0.2
service VIP
10.1.0.1DNS lookup “db”
returns A 10.1.0.1
Services: ClusterIP (internal things)
Computer 1
web
ruby
Computer 2
10.0.0.1
db
pgsql
10.0.0.2
service VIP
10.1.0.1
Services: NodePort (external)
Computer 1
web
nginx
web
nginx
10.0.0.1 10.0.0.2
81.23.64.18 81.23.64.19
requests requests
Computer 2
Computer 1
web
nginx
web
nginx
10.0.0.1 10.0.0.2
81.23.64.18 81.23.64.19
requests requests
Computer 2
Services: NodePort (external)
NodePort 30001
service VIP
10.1.0.1
NodePort 30001
service VIP
10.1.0.1
Computer 1
web
nginx
web
nginx
10.0.0.1 10.0.0.2
81.23.64.18 81.23.64.19
requests requests
Computer 2
Services: NodePort (external)
NodePort 30001
service VIP
10.1.0.1
NodePort 30001
service VIP
10.1.0.1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
kind: Service
metadata:
name: frontend
spec:
type: NodePort
selector:
app: nginx
ports:
- port: 80
targetPort: 80
nodePort: 30002
Using selectors
How do services connect to deployments?
matches
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
kind: Service
metadata:
name: frontend
spec:
type: NodePort
selector:
app: nginx
ports:
- port: 80
targetPort: 80
nodePort: 30002
How do you expose services to outside?
Using NodePort
Recap: all you need to know
Pods
containers
ServicesDeployments
Container
Image
Docker container image, contains your application code in an isolated
environment.
Pod A set of containers, sharing network namespace and local volumes,
co-scheduled on one machine. Mortal. Has pod IP. Has labels.
Deployment Specify how many replicas of a pod should run in a cluster. Then
ensures that many are running across the cluster. Has labels.
Service Names things in DNS. Gets virtual IP. Two types: ClusterIP for internal
services, NodePort for publishing to outside. Routes based on labels.
Architecture of Kubernetes itself
Node 1 Node 2
Master
API server
Architecture of Kubernetes itself
Node 1 Node 2
Master
API server etcd
kubeadm init
API server
Architecture of Kubernetes itself
Node 1 Node 2
Master
API server etcd
kubeadm init
kubeadm join
kubelet
API server
Architecture of Kubernetes itself
Node 1 Node 2
Master
API server etcd
kubeadm init
kubeadm join kubeadm join
kubelet kubelet
API server
Architecture of Kubernetes itself
Node 1 Node 2
Master
API server etcd
kubeadm init
kubeadm join kubeadm join
kubelet kubelet
kubectl apply
API server
Architecture of Kubernetes itself
Node 1 Node 2
Master
containers
Services
containers
API server etcd
kubeadm init
kubeadm join kubeadm join
kubectl apply
kubelet kubelet
Training!
Join the Weave user group!
meetup.com/pro/Weave/
weave.works/help
What’s next?
• Continuous delivery: hooking up my CI/CD
pipeline to Kubernetes
• How do I monitor this stuff?
• Network policy for security
Come to our Weave Cloud training to find out!
Thanks! Questions?
We are hiring!
DX in San Francisco
Engineers in London & SF
weave.works/weave-company/hiring

More Related Content

What's hot (20)

PDF
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
Ambassador Labs
 
PDF
Docker for Ops - Scott Coulton, Puppet
Docker, Inc.
 
PDF
Kubernetes networking in AWS
Zvika Gazit
 
PDF
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
PDF
Docker {at,with} SignalFx
Maxime Petazzoni
 
PDF
How to build a Neutron Plugin (stadium edition)
Salvatore Orlando
 
PPTX
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
Docker, Inc.
 
PDF
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Thomas Graf
 
PDF
Istio presentation jhug
Georgios Andrianakis
 
PPTX
An Open-Source Platform to Connect, Manage, and Secure Microservices
DoiT International
 
PDF
Jenkins & IaC
HungWei Chiu
 
PDF
Infinit's Next Generation Key-value Store - Julien Quintard and Quentin Hocqu...
Docker, Inc.
 
PDF
Docker Enterprise Edition: Building a Secure Supply Chain for the Enterprise ...
Docker, Inc.
 
PDF
Docker and Maestro for fun, development and profit
Maxime Petazzoni
 
PPTX
Cloud Networking - Leaving the Physical Behind - Omer Anson - OpenStack Day I...
Cloud Native Day Tel Aviv
 
PPTX
Can you trust Neutron?
salv_orlando
 
PDF
Empower Your Docker Containers with Watson - DockerCon 2017 Austin
Phil Estes
 
PDF
Getting Deep on Orchestration: APIs, Actors, and Abstractions in a Distribute...
Docker, Inc.
 
PPTX
Kubernetes101 - Pune Kubernetes Meetup 6
Harshal Shah
 
PDF
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
Ambassador Labs
 
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
Ambassador Labs
 
Docker for Ops - Scott Coulton, Puppet
Docker, Inc.
 
Kubernetes networking in AWS
Zvika Gazit
 
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
Docker {at,with} SignalFx
Maxime Petazzoni
 
How to build a Neutron Plugin (stadium edition)
Salvatore Orlando
 
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
Docker, Inc.
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Thomas Graf
 
Istio presentation jhug
Georgios Andrianakis
 
An Open-Source Platform to Connect, Manage, and Secure Microservices
DoiT International
 
Jenkins & IaC
HungWei Chiu
 
Infinit's Next Generation Key-value Store - Julien Quintard and Quentin Hocqu...
Docker, Inc.
 
Docker Enterprise Edition: Building a Secure Supply Chain for the Enterprise ...
Docker, Inc.
 
Docker and Maestro for fun, development and profit
Maxime Petazzoni
 
Cloud Networking - Leaving the Physical Behind - Omer Anson - OpenStack Day I...
Cloud Native Day Tel Aviv
 
Can you trust Neutron?
salv_orlando
 
Empower Your Docker Containers with Watson - DockerCon 2017 Austin
Phil Estes
 
Getting Deep on Orchestration: APIs, Actors, and Abstractions in a Distribute...
Docker, Inc.
 
Kubernetes101 - Pune Kubernetes Meetup 6
Harshal Shah
 
2017 Microservices Practitioner Virtual Summit: The Mechanics of Deploying En...
Ambassador Labs
 

Similar to How to install and use Kubernetes (20)

PDF
Orchestrating Microservices with Kubernetes
Weaveworks
 
PDF
Kubernetes for Beginners
DigitalOcean
 
PPTX
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
PDF
Kubernetes Intro
Antonio Ojea Garcia
 
PPTX
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
PPTX
An Introduction to Kubernetes and Continuous Delivery Fundamentals
All Things Open
 
PDF
Scaling docker with kubernetes
Liran Cohen
 
PPTX
Introduction kubernetes 2017_12_24
Sam Zheng
 
PPTX
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
PDF
Introduction to kubernetes
Raffaele Di Fazio
 
PDF
Getting started with kubernetes
Bob Killen
 
PPTX
Kubernetes
Lhouceine OUHAMZA
 
PDF
Kubernetes overview and Exploitation
OWASPSeasides
 
PPTX
Kubernetes overview 101
Boskey Savla
 
PDF
prodops.io k8s presentation
Prodops.io
 
PPTX
Container Orchestration using Kubernetes
Hesham Amin
 
PDF
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
PPTX
Kubernetes Introduction
Eric Gustafson
 
PDF
Kubernetes for the PHP developer
Paul Czarkowski
 
PDF
Kubernetes hands-on tutorial slides by zm
ZiyanMaraikar1
 
Orchestrating Microservices with Kubernetes
Weaveworks
 
Kubernetes for Beginners
DigitalOcean
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
Kubernetes Intro
Antonio Ojea Garcia
 
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
An Introduction to Kubernetes and Continuous Delivery Fundamentals
All Things Open
 
Scaling docker with kubernetes
Liran Cohen
 
Introduction kubernetes 2017_12_24
Sam Zheng
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
Introduction to kubernetes
Raffaele Di Fazio
 
Getting started with kubernetes
Bob Killen
 
Kubernetes
Lhouceine OUHAMZA
 
Kubernetes overview and Exploitation
OWASPSeasides
 
Kubernetes overview 101
Boskey Savla
 
prodops.io k8s presentation
Prodops.io
 
Container Orchestration using Kubernetes
Hesham Amin
 
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
Kubernetes Introduction
Eric Gustafson
 
Kubernetes for the PHP developer
Paul Czarkowski
 
Kubernetes hands-on tutorial slides by zm
ZiyanMaraikar1
 
Ad

More from Luke Marsden (6)

PDF
Inextricably linked: reproducibility and productivity in data science and AI
Luke Marsden
 
PDF
Monitoring your App in Kubernetes with Prometheus
Luke Marsden
 
PDF
Continuous Delivery the hard way with Kubernetes
Luke Marsden
 
PDF
Istio Service Mesh
Luke Marsden
 
PDF
Docs at Weaveworks: DX from open source to SaaS and beyond
Luke Marsden
 
PPTX
Data focused docker clustering
Luke Marsden
 
Inextricably linked: reproducibility and productivity in data science and AI
Luke Marsden
 
Monitoring your App in Kubernetes with Prometheus
Luke Marsden
 
Continuous Delivery the hard way with Kubernetes
Luke Marsden
 
Istio Service Mesh
Luke Marsden
 
Docs at Weaveworks: DX from open source to SaaS and beyond
Luke Marsden
 
Data focused docker clustering
Luke Marsden
 
Ad

Recently uploaded (20)

PDF
BRKAPP-1102 - Proactive Network and Application Monitoring.pdf
fcesargonca
 
PPTX
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
DOCX
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
PDF
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
PPTX
PHIPA-Compliant Web Hosting in Toronto: What Healthcare Providers Must Know
steve198109
 
PDF
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
PPTX
Metaphysics_Presentation_With_Visuals.pptx
erikjohnsales1
 
PPTX
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
PDF
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
PPTX
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
PDF
The Internet - By the numbers, presented at npNOG 11
APNIC
 
PPTX
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PDF
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
PPTX
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PDF
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 
PDF
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
PPTX
Networking_Essentials_version_3.0_-_Module_5.pptx
ryan622010
 
PPTX
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
PDF
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 
BRKAPP-1102 - Proactive Network and Application Monitoring.pdf
fcesargonca
 
Networking_Essentials_version_3.0_-_Module_3.pptx
ryan622010
 
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
Boardroom AI: The Next 10 Moves | Cerebraix Talent Tech
ssuser73bdb11
 
PHIPA-Compliant Web Hosting in Toronto: What Healthcare Providers Must Know
steve198109
 
Digital burnout toolkit for youth workers and teachers
asociatiastart123
 
Metaphysics_Presentation_With_Visuals.pptx
erikjohnsales1
 
西班牙巴利阿里群岛大学电子版毕业证{UIBLetterUIB文凭证书}文凭复刻
Taqyea
 
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
Softuni - Psychology of entrepreneurship
Kalin Karakehayov
 
The Internet - By the numbers, presented at npNOG 11
APNIC
 
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
Top 10 Testing Procedures to Ensure Your Magento to Shopify Migration Success...
CartCoders
 
BRKSP-2551 - Introduction to Segment Routing.pdf
fcesargonca
 
Networking_Essentials_version_3.0_-_Module_5.pptx
ryan622010
 
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
FutureCon Seattle 2025 Presentation Slides - You Had One Job
Suzanne Aldrich
 

How to install and use Kubernetes