SlideShare a Scribd company logo
Kubernetes Immersion
Introduction: Who Am I
 Juan Larriba
 DevOps Engineer at everis cloud services
 @compilemymind
Introduction: Containers
 Containers are gaining a lot of traction because they isolate different
applications on the same physical or virtual hardware
 Usually, servers are provisioned for the worst case scenario, leading to a lot of
unused resources most of the time
 Containerization lets us to securely share that hardware between different
applications that can work a different times, optimizing the usage time
Introduction: Container Orchestrators
 Currently there are 4 main container orchestrators fighting to be the market
leader
 Kubernetes
 Mesos
 Docker Swarm
 Service Fabric
Kubernetes Architecture
Architecture
Architecture
 Kubernetes is programmed as a monolithic application but deployed as a
microservices application
 It relies on external services for networking and persistent storage of its own
state
 All comunications, both external and internal, use the HTTPS protocol
Architecture: Software Defined Networking
 One of the first problems we face when working with Docker, is the manual
port management issue
 When deploying a number of containers on the same machine, we need to
track manually which ports is exposing each container
 To avoid this problem, Kubernetes uses a Software Defined Networking
(commonly Flannel, but also WeaveNet and others)
 Each container is then automatically assigned a different IP, so all of them
can expose the same port
Architecture: etcd
 Kubernetes needs to persist its state in some kind of persistent storage
 It uses exclusively etcd as its backend
 etcd is a distributed key-value storage created by the CoreOS team
 Each etcd major version breaks the previous API
 As of Kubernetes 1.6, the version used is etcd3
Architecture: Kubelet
 The Kubelet is a native Linux daemon that needs to be executed in each
member of a cluster: masters and nodes
 Is the executor of the commands
 It communicates with its node Docker API to effectively launch the Docker
containers required by other Kubernetes components
 It really can work standalone, acting as a Supervisord of Docker containers
 It is the only Kubernetes component that does not work as a Docker
container
Architecture: kube-apiserver
 It is deployed only in the master
 It is the entrypoint for the Kubernetes cluster
 It exposes a REST API
 The client communicates and sends commands to the apiserver, who
validates the information sent and if it is correct stores it in etcd
Architecture: kube-scheduler
 It is deployed only in the master
 The Scheduler is aware of the cluster status and decides where the new
objects must be colocated
 It is a very complex piece of software, the real “brain” of the Kubernetes
cluster
 As stated in Kubernetes documentation:
The scheduler needs to take into account individual and collective resource requirements,
quality of service requirements, hardware/software/policy constraints, affinity and anti-
affinity specifications, data locality, inter-workload interference, deadlines, and so on
Architecture: kube-controller-manager
 It is deployed only in the master
 The Controller-Manager is a the control loop of the cluster
 The Controller-Manager watches the shared state of the cluster stored in
etcd by the API Server
 It continuously compares the desired state of the cluster with the current
state and notifies the other components of the cluster to perform the actions
needed to move the cluster towards the desired state
Architecture: kube-proxy
 It is deployed as a static pod on each node of the cluster
 Implements Services capabilities
Kubernetes Addons
Addons: Ingress Controller
 It provides a way to route external requests to applications in the cluster
 Matches DNS names and contexts (which external clients like browsers can
understand) to Kubernetes Services
 One specification, multiple implementations
 Currently we use the Nginx implementation, but a custom implementation is
easily done
Addons: Dashboard
 A web frontend for the cluster
 It shows in a graphical UI all the information that can be obtained through
the API or the CLI
 Embeds the limited monitoring capabilities previously present on Kubedash,
which has been deprecated
Addons: Heapster
 Reads monitoring data from the Kubelet (extracted from the Docker API and
the node it lives in) and exposes it via a REST API
 It can be deployed standalone and it will store all the cluster metrics for the
last 15 minutes
 It can be plugged to different backends, currently supporting Log, InfluxDB,
Google Cloud Monitoring, Google Cloud Logging, Hawkular-Metrics,
OpenTSDB, Monasca, Kafka, Riemann, Elasticsearch…
 When plugged to a backend, it will store unlimited metrics (limited by the
backend policies)
Addons: kube-dns
 Kubernetes uses DNS for service discovery
 As each application deployed in the cluster will have its own IP, Kubernetes
provides a way to resolve service names to Ips
 Until versión 1.3, it used SkyDNS is a Google implementation of the DNS
protocol in Go with etcd storage and REST API
 From 1.4 onwards, it uses dnsmasq with a Go REST API which modifies
and reloads the configuration
Kubernetes Objects
Objects: Pod
 The most basic unit of computation in Kubernetes is a Pod
 A Pod can contain one or more Docker containers, but for simplification, we
will only store one container in one Pod
 Each Pod definition passed to the Kubelet creates, at least, two Docker
containers: the user container and a special Pod container that handles the
networking
 A Pod has a SDN assigned IP, and thus it is only accessible from the same
node
Objects: Service
 Defines a “ClusterIP” so a Pod can be reached from each node of the cluster
 Every replica of the same Pod share the same Service, which acts as Load
Balancer
 A Service is not an Nginx or an HAProxy, it does not consume resources nor
it is deployed to a node. It is a kube-proxy configuration
 Depending on the IaaS, a Service can aquire an external IP
Objects: Ingress
 Exposes a Service with a network wide URL so it can be accessed from the
outside world
 Provides a much more safer and manageable way of accessing services
than directly exposing IPs
 The Ingress endpoint is provided by the Ingress Controller Addon
Objects: ReplicationController
 Ensures that a specified number of pod “replicas” are running at any one
time
 If there are too many pods, it will kill some. If there are too few, the
replication controller will start more
 You can think of a replication controller as something similar to a process
supervisor, but rather than individual processes on a single node, the
replication controller supervises multiple pods across multiple nodes
Objects: ReplicaSet
 It is the next-gen ReplicationController, still in beta.
 The biggest difference is that ReplicaSets do not support the rolling-update
command
 ReplicaSets can be used standalone, but their main usage is to be used by
Deployments to orchestrate pod creation, deletion and updates
 When you use Deployments you don’t have to worry about managing the
Replica Sets that they create
Objects: Deployment
 Provides declarative updates for ReplicaSet
 It provides all the capabilities of a Replication Controller, but adds other
powerful features
 It adds the versioning feature: a Deployment is able to track the previously
deployed versions and perform easy rollbacks
 Pause and Resume
 Update the Deployment to recreate the pods
Objects: DaemonSet
 It is a special kind of ReplicationController that ensures one replica of a pod
is running on each node of the cluster
 You do not specify directly how many replicas does a DaemonSet deploys
 As nodes are added to the cluster, pods are added to them. As nodes are
removed from the cluster, those pods are garbage collected
Objects: Namespace
 Every Kubernetes Object must be unique
 This can be a nightmare as the cluster grows
 To avoid this problem, each Object is created inside a Namespace, and its
name only needs to be unique to that Namespace.
 DNS Service Discovery takes in account the Service Name and the
Namespace when resolving
Kubernetes Persistence
Persistence: Volume
 A Kubernetes Volume is a temporal data storage that lives while the pod is
alive
 It persists through container restarts, but a pod restart will erase the
information
 It is meant to be shared between different containers of the same Pod
 As we take the approach of having just one container for each Pod, these
kind of volumes do not have any usage
Persistence: Persistent Volume
 When containers need to store information in a persistent way, we use
Persistent Volumes
 A Persistent Volume is a piece of networked storage provisioned and made
available to the cluster by an administrator
 It is not meant to be created during a normal Kubernetes workflow
 It is an abstraction of hardware resources (disk storage) so Pods can use it
without knowing what underlying technology provides the storage
Persistence: Persistent Volume Claim
 When a user of the cluster wants to request storage for his Pods, he creates
a Persistent Volume Claim
 The Claim object will automatically search the pooled and unused Persistent
Volumes to find one that matches the request
 Once a Persistent Volume has been claimed, its ownership cannot be
changed until the Claim is removed from the cluster
Persistence: Storage Class
 Persistent Volumes can be dynamically provisioned using Storage Classes
 Each Storage Class is unique for a kind of storage. The key is that the
platform Kubernetes resides in has an API for storage provisioning
 All the major IaaS providers have Storage Classes already available:
Amazon EBS, Google Cloud Disk, Azure Disk and OpenStack Cinder are
amongst the supported types,
Kubernetes CLI
CLI: Frequent Commands
 kubectl get namespace
 kubectl get pods –namespace default
 kubectl describe pod <podname>
 kubectl logs <podname>
 kubectl exec –it <podname> bash
 kubectl create –f <filename.yml>
DEMO
KUBERNETES ADVANCED
Advanced: Secret
 It is meant to hold sensitive information, such as password, in an encrypted
way
 Putting secret info in a Secret is safer thant putting it verbatim in a Pod
definition or a Docker image
 Secrets are used by Pods by mounting them in a container Volume
Advanced: ConfigMap
 It is a standard way of storing generic configuration as a Kubernetes object
 It is very similar to a Secret, but to work with string that do not contain
sensitive information
 It can be thought of a HashMap for Kubernetes.
Advanced: Horizontal Pod Autoscaler
 It can automatically scale the number of Pods in a ReplicationController,
Deployment or ReplicaSet based on observed CPU utilization
 The user defines an autoscaling rule referencing CPU: Scale when the Pod
is at 80% CPU for 2 minutes with an upper limit of 10 replicas
 Then, the autoscaler polls the CPU metric and scale up or down based on
that rule
 Its functionality is very limited
Advanced: Resource Limits
 When created without limits, a container inside a Pod can potentially
demand all the node’s resources
 As not all the containers peak at the same time, this beahivour is sometimes
wonderful, as it cut down infrastructure costs
 But for the moments we need hard limits, we can establish limits to both a
Pod or a Namespace
Advanced: REST API
 As stated before, the only interface the Kubernetes components expose to
the world and between them, is an HTTPS one
 Thus, everything can be achieved accessing directly the REST API exposed
by the apiserver
 An extensive API documentation can be found in the Kubernetes
documentation page
Advanced: Downward API
 Allows containers to consume information about themselves or the system
and expose that information how they want it, without necessarily coupling to
the Kubernetes client or REST API
 It is a way to declarative use the Kubernetes API while writing YAML files
 Examples of common information retrieved with Downward API are the
Pod’s IP or its memory and CPU limits
Q&A
Questions and Answers
@compilemymind

More Related Content

What's hot

WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Brian Grant
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
Satnam Singh
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
NexThoughts Technologies
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
rajdeep
 
Marc Sluiter - 15 Kubernetes Features in 15 Minutes
Marc Sluiter - 15 Kubernetes Features in 15 MinutesMarc Sluiter - 15 Kubernetes Features in 15 Minutes
Marc Sluiter - 15 Kubernetes Features in 15 Minutes
Marc Sluiter
 
Containerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to KubernetesContainerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to Kubernetes
Ashley Roach
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
inovex GmbH
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Eric Gustafson
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Vishal Biyani
 
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
brendandburns
 
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv VishwkarmaKubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Rajiv Vishwkarma
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
Sparkbit
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
Steve Watt
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
Docker, Inc.
 
Docker & Kubernetes intro
Docker & Kubernetes introDocker & Kubernetes intro
Docker & Kubernetes intro
Arnon Rotem-Gal-Oz
 
Apache Stratos 4.1.0 Architecture
Apache Stratos 4.1.0 ArchitectureApache Stratos 4.1.0 Architecture
Apache Stratos 4.1.0 Architecture
Imesh Gunaratne
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
Avanti Patil
 

What's hot (20)

WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
 
Cluster management with Kubernetes
Cluster management with KubernetesCluster management with Kubernetes
Cluster management with Kubernetes
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Marc Sluiter - 15 Kubernetes Features in 15 Minutes
Marc Sluiter - 15 Kubernetes Features in 15 MinutesMarc Sluiter - 15 Kubernetes Features in 15 Minutes
Marc Sluiter - 15 Kubernetes Features in 15 Minutes
 
Containerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to KubernetesContainerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to Kubernetes
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
 
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv VishwkarmaKubernates : An Small introduction for Beginners by Rajiv Vishwkarma
Kubernates : An Small introduction for Beginners by Rajiv Vishwkarma
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
 
Docker & Kubernetes intro
Docker & Kubernetes introDocker & Kubernetes intro
Docker & Kubernetes intro
 
Apache Stratos 4.1.0 Architecture
Apache Stratos 4.1.0 ArchitectureApache Stratos 4.1.0 Architecture
Apache Stratos 4.1.0 Architecture
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 

Viewers also liked

Kubernetes to scale
Kubernetes to scaleKubernetes to scale
Kubernetes to scale
Michele Orsi
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
Simon Su
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor Microservices
Sysdig
 
Introduction to container mangement
Introduction to container mangementIntroduction to container mangement
Introduction to container mangement
Martin Marcher
 
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Ben Hall
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Martin Danielsson
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
Haufe-Lexware GmbH & Co KG
 
RackN DevOps meetup NYC
RackN DevOps meetup NYCRackN DevOps meetup NYC
RackN DevOps meetup NYC
Bob Sokol
 
Welcome talk for Moscow Kubernetes Meetup 1
Welcome talk for Moscow Kubernetes Meetup 1Welcome talk for Moscow Kubernetes Meetup 1
Welcome talk for Moscow Kubernetes Meetup 1
MoscowKubernetes
 
Net core, mssql, container und kubernetes
Net core, mssql, container und kubernetesNet core, mssql, container und kubernetes
Net core, mssql, container und kubernetes
Thomas Fricke
 
Opening: builderscon tokyo 2016
Opening: builderscon tokyo 2016Opening: builderscon tokyo 2016
Opening: builderscon tokyo 2016
lestrrat
 
Mirantis Contributions to Kubernetes Ecosystem
Mirantis Contributions to Kubernetes EcosystemMirantis Contributions to Kubernetes Ecosystem
Mirantis Contributions to Kubernetes Ecosystem
MoscowKubernetes
 
Ростислав Фридман: “Kubernetes как средство управления микросервисами"
Ростислав Фридман: “Kubernetes как средство управления микросервисами"Ростислав Фридман: “Kubernetes как средство управления микросервисами"
Ростислав Фридман: “Kubernetes как средство управления микросервисами"
Provectus
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
Varun Talwar
 
Keeping up with Tech
Keeping up with Tech Keeping up with Tech
Keeping up with Tech
Elana Krasner
 
Docker Containers in Azure
Docker Containers in AzureDocker Containers in Azure
Docker Containers in Azure
Aarno Aukia
 
Deploy your favorite apps on Kubernetes
Deploy your favorite apps on KubernetesDeploy your favorite apps on Kubernetes
Deploy your favorite apps on Kubernetes
Adnan Abdulhussein
 
Kubernetes as Orchestrator for A10 Lightning Controller
Kubernetes as Orchestrator for A10 Lightning ControllerKubernetes as Orchestrator for A10 Lightning Controller
Kubernetes as Orchestrator for A10 Lightning Controller
Akshay Mathur
 

Viewers also liked (20)

Kubernetes to scale
Kubernetes to scaleKubernetes to scale
Kubernetes to scale
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor Microservices
 
Introduction to container mangement
Introduction to container mangementIntroduction to container mangement
Introduction to container mangement
 
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with KubernetesTips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
Tips on solving E_TOO_MANY_THINGS_TO_LEARN with Kubernetes
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
 
RackN DevOps meetup NYC
RackN DevOps meetup NYCRackN DevOps meetup NYC
RackN DevOps meetup NYC
 
Welcome talk for Moscow Kubernetes Meetup 1
Welcome talk for Moscow Kubernetes Meetup 1Welcome talk for Moscow Kubernetes Meetup 1
Welcome talk for Moscow Kubernetes Meetup 1
 
Net core, mssql, container und kubernetes
Net core, mssql, container und kubernetesNet core, mssql, container und kubernetes
Net core, mssql, container und kubernetes
 
Opening: builderscon tokyo 2016
Opening: builderscon tokyo 2016Opening: builderscon tokyo 2016
Opening: builderscon tokyo 2016
 
Mirantis Contributions to Kubernetes Ecosystem
Mirantis Contributions to Kubernetes EcosystemMirantis Contributions to Kubernetes Ecosystem
Mirantis Contributions to Kubernetes Ecosystem
 
Ростислав Фридман: “Kubernetes как средство управления микросервисами"
Ростислав Фридман: “Kubernetes как средство управления микросервисами"Ростислав Фридман: “Kubernetes как средство управления микросервисами"
Ростислав Фридман: “Kubernetes как средство управления микросервисами"
 
Microservices summit talk 1/31
Microservices summit talk   1/31Microservices summit talk   1/31
Microservices summit talk 1/31
 
Keeping up with Tech
Keeping up with Tech Keeping up with Tech
Keeping up with Tech
 
Docker Containers in Azure
Docker Containers in AzureDocker Containers in Azure
Docker Containers in Azure
 
Deploy your favorite apps on Kubernetes
Deploy your favorite apps on KubernetesDeploy your favorite apps on Kubernetes
Deploy your favorite apps on Kubernetes
 
Kubernetes as Orchestrator for A10 Lightning Controller
Kubernetes as Orchestrator for A10 Lightning ControllerKubernetes as Orchestrator for A10 Lightning Controller
Kubernetes as Orchestrator for A10 Lightning Controller
 

Similar to Kubernetes Immersion

KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
Ryuzaki360
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
Elad Hirsch
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
Will Hall
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Meiyappan Kannappa
 
Kubernetes
KubernetesKubernetes
Kubernetes
Lhouceine OUHAMZA
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
ssuser9b44c7
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
Shreya Pohekar
 
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers ComparisonKubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
jeetendra mandal
 
Managing containers at scale
Managing containers at scale          Managing containers at scale
Managing containers at scale
Smruti Ranjan Tripathy
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
Ajeet Singh
 
Newesis - Introduction to Containers
Newesis -  Introduction to ContainersNewesis -  Introduction to Containers
Newesis - Introduction to Containers
Rauno De Pasquale
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
OWASPSeasides
 
Docker Online Training | Kubernetes Training in Ameerpet
Docker Online Training | Kubernetes Training in AmeerpetDocker Online Training | Kubernetes Training in Ameerpet
Docker Online Training | Kubernetes Training in Ameerpet
navyatejavisualpath
 
Kubernetes
KubernetesKubernetes
Kubernetes
Srinath Reddy
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
Joonathan Mägi
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
Gayan Gunarathne
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
Gayan Gunarathne
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
csegayan
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
Gokhan Boranalp
 

Similar to Kubernetes Immersion (20)

KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
 
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers ComparisonKubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
 
Managing containers at scale
Managing containers at scale          Managing containers at scale
Managing containers at scale
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Newesis - Introduction to Containers
Newesis -  Introduction to ContainersNewesis -  Introduction to Containers
Newesis - Introduction to Containers
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
 
Docker Online Training | Kubernetes Training in Ameerpet
Docker Online Training | Kubernetes Training in AmeerpetDocker Online Training | Kubernetes Training in Ameerpet
Docker Online Training | Kubernetes Training in Ameerpet
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 

Kubernetes Immersion

  • 2. Introduction: Who Am I  Juan Larriba  DevOps Engineer at everis cloud services  @compilemymind
  • 3. Introduction: Containers  Containers are gaining a lot of traction because they isolate different applications on the same physical or virtual hardware  Usually, servers are provisioned for the worst case scenario, leading to a lot of unused resources most of the time  Containerization lets us to securely share that hardware between different applications that can work a different times, optimizing the usage time
  • 4. Introduction: Container Orchestrators  Currently there are 4 main container orchestrators fighting to be the market leader  Kubernetes  Mesos  Docker Swarm  Service Fabric
  • 7. Architecture  Kubernetes is programmed as a monolithic application but deployed as a microservices application  It relies on external services for networking and persistent storage of its own state  All comunications, both external and internal, use the HTTPS protocol
  • 8. Architecture: Software Defined Networking  One of the first problems we face when working with Docker, is the manual port management issue  When deploying a number of containers on the same machine, we need to track manually which ports is exposing each container  To avoid this problem, Kubernetes uses a Software Defined Networking (commonly Flannel, but also WeaveNet and others)  Each container is then automatically assigned a different IP, so all of them can expose the same port
  • 9. Architecture: etcd  Kubernetes needs to persist its state in some kind of persistent storage  It uses exclusively etcd as its backend  etcd is a distributed key-value storage created by the CoreOS team  Each etcd major version breaks the previous API  As of Kubernetes 1.6, the version used is etcd3
  • 10. Architecture: Kubelet  The Kubelet is a native Linux daemon that needs to be executed in each member of a cluster: masters and nodes  Is the executor of the commands  It communicates with its node Docker API to effectively launch the Docker containers required by other Kubernetes components  It really can work standalone, acting as a Supervisord of Docker containers  It is the only Kubernetes component that does not work as a Docker container
  • 11. Architecture: kube-apiserver  It is deployed only in the master  It is the entrypoint for the Kubernetes cluster  It exposes a REST API  The client communicates and sends commands to the apiserver, who validates the information sent and if it is correct stores it in etcd
  • 12. Architecture: kube-scheduler  It is deployed only in the master  The Scheduler is aware of the cluster status and decides where the new objects must be colocated  It is a very complex piece of software, the real “brain” of the Kubernetes cluster  As stated in Kubernetes documentation: The scheduler needs to take into account individual and collective resource requirements, quality of service requirements, hardware/software/policy constraints, affinity and anti- affinity specifications, data locality, inter-workload interference, deadlines, and so on
  • 13. Architecture: kube-controller-manager  It is deployed only in the master  The Controller-Manager is a the control loop of the cluster  The Controller-Manager watches the shared state of the cluster stored in etcd by the API Server  It continuously compares the desired state of the cluster with the current state and notifies the other components of the cluster to perform the actions needed to move the cluster towards the desired state
  • 14. Architecture: kube-proxy  It is deployed as a static pod on each node of the cluster  Implements Services capabilities
  • 16. Addons: Ingress Controller  It provides a way to route external requests to applications in the cluster  Matches DNS names and contexts (which external clients like browsers can understand) to Kubernetes Services  One specification, multiple implementations  Currently we use the Nginx implementation, but a custom implementation is easily done
  • 17. Addons: Dashboard  A web frontend for the cluster  It shows in a graphical UI all the information that can be obtained through the API or the CLI  Embeds the limited monitoring capabilities previously present on Kubedash, which has been deprecated
  • 18. Addons: Heapster  Reads monitoring data from the Kubelet (extracted from the Docker API and the node it lives in) and exposes it via a REST API  It can be deployed standalone and it will store all the cluster metrics for the last 15 minutes  It can be plugged to different backends, currently supporting Log, InfluxDB, Google Cloud Monitoring, Google Cloud Logging, Hawkular-Metrics, OpenTSDB, Monasca, Kafka, Riemann, Elasticsearch…  When plugged to a backend, it will store unlimited metrics (limited by the backend policies)
  • 19. Addons: kube-dns  Kubernetes uses DNS for service discovery  As each application deployed in the cluster will have its own IP, Kubernetes provides a way to resolve service names to Ips  Until versión 1.3, it used SkyDNS is a Google implementation of the DNS protocol in Go with etcd storage and REST API  From 1.4 onwards, it uses dnsmasq with a Go REST API which modifies and reloads the configuration
  • 21. Objects: Pod  The most basic unit of computation in Kubernetes is a Pod  A Pod can contain one or more Docker containers, but for simplification, we will only store one container in one Pod  Each Pod definition passed to the Kubelet creates, at least, two Docker containers: the user container and a special Pod container that handles the networking  A Pod has a SDN assigned IP, and thus it is only accessible from the same node
  • 22. Objects: Service  Defines a “ClusterIP” so a Pod can be reached from each node of the cluster  Every replica of the same Pod share the same Service, which acts as Load Balancer  A Service is not an Nginx or an HAProxy, it does not consume resources nor it is deployed to a node. It is a kube-proxy configuration  Depending on the IaaS, a Service can aquire an external IP
  • 23. Objects: Ingress  Exposes a Service with a network wide URL so it can be accessed from the outside world  Provides a much more safer and manageable way of accessing services than directly exposing IPs  The Ingress endpoint is provided by the Ingress Controller Addon
  • 24. Objects: ReplicationController  Ensures that a specified number of pod “replicas” are running at any one time  If there are too many pods, it will kill some. If there are too few, the replication controller will start more  You can think of a replication controller as something similar to a process supervisor, but rather than individual processes on a single node, the replication controller supervises multiple pods across multiple nodes
  • 25. Objects: ReplicaSet  It is the next-gen ReplicationController, still in beta.  The biggest difference is that ReplicaSets do not support the rolling-update command  ReplicaSets can be used standalone, but their main usage is to be used by Deployments to orchestrate pod creation, deletion and updates  When you use Deployments you don’t have to worry about managing the Replica Sets that they create
  • 26. Objects: Deployment  Provides declarative updates for ReplicaSet  It provides all the capabilities of a Replication Controller, but adds other powerful features  It adds the versioning feature: a Deployment is able to track the previously deployed versions and perform easy rollbacks  Pause and Resume  Update the Deployment to recreate the pods
  • 27. Objects: DaemonSet  It is a special kind of ReplicationController that ensures one replica of a pod is running on each node of the cluster  You do not specify directly how many replicas does a DaemonSet deploys  As nodes are added to the cluster, pods are added to them. As nodes are removed from the cluster, those pods are garbage collected
  • 28. Objects: Namespace  Every Kubernetes Object must be unique  This can be a nightmare as the cluster grows  To avoid this problem, each Object is created inside a Namespace, and its name only needs to be unique to that Namespace.  DNS Service Discovery takes in account the Service Name and the Namespace when resolving
  • 30. Persistence: Volume  A Kubernetes Volume is a temporal data storage that lives while the pod is alive  It persists through container restarts, but a pod restart will erase the information  It is meant to be shared between different containers of the same Pod  As we take the approach of having just one container for each Pod, these kind of volumes do not have any usage
  • 31. Persistence: Persistent Volume  When containers need to store information in a persistent way, we use Persistent Volumes  A Persistent Volume is a piece of networked storage provisioned and made available to the cluster by an administrator  It is not meant to be created during a normal Kubernetes workflow  It is an abstraction of hardware resources (disk storage) so Pods can use it without knowing what underlying technology provides the storage
  • 32. Persistence: Persistent Volume Claim  When a user of the cluster wants to request storage for his Pods, he creates a Persistent Volume Claim  The Claim object will automatically search the pooled and unused Persistent Volumes to find one that matches the request  Once a Persistent Volume has been claimed, its ownership cannot be changed until the Claim is removed from the cluster
  • 33. Persistence: Storage Class  Persistent Volumes can be dynamically provisioned using Storage Classes  Each Storage Class is unique for a kind of storage. The key is that the platform Kubernetes resides in has an API for storage provisioning  All the major IaaS providers have Storage Classes already available: Amazon EBS, Google Cloud Disk, Azure Disk and OpenStack Cinder are amongst the supported types,
  • 35. CLI: Frequent Commands  kubectl get namespace  kubectl get pods –namespace default  kubectl describe pod <podname>  kubectl logs <podname>  kubectl exec –it <podname> bash  kubectl create –f <filename.yml>
  • 36. DEMO
  • 38. Advanced: Secret  It is meant to hold sensitive information, such as password, in an encrypted way  Putting secret info in a Secret is safer thant putting it verbatim in a Pod definition or a Docker image  Secrets are used by Pods by mounting them in a container Volume
  • 39. Advanced: ConfigMap  It is a standard way of storing generic configuration as a Kubernetes object  It is very similar to a Secret, but to work with string that do not contain sensitive information  It can be thought of a HashMap for Kubernetes.
  • 40. Advanced: Horizontal Pod Autoscaler  It can automatically scale the number of Pods in a ReplicationController, Deployment or ReplicaSet based on observed CPU utilization  The user defines an autoscaling rule referencing CPU: Scale when the Pod is at 80% CPU for 2 minutes with an upper limit of 10 replicas  Then, the autoscaler polls the CPU metric and scale up or down based on that rule  Its functionality is very limited
  • 41. Advanced: Resource Limits  When created without limits, a container inside a Pod can potentially demand all the node’s resources  As not all the containers peak at the same time, this beahivour is sometimes wonderful, as it cut down infrastructure costs  But for the moments we need hard limits, we can establish limits to both a Pod or a Namespace
  • 42. Advanced: REST API  As stated before, the only interface the Kubernetes components expose to the world and between them, is an HTTPS one  Thus, everything can be achieved accessing directly the REST API exposed by the apiserver  An extensive API documentation can be found in the Kubernetes documentation page
  • 43. Advanced: Downward API  Allows containers to consume information about themselves or the system and expose that information how they want it, without necessarily coupling to the Kubernetes client or REST API  It is a way to declarative use the Kubernetes API while writing YAML files  Examples of common information retrieved with Downward API are the Pod’s IP or its memory and CPU limits