SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
Kubernetes 101
whoami
DevOps Engineer @ Spreaker
h"p://twi"er.com/jnardiello
What to expect
A Kubernetes primer
Tips, tricks, sweat and blood
real life experience bringing k8s to produc5on
High-load system
Distributed architecture
Our whole infrastructure is on AWS
Our pain points
Underused machines
Autoscaling would take minutes
Non-athomic provisioning makes it difficult to
roll-out upgrades or migrate services
The solu)on: Docker!
Perfectly determinis/c, ephemeral, light-
weight
Unfortunately
containers are just half
of the equa3on
Real costs will emerge as you
try to make containers work
together
Kubernetes
def.
(Opinionated) Orchestra1on framework to
organise and deploy container-based
applica1ons
Agnos&c sandbox where you
provide the desired state of your
services/apps. Kubernetes aims to
take care of everything else
Disclaimer!
From the outside Kubernetes is a
black box
But inner mechanisms makes it a
complex beast to master
We got the cookies!
a.k.a. features
Self-healing services
Health checks on your containers,
rescheduling failing jobs
Dynamic scaling
Ensure current state and scale your pods (but
it's s4ll on you to scale the nodes)
Networking and rou/ng
Route traffic to your containers
Efficient physical resources usage
Scheduling containers on physical/vms nodes
according to their effec7ve needs
Enough talking
Crea%ng a cluster
MULTIZONE=1 KUBERNETES_PROVIDER=aws 
KUBE_AWS_ZONE=eu-west-1b NON_MASQUERADE_CIDR="172.16.0.0/14" 
SERVICE_CLUSTER_IP_RANGE="172.16.0.0/16" DNS_SERVER_IP="172.16.0.10" 
MASTER_IP_RANGE="172.17.0.0/24" CLUSTER_IP_RANGE="172.18.0.0/16" 
MASTER_SIZE=m3.medium NODE_SIZE=m3.medium NUM_NODES=1 
./cluster/kube-up.sh
h"ps://asciinema.org/a/
4xnz9hc3lvs6zp3eakrf2qcjn
$ kubectl get nodes
NAME STATUS AGE
ip-172-20-0-209.eu-west-1.compute.internal Ready 47m
ip-172-20-0-210.eu-west-1.compute.internal Ready 47m
ip-172-20-0-211.eu-west-1.compute.internal Ready 47m
ip-172-20-0-212.eu-west-1.compute.internal Ready 47m
ip-172-20-0-213.eu-west-1.compute.internal Ready 47m
kubectl is your local CLI command
center.
You can issue commands to the cluster either by kubectl or
directly calling REST APIs exposed by the master
We got the nodes, we are ready
Our first container on kubernetes!
YAML all the things!
Pods
A pod is a group of one or more containers. Pods are the smallest
deployable units that can be created and managed in Kubernetes.
Replica(on Controllers
A replica*on controller ensures that a specified number of pod
“replicas” are running at any one *me
Deployments
Pod + Replica-onController
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: dummy-worker
spec:
replicas: 1
template:
metadata:
labels:
app: dummy-worker
spec:
containers:
- name: dummy-worker
image: jnardiello/forever
env:
- name: SOME_ENV_VAR
value: envvarvalue
resources:
limits:
cpu: "256m"
memory: "128Mi"
requests:
cpu: "5m"
memory: "8Mi"
Services
A Kubernetes Service is an abstrac0on which defines a logical set
of Pods and a policy by which to access them.
kind: Service
metadata:
name: dummy-worker-service
spec:
ports:
- port: 80·
targetPort: 8000
protocol: TCP
selector:
app: dummy-worker
externalIPs: [53.8.3.2]
There are different types of services
NodePorts, proxied by the master
LoadBalancer, crea'ng an actual ELB on AWS
Ingress [beta] - WARNING, do not use
Deploy the container
h"ps://asciinema.org/a/7c42c8itmyz3982p6fmo9ecvi
Resilient applica,ons
h"ps://asciinema.org/a/2bxo51ond7ac4haaguneingmv
Kubernetes is truly amazing
(for POCs)
Ba#le-tested cluster
A long way before reaching produc4on ready
There will be blood!
Opinionated Logging
Opinionated Monitoring
Master skynet, then implement your
own solu4on
Custom metrics-based Autoscaling
OpsFactory/Kappa
These topics are for another /me
(We should probably do Kubernetes102)
Ques%ons?
@jnardiello

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating SystemKubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 

Andere mochten auch

Cloud Technology Ecosystems
Cloud Technology EcosystemsCloud Technology Ecosystems
Cloud Technology Ecosystems
Joseph Jacks
 

Andere mochten auch (20)

An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
 
Kubernetes 101 and Fun
Kubernetes 101 and FunKubernetes 101 and Fun
Kubernetes 101 and Fun
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
Kubernetes 101 for Developers
Kubernetes 101 for DevelopersKubernetes 101 for Developers
Kubernetes 101 for Developers
 
Adhearsion - Easy VoIP @ Ruby
Adhearsion - Easy VoIP @ RubyAdhearsion - Easy VoIP @ Ruby
Adhearsion - Easy VoIP @ Ruby
 
Java Day Brochure
Java Day BrochureJava Day Brochure
Java Day Brochure
 
Ahmet Akdağ, ACM | Agile Turkey Summit 2013
Ahmet Akdağ, ACM | Agile Turkey Summit 2013Ahmet Akdağ, ACM | Agile Turkey Summit 2013
Ahmet Akdağ, ACM | Agile Turkey Summit 2013
 
Agile Turkey Summit 2015 Speakers
Agile Turkey Summit 2015 SpeakersAgile Turkey Summit 2015 Speakers
Agile Turkey Summit 2015 Speakers
 
A Practical Approach to Successful New Product Development Initiatives - PMIW...
A Practical Approach to Successful New Product Development Initiatives - PMIW...A Practical Approach to Successful New Product Development Initiatives - PMIW...
A Practical Approach to Successful New Product Development Initiatives - PMIW...
 
Google Machine Learning APIs - puppies or muffins?
Google Machine Learning APIs - puppies or muffins?Google Machine Learning APIs - puppies or muffins?
Google Machine Learning APIs - puppies or muffins?
 
Organize for Complexity - keynote at Agile Turkey Summit 2014 (Istanbul/TR)
Organize for Complexity - keynote at Agile Turkey Summit 2014 (Istanbul/TR)Organize for Complexity - keynote at Agile Turkey Summit 2014 (Istanbul/TR)
Organize for Complexity - keynote at Agile Turkey Summit 2014 (Istanbul/TR)
 
Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack Containers #101 Meetup: Containers & OpenStack
Containers #101 Meetup: Containers & OpenStack
 
Cloud Technology Ecosystems
Cloud Technology EcosystemsCloud Technology Ecosystems
Cloud Technology Ecosystems
 
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes Architecture v1.x
Kubernetes Architecture v1.xKubernetes Architecture v1.x
Kubernetes Architecture v1.x
 
Sprint Backlog Nedir?
Sprint Backlog Nedir?Sprint Backlog Nedir?
Sprint Backlog Nedir?
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
 

Ähnlich wie Kubernetes 101

Ähnlich wie Kubernetes 101 (20)

Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes Immersion
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Jenkins_K8s (2).pptx
Jenkins_K8s (2).pptxJenkins_K8s (2).pptx
Jenkins_K8s (2).pptx
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
A brief study on Kubernetes and its components
A brief study on Kubernetes and its componentsA brief study on Kubernetes and its components
A brief study on Kubernetes and its components
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
 Dockerize it: stop living in the past and embrace the future by Alex Nadalin Dockerize it: stop living in the past and embrace the future by Alex Nadalin
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
 
Dockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in RomeDockerize it! @ Codemotion 2016 in Rome
Dockerize it! @ Codemotion 2016 in Rome
 
Dockerize it: stop living in the past and embrace the future
Dockerize it: stop living in the past and embrace the futureDockerize it: stop living in the past and embrace the future
Dockerize it: stop living in the past and embrace the future
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 

Mehr von Jacopo Nardiello

Mehr von Jacopo Nardiello (8)

The Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesThe Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on Kubernetes
 
Tales of the mythical cloud-native platform - Container day 2022
Tales of the mythical cloud-native platform - Container day 2022Tales of the mythical cloud-native platform - Container day 2022
Tales of the mythical cloud-native platform - Container day 2022
 
Breaking the monolith
Breaking the monolithBreaking the monolith
Breaking the monolith
 
Monitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusMonitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with Prometheus
 
Becoming a developer
Becoming a developerBecoming a developer
Becoming a developer
 
Eventsourcing with PHP and MongoDB
Eventsourcing with PHP and MongoDBEventsourcing with PHP and MongoDB
Eventsourcing with PHP and MongoDB
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
 
Testing AngularJS
Testing AngularJSTesting AngularJS
Testing AngularJS
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

Kubernetes 101