SlideShare a Scribd company logo
Kubernetes 101
Peeyush Gupta
Who am I?
Peeyush Gupta
Sr. Developer Advocate @ DigitalOcean
#sig-contribex (@pensu91)
@pensu91
pgupta@digitalocean.com
Agenda
● Revisiting Containers
● Introduction to Kubernetes Architecture
● Kubernetes building blocks
● Kubernetes objects and workloads
● Q & A
How did we get here?
● This is how traditional
deployments models worked
when we only had bare metal
servers to run the workloads.
● There was very little to no
isolation and applications had to
be very careful in using the
resources.
How did we get here?
● To take advantage of increasing resources,
people started using hypervisors and
virtualization was born!
● The idea is to divide the server resources
and provide isolated environment to
applications
● This provided an easier and efficient way
of managing resources.
How did we get here?
● What’s next after virtualization?
● The next leap is to remove the redundant
Operating System layer.
● What if we can use the already existing
operating system?
● This was called containerization.
The journey so far...
Break the monolith!
What are containers?
● A package of application code and all of its dependencies
○ Includes everything needed to run the application
● Built around two Linux kernel features
○ Namespaces: Process isolation
○ Cgroups: Resource limits
● Why are they important?
○ Resource efficient and fast
○ Portable across teams
Containers
● Container Images
● Containers
● Container Runtime
● Container Registries
Container Orchestration
● What if we have 10s, 100s, 1000s of running containers on multiple VMs?
● How to deploy, scale, restart, manage all of these containers?
● What problems do they solve?
○ Deployment
○ Management
○ Health Checks
○ Security
○ Networking
Kubernetes
● Also known as “K8s”
● Evolved out of Borg (Google’s internal container
cluster)
● One of the most famous open source project on
Github
● Features added regularly and frequently
● Governed by CNCF
Why Kubernetes
● Resource Efficient
○ Smart scheduler to distribute load on to the worker nodes.
● Increased Productivity
○ Improves the work flow of application and CI/CD pipeline.
● Scalability
○ Just one command to scale up or down the application.
● High Availability
○ Maintain high availability of applications using built-in services.
● Self-Healing
○ Auto restarts of failed application in order to maintain the state.
Kubernetes Components
Kubernetes Components
● Control Plane
○ API server
○ Scheduler
○ Controllers
■ Kubernetes
■ Cloud
○ Etcd
● Nodes
○ Kubelet
○ Kube-proxy
How to connect to Kubernetes cluster
● Hit REST API directly
○ Can use curl, client libraries, etc.
● Kubectl
○ Command-line tool to interact with control plane
○ Abstracts away multiple REST API calls
○ Provides “get” “create” “delete” “describe”, etc. functionality
○ Filtering results
Kubernetes Objects And Workloads
Namespaces
● An abstraction that allows you to divide a cluster into multiple scoped
“virtual clusters”
○ E.g. Each team gets its own Namespace with associated resource
quota
● Primary mechanism for scoping and limiting access
● Kubernetes usually starts with 3 Namespaces by default
○ default
○ kube-system
○ kube-public
● The smallest unit of deployment
● Can contain more that 1 containers
● Pod runs as a single unit so all the
containers that are part of a pod
run on same node always.
● Network/Storage resources are
shared among containers in a pod
Pods
Pods
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
spec:
containers:
- name: nginx
image: nginx:latest
Deploy the pod:
kubectl apply -f pod.yaml
Deployment
● Object that can contain
your applications
● Run multiple replicas
● Replace the failed pods
with healthy ones
● Scale up/down pods and
update replicas
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.14.2
ports:
- containerPort 80
Services
● Services: Abstraction to expose an app
as a service (think microservices)
● Load balancing traffic
○ Routing to “healthy” / “available”
Pods
● Routing selection via Labels
● 3 types
○ Cluster IP
○ NodePort
○ LoadBalancer
Service
User
Node 1 Node 2
Replica 1 Replica 2
Service - NodePort
Service - Load Balancer
Storage
● Persistent Volume (PV
○ A storage volume that can be attached to pod
○ Can be created either by administrator (static provisioning) or create on the fly (dynamic
provisioning) via storage class
● Persistent volume claims (PVC
○ A request for storage by a user.
○ PVC consumes PV resource.
○ Storage class creates PV based on specification given in PVC
● Volume inside a single pod can also be used to communicate between
containers.
● Most of the storage providers now have CSI Container Storage
Interface) driver.
Configmaps and Secrets
● Configmaps
○ Used to store config data as key value pairs.
○ Can store env variables, config files etc.
● Secrets
○ Manage sensitive information such as password, auth tokens, ssh keys
etc.
○ Base-64 encoded, plugins available to encrypt as well.
● Configmaps and secrets can be used either as env variables
or mounted as volumes to the pod.
Helm
● Package manager for Kubernetes
● Helps developers to package, manage, deploy
applications and services to Kubernetes cluster.
● Packages are called helm charts.
● Helm client talks to chart repository to install.
● Also provides options to configure charts before
installing.
helm init
helm install stable/wordpress
What else?
● Autoscaling
● RBAC policies
● Resource quotas
● Kubernetes Extensions
● Logging and monitoring
● And much more...
Thank you!
@pensu91

More Related Content

What's hot

Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
Kublr
 
Container Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaContainer Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor Salceda
Cloud Native Day Tel Aviv
 
Cloud Native Development
Cloud Native DevelopmentCloud Native Development
Cloud Native Development
Manuel Garcia
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
Allan Naim
 
從Google cloud看kubernetes服務
從Google cloud看kubernetes服務從Google cloud看kubernetes服務
從Google cloud看kubernetes服務
inwin stack
 
Kubernetes scheduling and QoS
Kubernetes scheduling and QoSKubernetes scheduling and QoS
Kubernetes scheduling and QoS
Cloud Technology Experts
 
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Kublr
 
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole LangOSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
NETWAYS
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)
Weaveworks
 
Secrets management vault cncf meetup
Secrets management vault cncf meetupSecrets management vault cncf meetup
Secrets management vault cncf meetup
Juraj Hantak
 
Container security within Cisco Container Platform
Container security within Cisco Container PlatformContainer security within Cisco Container Platform
Container security within Cisco Container Platform
Sanjeev Rampal
 
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
Cloud Native Day Tel Aviv
 
Managing kubernetes deployment with operators
Managing kubernetes deployment with operatorsManaging kubernetes deployment with operators
Managing kubernetes deployment with operators
Cloud Technology Experts
 
Running I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati ShalomRunning I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati Shalom
Cloud Native Day Tel Aviv
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
Phil Estes
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summits
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
NETWAYS
 
Kubernetes meetup geneva june 2021
Kubernetes meetup geneva   june 2021Kubernetes meetup geneva   june 2021
Kubernetes meetup geneva june 2021
SebastienSEYMARC
 
DCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and KubernetesDCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and Kubernetes
Docker, Inc.
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
All Things Open
 

What's hot (20)

Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
Container Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor SalcedaContainer Runtime Security with Falco, by Néstor Salceda
Container Runtime Security with Falco, by Néstor Salceda
 
Cloud Native Development
Cloud Native DevelopmentCloud Native Development
Cloud Native Development
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
 
從Google cloud看kubernetes服務
從Google cloud看kubernetes服務從Google cloud看kubernetes服務
從Google cloud看kubernetes服務
 
Kubernetes scheduling and QoS
Kubernetes scheduling and QoSKubernetes scheduling and QoS
Kubernetes scheduling and QoS
 
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
 
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole LangOSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
OSDC 2018 | Git things done with GitLab by Gabriel Hartmann and Nicole Lang
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)
 
Secrets management vault cncf meetup
Secrets management vault cncf meetupSecrets management vault cncf meetup
Secrets management vault cncf meetup
 
Container security within Cisco Container Platform
Container security within Cisco Container PlatformContainer security within Cisco Container Platform
Container security within Cisco Container Platform
 
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
 
Managing kubernetes deployment with operators
Managing kubernetes deployment with operatorsManaging kubernetes deployment with operators
Managing kubernetes deployment with operators
 
Running I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati ShalomRunning I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati Shalom
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
 
Kubernetes meetup geneva june 2021
Kubernetes meetup geneva   june 2021Kubernetes meetup geneva   june 2021
Kubernetes meetup geneva june 2021
 
DCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and KubernetesDCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and Kubernetes
 
Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!Securing Your Resources with Short-Lived Certificates!
Securing Your Resources with Short-Lived Certificates!
 

Similar to Kubernetes for Beginners

Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
Pravin Magdum
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kevin Lynch
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
kubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdfkubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdf
bchiriamina2
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
Janakiram MSV
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kevin Lynch
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
Knoldus Inc.
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
aspyker
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
Sharma Podila
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
inovex GmbH
 
WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017
Imesh Gunaratne
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Gabriel Carro
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloud
Datadog
 
GCCP JSCOE Session 2
GCCP JSCOE Session 2GCCP JSCOE Session 2
GCCP JSCOE Session 2
GDSC
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
GauranG Bajpai
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 

Similar to Kubernetes for Beginners (20)

Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
kubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdfkubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdf
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017WSO2 Kubernetes Reference Architecture - Nov 2017
WSO2 Kubernetes Reference Architecture - Nov 2017
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloud
 
GCCP JSCOE Session 2
GCCP JSCOE Session 2GCCP JSCOE Session 2
GCCP JSCOE Session 2
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 

More from DigitalOcean

Build Cloud Native Apps With DigitalOcean Kubernetes
Build Cloud Native Apps With DigitalOcean KubernetesBuild Cloud Native Apps With DigitalOcean Kubernetes
Build Cloud Native Apps With DigitalOcean Kubernetes
DigitalOcean
 
Benefits of Managed Databases
Benefits of Managed DatabasesBenefits of Managed Databases
Benefits of Managed Databases
DigitalOcean
 
Increase App Confidence Using CI/CD and Infrastructure As Code
Increase App Confidence Using CI/CD and Infrastructure As CodeIncrease App Confidence Using CI/CD and Infrastructure As Code
Increase App Confidence Using CI/CD and Infrastructure As Code
DigitalOcean
 
Build a Tech Brand During Covid in Emerging Tech Ecosystems
Build a Tech Brand During Covid in Emerging Tech EcosystemsBuild a Tech Brand During Covid in Emerging Tech Ecosystems
Build a Tech Brand During Covid in Emerging Tech Ecosystems
DigitalOcean
 
Sailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
Sailing Through a Sea of CMS: Build and Extend APIs Faster With StrapiSailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
Sailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
DigitalOcean
 
Doing E-commerce Right – Magento on DigitalOcean
Doing E-commerce Right – Magento on DigitalOceanDoing E-commerce Right – Magento on DigitalOcean
Doing E-commerce Right – Magento on DigitalOcean
DigitalOcean
 
Headless E-commerce That People Love
Headless E-commerce That People LoveHeadless E-commerce That People Love
Headless E-commerce That People Love
DigitalOcean
 
The Cloud Hosting Revolution Creates Opportunities for Your Business
The Cloud Hosting Revolution Creates Opportunities for Your BusinessThe Cloud Hosting Revolution Creates Opportunities for Your Business
The Cloud Hosting Revolution Creates Opportunities for Your Business
DigitalOcean
 
Build, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
Build, Deploy, and Scale Your First Web App Using DigitalOcean App PlatformBuild, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
Build, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
DigitalOcean
 
Effective Kubernetes Onboarding
Effective Kubernetes OnboardingEffective Kubernetes Onboarding
Effective Kubernetes Onboarding
DigitalOcean
 
Creating Inclusive Learning Experiences
Creating Inclusive Learning ExperiencesCreating Inclusive Learning Experiences
Creating Inclusive Learning Experiences
DigitalOcean
 
Command-line Your Way to PaaS Productivity With DigitalOcean App Platform
Command-line Your Way to PaaS Productivity With DigitalOcean App PlatformCommand-line Your Way to PaaS Productivity With DigitalOcean App Platform
Command-line Your Way to PaaS Productivity With DigitalOcean App Platform
DigitalOcean
 
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
DigitalOcean
 
Kubernetes: Beyond Baby Steps
Kubernetes: Beyond Baby StepsKubernetes: Beyond Baby Steps
Kubernetes: Beyond Baby Steps
DigitalOcean
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking Needs
DigitalOcean
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
Secrets to Building & Scaling SRE Teams
Secrets to Building & Scaling SRE TeamsSecrets to Building & Scaling SRE Teams
Secrets to Building & Scaling SRE Teams
DigitalOcean
 
Deploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub ActionsDeploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub Actions
DigitalOcean
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
DigitalOcean
 
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
DigitalOcean
 

More from DigitalOcean (20)

Build Cloud Native Apps With DigitalOcean Kubernetes
Build Cloud Native Apps With DigitalOcean KubernetesBuild Cloud Native Apps With DigitalOcean Kubernetes
Build Cloud Native Apps With DigitalOcean Kubernetes
 
Benefits of Managed Databases
Benefits of Managed DatabasesBenefits of Managed Databases
Benefits of Managed Databases
 
Increase App Confidence Using CI/CD and Infrastructure As Code
Increase App Confidence Using CI/CD and Infrastructure As CodeIncrease App Confidence Using CI/CD and Infrastructure As Code
Increase App Confidence Using CI/CD and Infrastructure As Code
 
Build a Tech Brand During Covid in Emerging Tech Ecosystems
Build a Tech Brand During Covid in Emerging Tech EcosystemsBuild a Tech Brand During Covid in Emerging Tech Ecosystems
Build a Tech Brand During Covid in Emerging Tech Ecosystems
 
Sailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
Sailing Through a Sea of CMS: Build and Extend APIs Faster With StrapiSailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
Sailing Through a Sea of CMS: Build and Extend APIs Faster With Strapi
 
Doing E-commerce Right – Magento on DigitalOcean
Doing E-commerce Right – Magento on DigitalOceanDoing E-commerce Right – Magento on DigitalOcean
Doing E-commerce Right – Magento on DigitalOcean
 
Headless E-commerce That People Love
Headless E-commerce That People LoveHeadless E-commerce That People Love
Headless E-commerce That People Love
 
The Cloud Hosting Revolution Creates Opportunities for Your Business
The Cloud Hosting Revolution Creates Opportunities for Your BusinessThe Cloud Hosting Revolution Creates Opportunities for Your Business
The Cloud Hosting Revolution Creates Opportunities for Your Business
 
Build, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
Build, Deploy, and Scale Your First Web App Using DigitalOcean App PlatformBuild, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
Build, Deploy, and Scale Your First Web App Using DigitalOcean App Platform
 
Effective Kubernetes Onboarding
Effective Kubernetes OnboardingEffective Kubernetes Onboarding
Effective Kubernetes Onboarding
 
Creating Inclusive Learning Experiences
Creating Inclusive Learning ExperiencesCreating Inclusive Learning Experiences
Creating Inclusive Learning Experiences
 
Command-line Your Way to PaaS Productivity With DigitalOcean App Platform
Command-line Your Way to PaaS Productivity With DigitalOcean App PlatformCommand-line Your Way to PaaS Productivity With DigitalOcean App Platform
Command-line Your Way to PaaS Productivity With DigitalOcean App Platform
 
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
Escape the Walls of PaaS: Unlock the Power & Flexibility of DigitalOcean App ...
 
Kubernetes: Beyond Baby Steps
Kubernetes: Beyond Baby StepsKubernetes: Beyond Baby Steps
Kubernetes: Beyond Baby Steps
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking Needs
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
 
Secrets to Building & Scaling SRE Teams
Secrets to Building & Scaling SRE TeamsSecrets to Building & Scaling SRE Teams
Secrets to Building & Scaling SRE Teams
 
Deploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub ActionsDeploying to DigitalOcean With GitHub Actions
Deploying to DigitalOcean With GitHub Actions
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
 
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
Doing This Cloud Thing Right – a Lap Around DigitalOcean Products and a Roadm...
 

Recently uploaded

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 

Recently uploaded (20)

Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 

Kubernetes for Beginners

  • 2. Who am I? Peeyush Gupta Sr. Developer Advocate @ DigitalOcean #sig-contribex (@pensu91) @pensu91 pgupta@digitalocean.com
  • 3. Agenda ● Revisiting Containers ● Introduction to Kubernetes Architecture ● Kubernetes building blocks ● Kubernetes objects and workloads ● Q & A
  • 4. How did we get here? ● This is how traditional deployments models worked when we only had bare metal servers to run the workloads. ● There was very little to no isolation and applications had to be very careful in using the resources.
  • 5. How did we get here? ● To take advantage of increasing resources, people started using hypervisors and virtualization was born! ● The idea is to divide the server resources and provide isolated environment to applications ● This provided an easier and efficient way of managing resources.
  • 6. How did we get here? ● What’s next after virtualization? ● The next leap is to remove the redundant Operating System layer. ● What if we can use the already existing operating system? ● This was called containerization.
  • 7. The journey so far...
  • 9. What are containers? ● A package of application code and all of its dependencies ○ Includes everything needed to run the application ● Built around two Linux kernel features ○ Namespaces: Process isolation ○ Cgroups: Resource limits ● Why are they important? ○ Resource efficient and fast ○ Portable across teams
  • 10. Containers ● Container Images ● Containers ● Container Runtime ● Container Registries
  • 11. Container Orchestration ● What if we have 10s, 100s, 1000s of running containers on multiple VMs? ● How to deploy, scale, restart, manage all of these containers? ● What problems do they solve? ○ Deployment ○ Management ○ Health Checks ○ Security ○ Networking
  • 12. Kubernetes ● Also known as “K8s” ● Evolved out of Borg (Google’s internal container cluster) ● One of the most famous open source project on Github ● Features added regularly and frequently ● Governed by CNCF
  • 13. Why Kubernetes ● Resource Efficient ○ Smart scheduler to distribute load on to the worker nodes. ● Increased Productivity ○ Improves the work flow of application and CI/CD pipeline. ● Scalability ○ Just one command to scale up or down the application. ● High Availability ○ Maintain high availability of applications using built-in services. ● Self-Healing ○ Auto restarts of failed application in order to maintain the state.
  • 15. Kubernetes Components ● Control Plane ○ API server ○ Scheduler ○ Controllers ■ Kubernetes ■ Cloud ○ Etcd ● Nodes ○ Kubelet ○ Kube-proxy
  • 16. How to connect to Kubernetes cluster ● Hit REST API directly ○ Can use curl, client libraries, etc. ● Kubectl ○ Command-line tool to interact with control plane ○ Abstracts away multiple REST API calls ○ Provides “get” “create” “delete” “describe”, etc. functionality ○ Filtering results
  • 18. Namespaces ● An abstraction that allows you to divide a cluster into multiple scoped “virtual clusters” ○ E.g. Each team gets its own Namespace with associated resource quota ● Primary mechanism for scoping and limiting access ● Kubernetes usually starts with 3 Namespaces by default ○ default ○ kube-system ○ kube-public
  • 19. ● The smallest unit of deployment ● Can contain more that 1 containers ● Pod runs as a single unit so all the containers that are part of a pod run on same node always. ● Network/Storage resources are shared among containers in a pod Pods
  • 20. Pods apiVersion: v1 kind: Pod metadata: name: nginx-pod spec: containers: - name: nginx image: nginx:latest Deploy the pod: kubectl apply -f pod.yaml
  • 21. Deployment ● Object that can contain your applications ● Run multiple replicas ● Replace the failed pods with healthy ones ● Scale up/down pods and update replicas 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.14.2 ports: - containerPort 80
  • 22. Services ● Services: Abstraction to expose an app as a service (think microservices) ● Load balancing traffic ○ Routing to “healthy” / “available” Pods ● Routing selection via Labels ● 3 types ○ Cluster IP ○ NodePort ○ LoadBalancer Service User Node 1 Node 2 Replica 1 Replica 2
  • 24. Service - Load Balancer
  • 25. Storage ● Persistent Volume (PV ○ A storage volume that can be attached to pod ○ Can be created either by administrator (static provisioning) or create on the fly (dynamic provisioning) via storage class ● Persistent volume claims (PVC ○ A request for storage by a user. ○ PVC consumes PV resource. ○ Storage class creates PV based on specification given in PVC ● Volume inside a single pod can also be used to communicate between containers. ● Most of the storage providers now have CSI Container Storage Interface) driver.
  • 26. Configmaps and Secrets ● Configmaps ○ Used to store config data as key value pairs. ○ Can store env variables, config files etc. ● Secrets ○ Manage sensitive information such as password, auth tokens, ssh keys etc. ○ Base-64 encoded, plugins available to encrypt as well. ● Configmaps and secrets can be used either as env variables or mounted as volumes to the pod.
  • 27. Helm ● Package manager for Kubernetes ● Helps developers to package, manage, deploy applications and services to Kubernetes cluster. ● Packages are called helm charts. ● Helm client talks to chart repository to install. ● Also provides options to configure charts before installing. helm init helm install stable/wordpress
  • 28. What else? ● Autoscaling ● RBAC policies ● Resource quotas ● Kubernetes Extensions ● Logging and monitoring ● And much more...