Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Kubernetes fundamentals
Victor Morales
Victor Morales
• +15 yrs as a Software Engineer
• .NET, Java, python, Go programmer
• OpenStack, OPNFV, ONAP and CNCF
contributor.
https://about.me/electrocucaracha
Agenda
1. Kubernetes Architecture
• Control Plane components
• kubectl
• Controller Pattern
• Scheduler
• Node components
2. Kubernetes Installers
• Kubeadm
• Kubespray
• Kind
3. Kubernetes Resources
• Scopes Namespace or Cluster
• Pod
• Service and Labels
• Deployment and ReplicaSets
4. Demo
• Autoscaling strategies
• Horizontal Pod Autoscaler
Kubernetes Architecture
Kubernetes (K8s) is an
open-source system for
automating deployment,
scaling, and management
of containerized
applications.
Control Plane
components
• kube-apiserver: Exposes the Kubernetes API.
• etcd: Used as Kubernetes' backing store for all
cluster data.
• kube-scheduler: Watches for newly created Pods
with no assigned node, and selects a node for
them to run on.
• kube-controller-manager: Runs controller
processes.
• Node controller: Responsible for noticing and
responding when nodes go down.
• Replication controller: Responsible for maintaining the
correct number of pods for every replication controller
object in the system.
• Endpoints controller: Populates the Endpoints object
(that is, joins Services & Pods).
• Service Account & Token controllers: Create default
accounts and API access tokens for new namespaces
• cloud-controller-manager: Embeds cloud-specific
control logic.
master
kube-apiserver
kube-controller-managerkube-scheduler
etcd
cloud-controller-manager
kubectl
Tool that makes it easy to
use kubectl plugins.
The Kubernetes command-
line tool which allows you
to run commands against
Kubernetes clusters.
Controller pattern
A controller tracks at least one Kubernetes resource type. These objects have
a spec field that represents the desired state. The controller(s) for that
resource are responsible for making the current state come closer to that
desired state.
https://blog.container-solutions.com/kubernetes-operators-explained
kube-scheduler
The scheduler finds feasible Nodes
for a Pod and then runs a set of
functions to score the feasible
Nodes* and picks a Node with the
highest score among the feasible
ones to run the Pod. The
scheduler then notifies the API
server about this decision in a
process called binding.
*Nodes that meet the scheduling requirements for a Pod are called feasible nodes.
Feasible nodes
worker worker2 worker3 worker4
Feasible nodes
worker worker3
Filtering
Feasible nodes
worker worker3
Scoring
Priority 2 Priority 4
https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/
Node components
• kubelet: Makes sure that containers are
running in a Pod.
• kube-proxy: Maintains network rules on
nodes. These network rules allow network
communication to your Pods from network
sessions inside or outside of your cluster.
• Container Runtime: Responsible for running
containers. (docker, containerd, CRI-O)
• Add-ons: Extend the functionality of
Kubernetes.
worker
kubelet
kube-proxy
docker
flannel
kubernetes-dashboard
coredns
Kubernetes Installers
Kubeadm
It is a tool built to provide best-practice
"fast paths" for creating Kubernetes
clusters. It performs the actions
necessary to get a minimum viable,
secure cluster up and running in a user
friendly way.
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/
https://github.com/kubernetes/kubeadm
KinD
It is a tool for running local Kubernetes
clusters using Docker container “nodes”.
kind was primarily designed for testing
Kubernetes itself, but may be used for
local development or CI.
https://kind.sigs.k8s.io/
Kubespray
It deploys a Production-Ready
Kubernetes Cluster on bare
metal and most clouds, using
Ansible as its substrate for
provisioning and orchestration.
https://kubespray.io/#/
Kubernetes Resources
Namespaces
Help different
projects, teams, or
customers to share a
Kubernetes cluster.
control-plane
K8s cluster
worker worker2 worker3
pod1
deployment-1
pod2
pod1
deployment-1
pod2
namespace-1
namespace-2
API resources
https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
Cluster-scoped resources
Ingress
Manages external access to the services in a cluster, typically HTTP.
https://kubernetes.io/docs/concepts/services-networking/ingress/
Namespace-scoped resources
Pod A Pod is a Kubernetes abstraction that represents a group of
one or more application containers (such as Docker or rkt), and
some shared resources for those containers. Pods are the
atomic unit on the Kubernetes platform.
Service and Labels
A Service is an abstraction which defines
a logical set of Pods and a policy by
which to access them. The set of Pods
targeted by a Service is usually
determined by a LabelSelector.
Services match a set of Pods using labels
and selectors, a grouping primitive that
allows logical operation on objects in
Kubernetes. Labels are key/value pairs
attached to objects.
Deployment and ReplicaSets
A ReplicaSet’s purpose is to maintain a
stable set of replica Pods running at any
given time. As such, it is often used to
guarantee the availability of a specified
number of identical Pods.
A Deployment controller provides
declarative updates for Pods and
ReplicaSets.
Demo
https://github.com/electrocucaracha/k8s-HorizontalPodAutoscaler-demo
Autoscaling
strategies
• Horizontal Pod Autoscaler (HPA):
adjusts the number of replica Pods of an
application. (scale out/in)
• Vertical Pod Autoscaler (VPA): adjusts
the resource requests and limits of the
containers of an application. (scale
up/down)
• Cluster Autoscaler: adjusts the number
of nodes of the cluster.
control-plane
K8s cluster
worker worker2
pod1
deployment-1
pod1
pod2 pod3 pod4
HPA VPA Cluster Autoscalerhttps://d1smfj0g31qzek.cloudfront.net/above_the_clouds.ppt.pdf
Horizontal Pod
Autoscaler
• Resource Metrics API serves predefined resource usage metrics.
• Custom Metrics API serves user-specified custom metrics that are
associated with Kubernetes objects in the cluster.
• External Metrics API serves user-defined custom metrics that are
not associated with any Kubernetes objects.
https://itnext.io/autoscaling-apps-on-kubernetes-with-the-horizontal-pod-autoscaler-798750ab7847
Controller
Manager
Metrics APIMetrics
Collector
cpustats
Prometheus
Prometheus
Adapter
Horizontal Pod
Autoscaler
Scale out/in
/metrics
processed_requests_total
processed_requests_per_second
Kubernetes fundamentals

More Related Content

What's hot

Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
Oktay Esgul
 
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Edureka!
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Rishabh Kumar
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Container Orchestration using Kubernetes
Container Orchestration using KubernetesContainer Orchestration using Kubernetes
Container Orchestration using Kubernetes
Hesham Amin
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
Sparkbit
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Crevise Technologies
 
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
Ramit Surana
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Martin Danielsson
 
Kubernetes
KubernetesKubernetes
Kubernetes
Henry He
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
Eduardo Garcia Moyano
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
TamalBanerjee16
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Gabriel Carro
 
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...
Edureka!
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Eueung Mulyana
 
Efficient Kubernetes scaling using Karpenter
Efficient Kubernetes scaling using KarpenterEfficient Kubernetes scaling using Karpenter
Efficient Kubernetes scaling using Karpenter
Marko Bevc
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architecture
Igor Sfiligoi
 

What's hot (20)

Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
Kubernetes vs Docker Swarm | Container Orchestration War | Kubernetes Trainin...
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Container Orchestration using Kubernetes
Container Orchestration using KubernetesContainer Orchestration using Kubernetes
Container Orchestration using Kubernetes
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
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 Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
 
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 Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Efficient Kubernetes scaling using Karpenter
Efficient Kubernetes scaling using KarpenterEfficient Kubernetes scaling using Karpenter
Efficient Kubernetes scaling using Karpenter
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architecture
 

Similar to Kubernetes fundamentals

Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101
Boskey Savla
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
GauranG Bajpai
 
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
VMUG IT
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
Ronny Trommer
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
Bob Killen
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Huy Vo
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
Gabriel Carro
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
ssuser0cc9131
 
Kubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewKubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverview
Ankit Shukla
 
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
Brad Topol
 
08 - kubernetes.pptx
08 - kubernetes.pptx08 - kubernetes.pptx
08 - kubernetes.pptx
RanjithM61
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes Internals
Shimi Bandiel
 
Kubernetes-Meetup
Kubernetes-MeetupKubernetes-Meetup
Kubernetes-Meetup
Vaibhav Kohli
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
Oleg Chunikhin
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch IIKubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
OWASPSeasides
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
LISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground RunningLISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground Running
Chris McEniry
 

Similar to Kubernetes fundamentals (20)

Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
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
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
 
Kubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewKubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverview
 
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
 
08 - kubernetes.pptx
08 - kubernetes.pptx08 - kubernetes.pptx
08 - kubernetes.pptx
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes Internals
 
Kubernetes-Meetup
Kubernetes-MeetupKubernetes-Meetup
Kubernetes-Meetup
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch IIKubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
 
LISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground RunningLISA2017 Kubernetes: Hit the Ground Running
LISA2017 Kubernetes: Hit the Ground Running
 

More from Victor Morales

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Open Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra projectOpen Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra project
Victor Morales
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
Victor Morales
 
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with NephioCCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
Victor Morales
 
Nephio 101
Nephio 101Nephio 101
Nephio 101
Victor Morales
 
Tips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptxTips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptx
Victor Morales
 
Understanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptxUnderstanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptx
Victor Morales
 
My OPNFV journey
My OPNFV journeyMy OPNFV journey
My OPNFV journey
Victor Morales
 
Deciphering Kubernetes Networking
Deciphering Kubernetes NetworkingDeciphering Kubernetes Networking
Deciphering Kubernetes Networking
Victor Morales
 
Removing Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking ProfessionalsRemoving Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking Professionals
Victor Morales
 
Understanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeUnderstanding kube proxy in ipvs mode
Understanding kube proxy in ipvs mode
Victor Morales
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
Victor Morales
 
Mutating Admission Webhook creation
Mutating Admission Webhook creationMutating Admission Webhook creation
Mutating Admission Webhook creation
Victor Morales
 
Deep dive networking
Deep dive networkingDeep dive networking
Deep dive networking
Victor Morales
 
GW Tester
GW TesterGW Tester
GW Tester
Victor Morales
 
Pod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from DockershimPod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from Dockershim
Victor Morales
 
Cloud native fundamentals
Cloud native fundamentalsCloud native fundamentals
Cloud native fundamentals
Victor Morales
 
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Victor Morales
 
Reference CNF development journey and outcomes
Reference CNF development journey and outcomesReference CNF development journey and outcomes
Reference CNF development journey and outcomes
Victor Morales
 
Kubernetes Resources Allocation
Kubernetes Resources AllocationKubernetes Resources Allocation
Kubernetes Resources Allocation
Victor Morales
 

More from Victor Morales (20)

KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Open Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra projectOpen Discussion: Nephio Test-infra project
Open Discussion: Nephio Test-infra project
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with NephioCCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
CCOSS + KCD Mexico 2024 - Embracing GitOps in Telecom with Nephio
 
Nephio 101
Nephio 101Nephio 101
Nephio 101
 
Tips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptxTips and tricks for contributing to an Open Source project.pptx
Tips and tricks for contributing to an Open Source project.pptx
 
Understanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptxUnderstanding the Cloud-Native origins.pptx
Understanding the Cloud-Native origins.pptx
 
My OPNFV journey
My OPNFV journeyMy OPNFV journey
My OPNFV journey
 
Deciphering Kubernetes Networking
Deciphering Kubernetes NetworkingDeciphering Kubernetes Networking
Deciphering Kubernetes Networking
 
Removing Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking ProfessionalsRemoving Language Barriers for Spanish-speaking Professionals
Removing Language Barriers for Spanish-speaking Professionals
 
Understanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeUnderstanding kube proxy in ipvs mode
Understanding kube proxy in ipvs mode
 
How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...How to contribute to an open source project and don’t die during the Code Rev...
How to contribute to an open source project and don’t die during the Code Rev...
 
Mutating Admission Webhook creation
Mutating Admission Webhook creationMutating Admission Webhook creation
Mutating Admission Webhook creation
 
Deep dive networking
Deep dive networkingDeep dive networking
Deep dive networking
 
GW Tester
GW TesterGW Tester
GW Tester
 
Pod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from DockershimPod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from Dockershim
 
Cloud native fundamentals
Cloud native fundamentalsCloud native fundamentals
Cloud native fundamentals
 
Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...Building cloud native network functions - outcomes from the gw-tester nsm imp...
Building cloud native network functions - outcomes from the gw-tester nsm imp...
 
Reference CNF development journey and outcomes
Reference CNF development journey and outcomesReference CNF development journey and outcomes
Reference CNF development journey and outcomes
 
Kubernetes Resources Allocation
Kubernetes Resources AllocationKubernetes Resources Allocation
Kubernetes Resources Allocation
 

Recently uploaded

Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
RujanTimsina1
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Sinan KOZAK
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
GOWSIKRAJA PALANISAMY
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
byyi0h
 
Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
VishalMore197390
 
Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
Prakhyath Rai
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
zyroxsunny
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
Blesson Easo Varghese
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
VICTOR MAESTRE RAMIREZ
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Bert Blevins
 
Net Zero Case Study: SRK House and SRK Empire
Net Zero Case Study: SRK House and SRK EmpireNet Zero Case Study: SRK House and SRK Empire
Net Zero Case Study: SRK House and SRK Empire
Global Network for Zero
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
Md.Shohel Rana ( M.Sc in CSE Khulna University of Engineering & Technology (KUET))
 
Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
peacekipu
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile
butwhat24
 
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceSouth Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
kolkata dolls
 

Recently uploaded (20)

Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
 
Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)Analysis and Design of Algorithm Lab Manual (BCSL404)
Analysis and Design of Algorithm Lab Manual (BCSL404)
 
Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
 
Net Zero Case Study: SRK House and SRK Empire
Net Zero Case Study: SRK House and SRK EmpireNet Zero Case Study: SRK House and SRK Empire
Net Zero Case Study: SRK House and SRK Empire
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
 
Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile
 
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceSouth Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
South Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
 

Kubernetes fundamentals

  • 2. Victor Morales • +15 yrs as a Software Engineer • .NET, Java, python, Go programmer • OpenStack, OPNFV, ONAP and CNCF contributor. https://about.me/electrocucaracha
  • 3. Agenda 1. Kubernetes Architecture • Control Plane components • kubectl • Controller Pattern • Scheduler • Node components 2. Kubernetes Installers • Kubeadm • Kubespray • Kind 3. Kubernetes Resources • Scopes Namespace or Cluster • Pod • Service and Labels • Deployment and ReplicaSets 4. Demo • Autoscaling strategies • Horizontal Pod Autoscaler
  • 5. Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
  • 6. Control Plane components • kube-apiserver: Exposes the Kubernetes API. • etcd: Used as Kubernetes' backing store for all cluster data. • kube-scheduler: Watches for newly created Pods with no assigned node, and selects a node for them to run on. • kube-controller-manager: Runs controller processes. • Node controller: Responsible for noticing and responding when nodes go down. • Replication controller: Responsible for maintaining the correct number of pods for every replication controller object in the system. • Endpoints controller: Populates the Endpoints object (that is, joins Services & Pods). • Service Account & Token controllers: Create default accounts and API access tokens for new namespaces • cloud-controller-manager: Embeds cloud-specific control logic. master kube-apiserver kube-controller-managerkube-scheduler etcd cloud-controller-manager
  • 7. kubectl Tool that makes it easy to use kubectl plugins. The Kubernetes command- line tool which allows you to run commands against Kubernetes clusters.
  • 8. Controller pattern A controller tracks at least one Kubernetes resource type. These objects have a spec field that represents the desired state. The controller(s) for that resource are responsible for making the current state come closer to that desired state. https://blog.container-solutions.com/kubernetes-operators-explained
  • 9. kube-scheduler The scheduler finds feasible Nodes for a Pod and then runs a set of functions to score the feasible Nodes* and picks a Node with the highest score among the feasible ones to run the Pod. The scheduler then notifies the API server about this decision in a process called binding. *Nodes that meet the scheduling requirements for a Pod are called feasible nodes. Feasible nodes worker worker2 worker3 worker4 Feasible nodes worker worker3 Filtering Feasible nodes worker worker3 Scoring Priority 2 Priority 4 https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/
  • 10. Node components • kubelet: Makes sure that containers are running in a Pod. • kube-proxy: Maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster. • Container Runtime: Responsible for running containers. (docker, containerd, CRI-O) • Add-ons: Extend the functionality of Kubernetes. worker kubelet kube-proxy docker flannel kubernetes-dashboard coredns
  • 12. Kubeadm It is a tool built to provide best-practice "fast paths" for creating Kubernetes clusters. It performs the actions necessary to get a minimum viable, secure cluster up and running in a user friendly way. https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ https://github.com/kubernetes/kubeadm
  • 13. KinD It is a tool for running local Kubernetes clusters using Docker container “nodes”. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. https://kind.sigs.k8s.io/
  • 14. Kubespray It deploys a Production-Ready Kubernetes Cluster on bare metal and most clouds, using Ansible as its substrate for provisioning and orchestration. https://kubespray.io/#/
  • 16. Namespaces Help different projects, teams, or customers to share a Kubernetes cluster. control-plane K8s cluster worker worker2 worker3 pod1 deployment-1 pod2 pod1 deployment-1 pod2 namespace-1 namespace-2
  • 19. Ingress Manages external access to the services in a cluster, typically HTTP. https://kubernetes.io/docs/concepts/services-networking/ingress/
  • 21. Pod A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers. Pods are the atomic unit on the Kubernetes platform.
  • 22. Service and Labels A Service is an abstraction which defines a logical set of Pods and a policy by which to access them. The set of Pods targeted by a Service is usually determined by a LabelSelector. Services match a set of Pods using labels and selectors, a grouping primitive that allows logical operation on objects in Kubernetes. Labels are key/value pairs attached to objects.
  • 23. Deployment and ReplicaSets A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. A Deployment controller provides declarative updates for Pods and ReplicaSets.
  • 25. Autoscaling strategies • Horizontal Pod Autoscaler (HPA): adjusts the number of replica Pods of an application. (scale out/in) • Vertical Pod Autoscaler (VPA): adjusts the resource requests and limits of the containers of an application. (scale up/down) • Cluster Autoscaler: adjusts the number of nodes of the cluster. control-plane K8s cluster worker worker2 pod1 deployment-1 pod1 pod2 pod3 pod4 HPA VPA Cluster Autoscalerhttps://d1smfj0g31qzek.cloudfront.net/above_the_clouds.ppt.pdf
  • 26. Horizontal Pod Autoscaler • Resource Metrics API serves predefined resource usage metrics. • Custom Metrics API serves user-specified custom metrics that are associated with Kubernetes objects in the cluster. • External Metrics API serves user-defined custom metrics that are not associated with any Kubernetes objects. https://itnext.io/autoscaling-apps-on-kubernetes-with-the-horizontal-pod-autoscaler-798750ab7847

Editor's Notes

  1. https://levelup.gitconnected.com/kubernetes-scheduler-101-751f65841fa0
  2. https://12factor.net/
  3. https://medium.com/swlh/applications-autoscaling-strategy-in-kubernetes-50535683322f https://cdn2.hubspot.net/hubfs/498921/eBooks/scalability_new.pdf
  4. https://levelup.gitconnected.com/building-kubernetes-apps-with-custom-scaling-a-gentle-introduction-a332d7ebc795