SlideShare a Scribd company logo
1 of 37
From Zero to Hero
ORI STOLIAR
CTO
● K8s Overview
● K8s Architecture
● K8s Objects
● Installing K8s
● Show time!
● Q&A
AGENDA
CONTAINERS?
?
SO…
WHAT IS
“Open-source system for automating deployment, scaling, and
management of containerized applications.”
Running containers
at scale
Provides Objects
and APIs for
building modern
applications
Open Source Container
Management
WHAT IS KUBERNETES?
HISTORY IN A NUTSHELL
Borg was founded
by Google
2004
Kubernetes was
introduced
2014
2015
Kubernetes
1.0 & CNCF
2017
Docker fully
embraces
Kubernetes
Minikube
2016
WHY ?
WHY KUBERNETES
Scalability
Portability
High Availability Open Source
Market Leader
Proven, Battle Tested
MARKET TRENDS
Architecture
CONTROL PLANE
kube-apiserver
● Exposes the Kubernetes API
● Handles REST requests from
kubernetes components and from
user/automating systems
kube-controller-
manager
● Responsible for running the
different controllers
● Strongly consist, distributed
Key/Value store
kube-scheduler
● Responsible for placement of
Pods on Nodes in a cluster based
on various factors.
DATA PLANE
kubelet
● An Agent that runs on each node
of the cluster
● The kubelet takes a set of
PodSpecs that are provided and
ensures that the containers
described in those PodSpecs are
running and healthy
kube-proxy
● Kube-proxy is a network proxy
that runs on each node of the
cluster
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['sh', '-c', 'echo
Hello Kubernetes! && sleep
3600']
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
OBJECTS apiVersion: v1
kind: Service
metadata:
name: dt-service
spec:
selector:
app: directeam
ports:
- protocol: TCP
port: 80
targetPort: 9376
Virtual cluster backed by the
same physical cluster
Volume
Namespace: prod
Pod
Labels: [app: dt-app]
Container
Name: dt-app
Image: nginx
Namespace
Pod
Labels
Volume
smallest deployable units of
computing
key/value pairs that are
attached to objects
Abstraction layer for
having persistence
storage
DaemonSet
● Implements a single instance of a pod on a
worker node.
● Common usage:
○ Monitoring
○ Logging
Node
Pod
Node
Pod
Master
Node
Pod
Deployment
● Deployment controllers handles declarative
updates for Pods and ReplicaSets.
● Manages changes from the actual state to
the desired state at a controlled rate.
Deployment
Pod Pod
ReplicaSet
Pod Pod
ReplicaSet
ReplicaSet
● Guarantees the availability of a specified
number of identical Pods.
Service
● An abstract way to expose an application
running on a set of Pods as a network service.
There are 3 types of Service:
○ Node Port
○ Load balancer
○ ClusterIP
Service
Pod Pod Pod
DNS
CoreDNS - Open Source DNS Server written in Go, Kubernetes default DNS server
since version 1.13
● CoreDNS runs as Deployment
● Default cluster domain - cluster.local
● Default allocated DNS records:
○ <SERVICE_NAME>.<NAMESPACE>.svc.cluster.local
○ <POD_IP>.<NAMESPACE>.pod.cluster.local
Installing
!
Kubectl
$> kubectl get deployment webapp
$> kubectl get pod web-pod-13je7 -o yaml
$> kubectl apply -f example-service.yaml
● Kubectl is a command line interface for
running commands against Kubernetes
clusters.
● By default, looks for config file at
$HOME/.kube
Installing
Kubernetes
● Kubeadm
● Kops
● Kubespray
● ...
● AWS EKS
● GCP GKE
● Azure AKS
● Rancher
● ...
Self installed Managed
VS
FOCUS ON WHAT'S IMPORTANT
CREATING EKS CLUSTER
● Creating EKS using eksctl:
$> eksctl create cluster --version=1.13 --
name=k8s-meetup --nodes=3 --node-ami=auto --
region=${AWS_REGION}
● Getting kubeconfig file:
$> aws eks --region <REGION> update-kubeconfig --
name <cluster_name>
KUBERNETES UI
IT’S SHOW TIME!
● Demonstration over AWS
● Run BE & FE services
● Expose the FE service to the internet via
Load balancer
● Use secure HTTPS connection
● Attach DNS record to the load balancer
● Scale automatically the FE service based on
collected metrics
● Scale manually the BE service.
● Helm - deploy apps at ease
● Monitoring - what are the right
metrics?
● Logging - what do we even look
for?
NEXT STEPS
Q&A
Thank
You!
ori@directeam.io

More Related Content

What's hot

What's hot (20)

Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
 
Microservices, Containers and Docker
Microservices, Containers and DockerMicroservices, Containers and Docker
Microservices, Containers and Docker
 
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: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
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
 
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep diveGoogle Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep dive
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
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
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
Helm.pptx
Helm.pptxHelm.pptx
Helm.pptx
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
An Architectural Deep Dive With Kubernetes And Containers Powerpoint Presenta...
 

Similar to Kuberenetes - From Zero to Hero

4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
Juraj Hantak
 

Similar to Kuberenetes - From Zero to Hero (20)

Scalable Spark deployment using Kubernetes
Scalable Spark deployment using KubernetesScalable Spark deployment using Kubernetes
Scalable Spark deployment using Kubernetes
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Running Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWSRunning Production-Grade Kubernetes on AWS
Running Production-Grade Kubernetes on AWS
 
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
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemix
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
 
Deploying WSO2 Middleware on Kubernetes
Deploying WSO2 Middleware on KubernetesDeploying WSO2 Middleware on Kubernetes
Deploying WSO2 Middleware on Kubernetes
 
Service Discovery In Kubernetes
Service Discovery In KubernetesService Discovery In Kubernetes
Service Discovery In Kubernetes
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Kuberenetes - From Zero to Hero

  • 3. ● K8s Overview ● K8s Architecture ● K8s Objects ● Installing K8s ● Show time! ● Q&A AGENDA
  • 5. ? SO… WHAT IS “Open-source system for automating deployment, scaling, and management of containerized applications.”
  • 6. Running containers at scale Provides Objects and APIs for building modern applications Open Source Container Management WHAT IS KUBERNETES?
  • 7. HISTORY IN A NUTSHELL Borg was founded by Google 2004 Kubernetes was introduced 2014 2015 Kubernetes 1.0 & CNCF 2017 Docker fully embraces Kubernetes Minikube 2016
  • 9. WHY KUBERNETES Scalability Portability High Availability Open Source Market Leader Proven, Battle Tested
  • 11.
  • 14. kube-apiserver ● Exposes the Kubernetes API ● Handles REST requests from kubernetes components and from user/automating systems
  • 15. kube-controller- manager ● Responsible for running the different controllers
  • 16. ● Strongly consist, distributed Key/Value store
  • 17. kube-scheduler ● Responsible for placement of Pods on Nodes in a cluster based on various factors.
  • 19. kubelet ● An Agent that runs on each node of the cluster ● The kubelet takes a set of PodSpecs that are provided and ensures that the containers described in those PodSpecs are running and healthy
  • 20. kube-proxy ● Kube-proxy is a network proxy that runs on each node of the cluster
  • 21. apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600'] apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 OBJECTS apiVersion: v1 kind: Service metadata: name: dt-service spec: selector: app: directeam ports: - protocol: TCP port: 80 targetPort: 9376
  • 22. Virtual cluster backed by the same physical cluster Volume Namespace: prod Pod Labels: [app: dt-app] Container Name: dt-app Image: nginx Namespace Pod Labels Volume smallest deployable units of computing key/value pairs that are attached to objects Abstraction layer for having persistence storage
  • 23. DaemonSet ● Implements a single instance of a pod on a worker node. ● Common usage: ○ Monitoring ○ Logging Node Pod Node Pod Master Node Pod
  • 24. Deployment ● Deployment controllers handles declarative updates for Pods and ReplicaSets. ● Manages changes from the actual state to the desired state at a controlled rate. Deployment Pod Pod ReplicaSet Pod Pod ReplicaSet ReplicaSet ● Guarantees the availability of a specified number of identical Pods.
  • 25. Service ● An abstract way to expose an application running on a set of Pods as a network service. There are 3 types of Service: ○ Node Port ○ Load balancer ○ ClusterIP Service Pod Pod Pod
  • 26. DNS CoreDNS - Open Source DNS Server written in Go, Kubernetes default DNS server since version 1.13 ● CoreDNS runs as Deployment ● Default cluster domain - cluster.local ● Default allocated DNS records: ○ <SERVICE_NAME>.<NAMESPACE>.svc.cluster.local ○ <POD_IP>.<NAMESPACE>.pod.cluster.local
  • 27.
  • 29. Kubectl $> kubectl get deployment webapp $> kubectl get pod web-pod-13je7 -o yaml $> kubectl apply -f example-service.yaml ● Kubectl is a command line interface for running commands against Kubernetes clusters. ● By default, looks for config file at $HOME/.kube
  • 30. Installing Kubernetes ● Kubeadm ● Kops ● Kubespray ● ... ● AWS EKS ● GCP GKE ● Azure AKS ● Rancher ● ... Self installed Managed VS
  • 31. FOCUS ON WHAT'S IMPORTANT
  • 32. CREATING EKS CLUSTER ● Creating EKS using eksctl: $> eksctl create cluster --version=1.13 -- name=k8s-meetup --nodes=3 --node-ami=auto -- region=${AWS_REGION} ● Getting kubeconfig file: $> aws eks --region <REGION> update-kubeconfig -- name <cluster_name>
  • 34. IT’S SHOW TIME! ● Demonstration over AWS ● Run BE & FE services ● Expose the FE service to the internet via Load balancer ● Use secure HTTPS connection ● Attach DNS record to the load balancer ● Scale automatically the FE service based on collected metrics ● Scale manually the BE service.
  • 35. ● Helm - deploy apps at ease ● Monitoring - what are the right metrics? ● Logging - what do we even look for? NEXT STEPS
  • 36. Q&A