SlideShare a Scribd company logo
1 of 22
Download to read offline
One of the most unpolished
Kubernetes introduction
presentations ever given on a
Thursday afternoon from
Freiburg, Germany, ever
Martin Danielsson -- 2017-01-05
Haufe-Lexware GmbH & Co. KG, CTO Office
Twitter: @donmartin76, GitHub: DonMartin76
You might have figured,
this is the Kubernetes logo
Thank you for your attention!
Just kidding.
What is Kubernetes?
“Kubernetes is an open-source platform for automating deployment,
scaling, and operations of application containers across clusters of
hosts, providing container-centric infrastructure.”
http://kubernetes.io/docs/whatisk8s/
Holy smokes!Which means?
What does Kubernetes do?
• Provide a runtime environment for Docker containers
• Scale and load balance docker containers
• Abstract away the infrastructure containers run on
• Monitor/health check containers
• Declarative definition for running containers
• Update containers (also rolling updates)
• Storage mounting (allow abstracting infrastructure)
• Service discovery and exposure
• Labelling and selection of any kind of object (we‘ll get to this)
What does Kubernetes fucking not do?
• Provide any additional services than just Docker
• Compile or build your source code (needs images)
• Provide real orchestration, relies on containers working
independently
• Mandate or provide any kind of special configuration language
• You’re free to do whatever you want
• But: You have to find out a way yourself
Kubernetes =
General Purpose
Platform-as-a-Service (PaaS)
~
Recap - Docker?
Docker Host (e.g. Ubuntu 16.04 LTS)
Container
nginx
Container
node.js App
Container
PostgreSQL
• Docker containers share Kernel with Host
• Many containers can efficiently run on one Host
• Powerful developer tooling
• Dockerfiles are used to build images
• A Docker Registry can store Docker images
• Haufe’s registry.haufe.io
• Official hub.docker.com
• Docker Engine used by Kubernetes under the
hood
• Kubernetes is alternative to Docker Swarm
• Older, more mature
• Used e.g. by GCE (Google Container Engine)
Kubernetes and Docker
• Kubernetes adds functionality to Docker
• Manages a set of Docker Hosts, forming a Cluster
• Takes care of Container scheduling
• Supervises Docker containers
• Kubernetes is replacement/alternative for Docker Swarm
Node
workload
workload
workload
Node
workload
workload
workload
Kubernetes
Master(s)
apiserver
controllers
Node
workload
workload
workload
All blue boxes are Docker Hosts (VMs)
Kubernetes Components are also running as stateless containers!
etcd
(cluster) scheduler
Deployment Architecture
Node 1
Kubernetes Runtime
Pod X
Container
A
Container
B
Pod Y
Container
C
Node 2
Pod Y
Container
C
Pod Z
Container
D
Node 3
Pod Z
Container
D
Pod X
Container
A
Container
B
Deployment
Replica Set
Pod Spec
Abstractions (1) - “Boxes in boxes”
Container
Spec
Container
Spec
Docker image
Environment variables
Storage Claims
Node selector
Service labels
How many Pods should run?
How are updates handled?
Rolling/recreation
Abstractions (2) - Services
Pod
Pod
Pod
Pod
PodService B,
select “B”,
http://ser
vice-b
A
A
A
B
B
Service A,
select “A”
e.g.,
http://ser
vice-a
Abstractions (3) - Other things
• Jobs (one-off containers)
• DaemonSets (one container per node)
• StatefulSet (handles lifetime of pods differently)
Exposing Services (1) - NodePort
Node 1 Node 2 Node 3
Service A
31234 (non-privileged) 31234 31234
Can be used to put an external Load Balancer in front of a service
Exposing Services (2) - LoadBalancer
Node 1 Node 2 Node 3
Service A
• Depends on Cloud Provider (Azure, AWS,…) how this is done
• Will provision a Load Balancer on the cloud provider’s infrastructure
• (e.g. Elastic LB, Azure LB,…)
LB
Exposing Services (3) - Ingress
Kubernetes Cluster
Service A
Service B
Service C
Pod
Pod
Pod
Pod Pod
Pod
Pod
Pod
Pod
…
LB
Ingress
Definition
Ingress
Controller
(SNI, TLS)
• E.g., “route Host x.y.z to Service A”, “Use TLS Certificate abc for host x.y.z”
• Abstract definition of rules
• Implemented by Ingress Controller
• Flexible; leverages “LoadBalancer” on cloud provider
• Can provide SNI (Server Name Indication) and TLS termination
Working with kubectl
$ kubectl apply -f deployment.yml
Created deployment “nginx”
$
Kubernetes
Master(s)
apiserver
scheduler
~/.kube/config
Authentication/
Authorization
• kubectl is a convenient way to talk
to the Kubernetes API
• Uses ~/.kube/config for AuthN/Z
Example kubectl YAML file
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: idesk-mobile-2851
spec:
replicas: 2
# keep the latest three deployments on k8s
revisionHistoryLimit: 3
template:
metadata:
labels:
service: idesk-mobile-2851
feature: "false”
spec:
containers:
- env:
- name: API_GATEWAY_HOST
value: https://api.idesk-apim.haufe-ep.de
- name: CLIENT_ID
value: "ad283bd8273bdbe9a72bdef”
image: "aurora/aurora.mobile.client:v2851”
name: idesk-mobile
ports:
- containerPort: 80
protocol: TCP
restartPolicy: Always
imagePullSecrets:
- name: aurora-registry-haufe-io
$ kubectl apply -f idesk-mobile.yml
Created deployment “idesk-mobile-2851”
$ kubectl get po
NAME READY STATUS RESTARTS AGE
idesk-mobile 1/2 Running 0 10s
$
Container(s)
Pod
Replica Set
Deployment
Example Service YML
apiVersion: v1
kind: Service
metadata:
labels:
service: idesk-mobile-2851
feature: ”true”
name: idesk-mobile-2851
spec:
type: NodePort
ports:
- name: “https”
port: 443
protocol: TCP
targetPort: 443
nodePort: 31851
selector:
service: idesk-mobile-2851
status:
loadBalancer: {}
Reachable over any Agent IP:
https://aurora-k8s.haufe-ep.de:31851
Demo
• Add an nginx Deployment
• Add a service
• Expose service via an Ingress definition
• Kubernetes Dashboard
• Deleting with a selector filter
Example Ingress YML
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-demo
spec:
rules:
- host: nginx-demo.donmartin76.com
http:
paths:
- path:
backend:
serviceName: nginx-demo
servicePort: 80

More Related Content

What's hot

Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
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 LISA17Ryan Jarvinen
 
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...Edureka!
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introductionSparkbit
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformMichael O'Sullivan
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes ArchitectureKnoldus Inc.
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Krishna-Kumar
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architectureIgor Sfiligoi
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Megan O'Keefe
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)Akash Agrawal
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesMichal Cwienczek
 

What's hot (20)

Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
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 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...
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
What Is Helm
 What Is Helm What Is Helm
What Is Helm
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architecture
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 

Similar to Kubernetes Introduction

DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with KubernetesOleg Chunikhin
 
Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.Jooho Lee
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Inhye Park
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellEugene Fedorenko
 
Portable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and JenkinsPortable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and JenkinsKublr
 
DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarCodefresh
 
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, VMwareVMUG IT
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetesDongwon Kim
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-finalMichel Schildmeijer
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019Kumton Suttiraksiri
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighBrad Topol
 
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-stepSetting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-stepOleg Chunikhin
 
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-stepSetting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-stepKublr
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetescsegayan
 

Similar to Kubernetes Introduction (20)

DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
 
Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Adf with docker
Adf with dockerAdf with docker
Adf with docker
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Portable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and JenkinsPortable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
Portable CI/CD Environment as Code with Kubernetes, Kublr and Jenkins
 
DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm Webinar
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
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
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
Moby KubeCon 2017
Moby KubeCon 2017Moby KubeCon 2017
Moby KubeCon 2017
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
 
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-stepSetting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-step
 
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-stepSetting up CI/CD Pipeline with Kubernetes and Kublr step by-step
Setting up CI/CD Pipeline with Kubernetes and Kublr step by-step
 
Openshift Workshop
Openshift Workshop Openshift Workshop
Openshift Workshop
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 

Recently uploaded

Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageDista
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdfMeon Technology
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Vectors are the new JSON in PostgreSQL (SCaLE 21x)
Vectors are the new JSON in PostgreSQL (SCaLE 21x)Vectors are the new JSON in PostgreSQL (SCaLE 21x)
Vectors are the new JSON in PostgreSQL (SCaLE 21x)Jonathan Katz
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptkinjal48
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxJoão Esperancinha
 
How to Improve the Employee Experience? - HRMS Software
How to Improve the Employee Experience? - HRMS SoftwareHow to Improve the Employee Experience? - HRMS Software
How to Improve the Employee Experience? - HRMS SoftwareNYGGS Automation Suite
 
Understanding Native Mobile App Development
Understanding Native Mobile App DevelopmentUnderstanding Native Mobile App Development
Understanding Native Mobile App DevelopmentMobulous Technologies
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native BuildpacksVish Abrams
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
New ThousandEyes Product Features and Release Highlights: March 2024
New ThousandEyes Product Features and Release Highlights: March 2024New ThousandEyes Product Features and Release Highlights: March 2024
New ThousandEyes Product Features and Release Highlights: March 2024ThousandEyes
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 
React 19: Revolutionizing Web Development
React 19: Revolutionizing Web DevelopmentReact 19: Revolutionizing Web Development
React 19: Revolutionizing Web DevelopmentBOSC Tech Labs
 

Recently uploaded (20)

Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
 
online pdf editor software solutions.pdf
online pdf editor software solutions.pdfonline pdf editor software solutions.pdf
online pdf editor software solutions.pdf
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Vectors are the new JSON in PostgreSQL (SCaLE 21x)
Vectors are the new JSON in PostgreSQL (SCaLE 21x)Vectors are the new JSON in PostgreSQL (SCaLE 21x)
Vectors are the new JSON in PostgreSQL (SCaLE 21x)
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.ppt
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
How to Improve the Employee Experience? - HRMS Software
How to Improve the Employee Experience? - HRMS SoftwareHow to Improve the Employee Experience? - HRMS Software
How to Improve the Employee Experience? - HRMS Software
 
Understanding Native Mobile App Development
Understanding Native Mobile App DevelopmentUnderstanding Native Mobile App Development
Understanding Native Mobile App Development
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
Streamlining Your Application Builds with Cloud Native Buildpacks
Streamlining Your Application Builds  with Cloud Native BuildpacksStreamlining Your Application Builds  with Cloud Native Buildpacks
Streamlining Your Application Builds with Cloud Native Buildpacks
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
New ThousandEyes Product Features and Release Highlights: March 2024
New ThousandEyes Product Features and Release Highlights: March 2024New ThousandEyes Product Features and Release Highlights: March 2024
New ThousandEyes Product Features and Release Highlights: March 2024
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 
React 19: Revolutionizing Web Development
React 19: Revolutionizing Web DevelopmentReact 19: Revolutionizing Web Development
React 19: Revolutionizing Web Development
 

Kubernetes Introduction

  • 1. One of the most unpolished Kubernetes introduction presentations ever given on a Thursday afternoon from Freiburg, Germany, ever Martin Danielsson -- 2017-01-05 Haufe-Lexware GmbH & Co. KG, CTO Office Twitter: @donmartin76, GitHub: DonMartin76
  • 2. You might have figured, this is the Kubernetes logo
  • 3. Thank you for your attention! Just kidding.
  • 4. What is Kubernetes? “Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure.” http://kubernetes.io/docs/whatisk8s/ Holy smokes!Which means?
  • 5. What does Kubernetes do? • Provide a runtime environment for Docker containers • Scale and load balance docker containers • Abstract away the infrastructure containers run on • Monitor/health check containers • Declarative definition for running containers • Update containers (also rolling updates) • Storage mounting (allow abstracting infrastructure) • Service discovery and exposure • Labelling and selection of any kind of object (we‘ll get to this)
  • 6. What does Kubernetes fucking not do? • Provide any additional services than just Docker • Compile or build your source code (needs images) • Provide real orchestration, relies on containers working independently • Mandate or provide any kind of special configuration language • You’re free to do whatever you want • But: You have to find out a way yourself
  • 8. Recap - Docker? Docker Host (e.g. Ubuntu 16.04 LTS) Container nginx Container node.js App Container PostgreSQL • Docker containers share Kernel with Host • Many containers can efficiently run on one Host • Powerful developer tooling • Dockerfiles are used to build images • A Docker Registry can store Docker images • Haufe’s registry.haufe.io • Official hub.docker.com • Docker Engine used by Kubernetes under the hood • Kubernetes is alternative to Docker Swarm • Older, more mature • Used e.g. by GCE (Google Container Engine)
  • 9. Kubernetes and Docker • Kubernetes adds functionality to Docker • Manages a set of Docker Hosts, forming a Cluster • Takes care of Container scheduling • Supervises Docker containers • Kubernetes is replacement/alternative for Docker Swarm
  • 10. Node workload workload workload Node workload workload workload Kubernetes Master(s) apiserver controllers Node workload workload workload All blue boxes are Docker Hosts (VMs) Kubernetes Components are also running as stateless containers! etcd (cluster) scheduler Deployment Architecture
  • 11. Node 1 Kubernetes Runtime Pod X Container A Container B Pod Y Container C Node 2 Pod Y Container C Pod Z Container D Node 3 Pod Z Container D Pod X Container A Container B
  • 12. Deployment Replica Set Pod Spec Abstractions (1) - “Boxes in boxes” Container Spec Container Spec Docker image Environment variables Storage Claims Node selector Service labels How many Pods should run? How are updates handled? Rolling/recreation
  • 13. Abstractions (2) - Services Pod Pod Pod Pod PodService B, select “B”, http://ser vice-b A A A B B Service A, select “A” e.g., http://ser vice-a
  • 14. Abstractions (3) - Other things • Jobs (one-off containers) • DaemonSets (one container per node) • StatefulSet (handles lifetime of pods differently)
  • 15. Exposing Services (1) - NodePort Node 1 Node 2 Node 3 Service A 31234 (non-privileged) 31234 31234 Can be used to put an external Load Balancer in front of a service
  • 16. Exposing Services (2) - LoadBalancer Node 1 Node 2 Node 3 Service A • Depends on Cloud Provider (Azure, AWS,…) how this is done • Will provision a Load Balancer on the cloud provider’s infrastructure • (e.g. Elastic LB, Azure LB,…) LB
  • 17. Exposing Services (3) - Ingress Kubernetes Cluster Service A Service B Service C Pod Pod Pod Pod Pod Pod Pod Pod Pod … LB Ingress Definition Ingress Controller (SNI, TLS) • E.g., “route Host x.y.z to Service A”, “Use TLS Certificate abc for host x.y.z” • Abstract definition of rules • Implemented by Ingress Controller • Flexible; leverages “LoadBalancer” on cloud provider • Can provide SNI (Server Name Indication) and TLS termination
  • 18. Working with kubectl $ kubectl apply -f deployment.yml Created deployment “nginx” $ Kubernetes Master(s) apiserver scheduler ~/.kube/config Authentication/ Authorization • kubectl is a convenient way to talk to the Kubernetes API • Uses ~/.kube/config for AuthN/Z
  • 19. Example kubectl YAML file apiVersion: extensions/v1beta1 kind: Deployment metadata: name: idesk-mobile-2851 spec: replicas: 2 # keep the latest three deployments on k8s revisionHistoryLimit: 3 template: metadata: labels: service: idesk-mobile-2851 feature: "false” spec: containers: - env: - name: API_GATEWAY_HOST value: https://api.idesk-apim.haufe-ep.de - name: CLIENT_ID value: "ad283bd8273bdbe9a72bdef” image: "aurora/aurora.mobile.client:v2851” name: idesk-mobile ports: - containerPort: 80 protocol: TCP restartPolicy: Always imagePullSecrets: - name: aurora-registry-haufe-io $ kubectl apply -f idesk-mobile.yml Created deployment “idesk-mobile-2851” $ kubectl get po NAME READY STATUS RESTARTS AGE idesk-mobile 1/2 Running 0 10s $ Container(s) Pod Replica Set Deployment
  • 20. Example Service YML apiVersion: v1 kind: Service metadata: labels: service: idesk-mobile-2851 feature: ”true” name: idesk-mobile-2851 spec: type: NodePort ports: - name: “https” port: 443 protocol: TCP targetPort: 443 nodePort: 31851 selector: service: idesk-mobile-2851 status: loadBalancer: {} Reachable over any Agent IP: https://aurora-k8s.haufe-ep.de:31851
  • 21. Demo • Add an nginx Deployment • Add a service • Expose service via an Ingress definition • Kubernetes Dashboard • Deleting with a selector filter
  • 22. Example Ingress YML apiVersion: extensions/v1beta1 kind: Ingress metadata: name: nginx-demo spec: rules: - host: nginx-demo.donmartin76.com http: paths: - path: backend: serviceName: nginx-demo servicePort: 80