SlideShare a Scribd company logo
How to install and use
Kubernetes
Jeff Hoffer, Developer Experience
github.com/eudaimos
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
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?
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

PPTX
Microservices and Best Practices
PDF
Continuous Delivery the Hard Way with Kubernetes
PDF
Orchestrating Microservices with Kubernetes
PDF
Continuous Delivery the hard way with Kubernetes
PPTX
Introduction to the Container Network Interface (CNI)
PPTX
Docker Roadshow 2016
PDF
DockerCon 2017 - General Session Day 1 - Solomon Hykes
PDF
Taking Docker from Local to Production at Intuit JanJaap Lahpor, Intuit and H...
Microservices and Best Practices
Continuous Delivery the Hard Way with Kubernetes
Orchestrating Microservices with Kubernetes
Continuous Delivery the hard way with Kubernetes
Introduction to the Container Network Interface (CNI)
Docker Roadshow 2016
DockerCon 2017 - General Session Day 1 - Solomon Hykes
Taking Docker from Local to Production at Intuit JanJaap Lahpor, Intuit and H...

What's hot (20)

PDF
Online Meetup: Intro to LinuxKit
PPTX
Webinar: High velocity deployment with google cloud and weave cloud
PDF
Docker Enterprise Edition: Building a Secure Supply Chain for the Enterprise ...
PDF
Node.js Rocks in Docker for Dev and Ops
PDF
DockerCon EU 2015: The Latest in Docker Engine
PDF
DCEU 18: Docker Containers in a Serverless World
PPTX
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
PPTX
Running Docker in Production - The Good, the Bad and The Ugly
PDF
Modernizing .NET Apps
PDF
Docker for Ops - Scott Coulton, Puppet
PDF
DockerCon EU 2015: Day 1 General Session
PDF
Docker Online Meetup #22: Docker Networking
PDF
DockerCon EU 2015: Deploying and Managing Containers for Developers
PDF
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
PPTX
Docker Bday #5, SF Edition: Introduction to Docker
PDF
Jenkins & IaC
PDF
DCSF19 How To Build Your Containerization Strategy
PPTX
Oscon 2017: Build your own container-based system with the Moby project
PDF
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
PDF
Production Ready Containers from IBM and Docker
Online Meetup: Intro to LinuxKit
Webinar: High velocity deployment with google cloud and weave cloud
Docker Enterprise Edition: Building a Secure Supply Chain for the Enterprise ...
Node.js Rocks in Docker for Dev and Ops
DockerCon EU 2015: The Latest in Docker Engine
DCEU 18: Docker Containers in a Serverless World
DockerCon EU 2015: The Missing Piece: when Docker networking unleashing soft ...
Running Docker in Production - The Good, the Bad and The Ugly
Modernizing .NET Apps
Docker for Ops - Scott Coulton, Puppet
DockerCon EU 2015: Day 1 General Session
Docker Online Meetup #22: Docker Networking
DockerCon EU 2015: Deploying and Managing Containers for Developers
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Docker Bday #5, SF Edition: Introduction to Docker
Jenkins & IaC
DCSF19 How To Build Your Containerization Strategy
Oscon 2017: Build your own container-based system with the Moby project
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
Production Ready Containers from IBM and Docker
Ad

Similar to How to Install and Use Kubernetes by Weaveworks (20)

PDF
How to install and use Kubernetes
PDF
Lessons learned and challenges faced while running Kubernetes at Scale
PPTX
Getting Started with Azure Kubernetes Service
PPTX
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
PDF
Collabnix Online Webinar - Demystifying Docker & Kubernetes Networking by Bal...
PDF
DCEU 18: Docker Container Networking
PPTX
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
PDF
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
PPTX
Kubernetes: від знайомства до використання у CI/CD
PDF
A hitchhiker‘s guide to the cloud native stack
PDF
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
PDF
Demystfying container-networking
PDF
Cloud-native .NET Microservices mit Kubernetes
PDF
Docker on docker leveraging kubernetes in docker ee
PPTX
Docker Enterprise Workshop - Technical
PDF
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
PPTX
The missing piece : when Docker networking and services finally unleashes so...
PPTX
DockerCon - The missing piece : when Docker networking unleashes software arc...
PPTX
Deploying windows containers with kubernetes
How to install and use Kubernetes
Lessons learned and challenges faced while running Kubernetes at Scale
Getting Started with Azure Kubernetes Service
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Collabnix Online Webinar - Demystifying Docker & Kubernetes Networking by Bal...
DCEU 18: Docker Container Networking
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
Kubernetes: від знайомства до використання у CI/CD
A hitchhiker‘s guide to the cloud native stack
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Demystfying container-networking
Cloud-native .NET Microservices mit Kubernetes
Docker on docker leveraging kubernetes in docker ee
Docker Enterprise Workshop - Technical
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
The missing piece : when Docker networking and services finally unleashes so...
DockerCon - The missing piece : when Docker networking unleashes software arc...
Deploying windows containers with kubernetes
Ad

More from Weaveworks (20)

PDF
Weave AI Controllers (Weave GitOps Office Hours)
PDF
Flamingo: Expand ArgoCD with Flux (Office Hours)
PDF
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
PDF
Six Signs You Need Platform Engineering
PDF
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
PDF
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
PDF
Flux Beyond Git Harnessing the Power of OCI
PDF
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
PDF
How to Avoid Kubernetes Multi-tenancy Catastrophes
PDF
Building internal developer platform with EKS and GitOps
PDF
GitOps Testing in Kubernetes with Flux and Testkube.pdf
PDF
Intro to GitOps with Weave GitOps, Flagger and Linkerd
PDF
Implementing Flux for Scale with Soft Multi-tenancy
PDF
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
PDF
The Story of Flux Reaching Graduation in the CNCF
PDF
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
PDF
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
PDF
Flux’s Security & Scalability with OCI & Helm Slides.pdf
PDF
Flux Security & Scalability using VS Code GitOps Extension
PDF
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Weave AI Controllers (Weave GitOps Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Six Signs You Need Platform Engineering
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Flux Beyond Git Harnessing the Power of OCI
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
How to Avoid Kubernetes Multi-tenancy Catastrophes
Building internal developer platform with EKS and GitOps
GitOps Testing in Kubernetes with Flux and Testkube.pdf
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Implementing Flux for Scale with Soft Multi-tenancy
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
The Story of Flux Reaching Graduation in the CNCF
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Flux Security & Scalability using VS Code GitOps Extension
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks

How to Install and Use Kubernetes by Weaveworks

Editor's Notes

  • #10: Containers in a pod share a network namespace; pods have IP addresses So “localhost” is the same. They can also share access to volumes
  • #11: any questions?
  • #15: as tim hockin likes to say, pods are mortal if a machine goes away where a pod is running, nothing tries to restart it
  • #17: looks like a pod
  • #21: deployments can also help you with scaling
  • #23: any questions?
  • #27: services are how things can talk to each other and also how the outside world can talk to things kube-proxy creates iptables NAT rules so that packets going to a VIP get routed to a set of service endpoints where set of endpoints is a subset of pod IP addresses matching the label selector, it only includes pods that are in a ready state
  • #28: services are how things can talk to each other and also how the outside world can talk to things kube-proxy creates iptables NAT rules so that packets going to a VIP get routed to a set of service endpoints where set of endpoints is a subset of pod IP addresses matching the label selector, it only includes pods that are in a ready state
  • #29: services are how things can talk to each other and also how the outside world can talk to things kube-proxy creates iptables NAT rules so that packets going to a VIP get routed to a set of service endpoints where set of endpoints is a subset of pod IP addresses matching the label selector, it only includes pods that are in a ready state
  • #30: services are how things can talk to each other and also how the outside world can talk to things kube-proxy creates iptables NAT rules so that packets going to a VIP get routed to a set of service endpoints where set of endpoints is a subset of pod IP addresses matching the label selector, it only includes pods that are in a ready state
  • #31: services are how things can talk to each other and also how the outside world can talk to things kube-proxy creates iptables NAT rules so that packets going to a VIP get routed to a set of service endpoints where set of endpoints is a subset of pod IP addresses matching the label selector, it only includes pods that are in a ready state
  • #33: you can also use LoadBalancer if you have set up cloud provider integration, and it will auto provision load balancers from e.g. AWS
  • #41: https://www.katacoda.com/courses/weave/kubernetes-training
  • #42: https://www.katacoda.com/courses/weave/kubernetes-training
  • #43: https://www.katacoda.com/courses/weave/kubernetes-training