SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Kubernetes
Basics
Everyone’s container journey starts with one container….
2
At first the growth is easy to handle….
3
But soon you have many applications, many instances…
4
And that is why there is container orchestration
5
What is container orchestration?
6
Cluster management creates unified targets
for varied workload
Scheduling intelligently distributes containers
across nodes
Service discovery knows where containers are
located and provides a method to direct
requests to them
Replication allows the workload to be scaled
Health management creates a method to
ensure the application is assured to be viable
by allowing unhealthy containers to be
replaced
Container Orchestrator
Manager
Scheduler
Replicator
Node
Daemon
Containers
Node
Daemon
Containers
Node
Daemon
Containers
Image
repository
Discovery
DB
Management of the deployment, placement, and lifecycle of workload containers
Container ecosystem
© Copyright IBM Corporation 2017
Container scheduling
Container orchestration
Virtual infrastructure
Container engine
Physical infrastructure
Operating system
Application workflow
1
2
3
4
5
6
7
Kubernetes,
Docker Swarm,
Apache Mesos
Docker
VMWare, AWS
Ubuntu, RedHat,
CoreOS
What is Kubernetes? Fully open source container orchestrator inspired
and informed by Google's experiences and internal
systems
Unified API for deploying web applications, batch
jobs, and databases maintaining and tracking the
global view of the cluster
Supports multiple cloud and bare-metal
environments
Manage applications, not machines providing a
better framework to support rolling updates, canary
deploys, and blue-green deployments
Designed for extensibility
Rich ecosystem of plug-ins for scheduling, storage,
and networking
Open source project managed by the Linux
Foundation
Kubernetes strengths
Clear governance model
‒ Managed by the Linux Foundation.
‒ Google is driving the product features and roadmap, while allowing the rest of the ecosystem to participate.
Growing and vibrant ecosystem
‒ IBM, Huawei, Intel, and Red Hat are among the companies making prominent contributions to the project.
Avoid dependency and vendor lock-in
‒ Active community participation and ecosystem support.
Support for a wide range of deployment options
‒ Customers can choose between bare metal, virtualization, private, public, and hybrid cloud deployments
‒ Wide range of delivery models across on-premises and cloud-based services.
Design is more operations-centric
‒ First choice of DevOps teams.
10
Kubernetes
The Building Blocks
Immutability
Build Once - Deploy Everywhere
The same container image is
built once and is moved
between environments
Pod
A single unit of work in Kubernetes, which may consist of one or more containers
All containers in a pod
are co-located and co-
scheduled, and share
the kernel namespace
(process, storage,
network, etc.)
Pod Health Checking
Pods are automatically kept alive by “process check” checking the basic status of the main
process for the application
To go beyond this Kubernetes
allows you to create a
liveness probe to provide
additional means for
identifying health.
Config Maps & Secrets
Share and store configurations, credentials and more
Store the configurations and
secrets (credentials,
certificates) in the K8s
environment and mount them
to the local filesystem within
container(s)
The container image can
move un-changed between
environments (i.e. container
immutability)
Replicaset
Replicasets run one-to-
many instances of the
desired pod
When possible the replica
pod should be stateless or
near-stateless
Scale pods horizontally and provide resiliency
Service Discovery
Kubernetes has an internal DNS that is used as a Service Registry.
A Service resource in
Kubernetes results in an
entry in the internal DNS
By default, a Service points
to an internal Cluster IP that
load balances between a set
of healthy running pods
Ingress Resources
External access to applications running in Kubernetes may be enabled through Ingress
resources and proxy nodes
The proxy node(s) in ICP
expose services defined in
Kubernetes
More on Scaling
More on Scaling
Allows you to scale the
number of running pods in
a replicaset based upon
resource (or application
custom) metrics
Horizontal Pod Auto-scaling (HPA)
Statefulsets
Similar to replicaset for the purpose of scale or redundancy and/or, statefulsets run one-to-
many instances of the desired pod
Unlike replicasets the are intended for
applications requiring state.
Valuable for applications that require:
• Stable, unique network identifiers
• Stable persistent storage
• Ordered graceful deployment and scaling
• Ordered graceful deletion and
termination
• Ordered automated rolling updates
Persistence & Storage
There are many types of persistent storage and many provider options
Some pods must be able to
persist data so that if Kubernetes
restarts them on the same or
another node data loss is avoided
Kubernetes will re-attach the
shared storage when the pod
(re)starts
Storage providers support
different retention and recycling
policies and the definitions of
these are not universal
21
Kubernetes
More on Persistent Storage
We strive to simplify our configuration management by moving towards
immutability
It is about STATE not STORAGE
22
IBM Cloud / © 2018 IBM Corporation
Stateless
Applications that
containerize the best
tend to be stateless
with a small number
of configuration
parameters required
for personalization
Containers are
purposefully not
Virtual Machines
and do not carry
the burden of a
VMs resource
management
Containers Pervasive
As orchestration is used
to place containerized
workload throughout the
private cloud it becomes
important that the
persistent storage is
equally mobile
State
Some services require
backing storage to
maintain the current
operating state such as
a database or an
applications that
persist transactions
23
Persistent Storage
Persistent Volume is a storage resource within the
cluster. PVs have a lifecycle independent of any
individual pod that uses it. This API object
encapsulates the details of the storage
implementation or cloud-provider-specific storage
system.
A Persistent Volume Claim is a storage request, or
claim, made by the developer. Claims request
specific sizes of storage, as well as other aspects
such as access modes.
A StorageClass describes an offering of storage
and allow for the dynamically provisioning of PVs
and PVCs based upon these controlled definitions.
Solution components
24
Kubernetes
Deploying Applications
Deployments
Deployments manage rolling updates to ReplicaSets and StatefulSets
When a new version of the application
is available, the Deployment provides
the ability to scale down the previous
version of the application and scale
up the new version in a controlled
fashion with zero downtime
Enables rollback in the case of failure
CI / CD with Jenkins
Build artifacts from
Jenkins (the
container image)
are continuously
built and deployed
in ICP
The same image is
promoted between
each environment
(dev, QA, stage,
prod)
27
Kubernetes
The Cluster
Worker node
Kubernetes cluster architecture
Worker node
Master node
Docker
pod pod
Docker
pod pod
Kubernetes cluster
kubelet kubelet
Kubernetes
API
kubectl controller
10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4
.yaml
scheduler
Master Node components
• Make scheduling decisions for the cluster, and respond to cluster events, like a node failure
• Can run on any node in the cluster, but typically all master components run on the same virtual machine (vm),
and do not run any container apps on that vm
Master node
etcd
kube-controller-manager
Node controller
Replication controller
Endpoints controller
Service account &
token controller
Kubernetes
API
scheduler
DNS
Master Node Components
Etcd
– A highly-available key value store
– Stores all cluster data
API Server
– Exposes API for managing Kubernetes
– Used by kubectl CLI
Scheduler
– Selects the worker node for each pods runs
Controller manager
– Daemon that runs controllers (background
threads that handle routine tasks in the cluster)
– Node Controller – Responsible for noticing and
responding when nodes go down
– Endpoints Controller – Populates the
Endpoints object (joins services and pods)
– Service Account and Token Controllers –
Create default accounts and API access
tokens for new namespaces
Worker Node Components
• Provide the Kubernetes runtime environment; run on every node
• Maintain running pods
Worker node
kubelet kube-proxy
Docker
pod pod
10.0.0.3 10.0.0.3
32
Kubernetes
Further Concepts
Naming in Kubernetes
Name
– Each resource object by type has a unique name
Namespace
– Resource isolation: Each namespace is a virtual cluster within the physical cluster
• Resource objects are scoped within namespaces
• Low-level resources are not in namespaces: nodes, persistent volumes, and namespaces
themselves
• Names of resources need to be unique within a namespace, but not across namespaces
– Resource quotas: Namespaces can divide cluster resources
– Initial namespaces
• default – The default namespace for objects with no other namespace
• kube-system – The namespace for objects created by the Kubernetes system
Kubernetes configuring
Containers and Resources
Label
• Metadata assigned to Kubernetes
resources (pods, services, etc.)
• Key-value pairs for identification
• Critical to Kubernetes
Selector
• An expression that matches labels to
identify related resources
Kubectl commands
Support different approaches to working with Kubernetes objects:
• Imperative commands on live objects.
• Individual configuration files or directories of files.
Important: maintain a consistent approach when working with the same object; do not mix approaches.
Basic syntax:
<verb> <objecttype> [<subtype>] <instancename>
• Where the <verb> is an action such as: create, run, expose, autoscale.
• <objecttype> is the object type, such as a service.
• Some objects have subtypes. For example, a service has ClusterIP, LoadBalancer, NodePort.
• Use the -h flag to find the arguments and flags supported by a subtype
• <instancename> specifies the name of the object
© Copyright IBM Corporation 2018
Kubectl command useful examples
Get the state of a cluster
$ kubectl cluster-info
Get all the nodes of a cluster
$ kubectl get nodes -o wide
Get info about the pods of a cluster
$ kubectl get pods -o wide
Get info about the replication controllers of a cluster
$ kubectl get rc -o wide
Get info about the services of a cluster
$ kubectl get services
Get full config info about a Service
$ kubectl get service
NAME_OF_SERVICE -o json
Get the IP of a Pod
$ kubectl get pod NAME_OF_POD -
template={{.status.podIP}}
Delete a Pod
$ kubectl delete pod NAME
Delete a Service
$ kubectl delete service
NAME_OF_SERVICE
Resources
Kubernetes tutorial
– https://kubernetes.io/docs/tutorials/kubernetes-basics/
Introduction to container orchestration
– https://www.exoscale.ch/syslog/2016/07/26/container-orch/
TNS Research: The Present State of Container Orchestration
– https://thenewstack.io/tns-research-present-state-container-orchestration/
Large-scale cluster management at Google with Borg
– https://research.google.com/pubs/pub43438.html
38
© 2018 IBM Corporation

Mais conteúdo relacionado

Mais procurados

Introduction to ibm cloud paks concept license and minimum config public
Introduction to ibm cloud paks concept license and minimum config publicIntroduction to ibm cloud paks concept license and minimum config public
Introduction to ibm cloud paks concept license and minimum config publicPetchpaitoon Krungwong
 
IBM SmartCloud Orchestration
IBM SmartCloud OrchestrationIBM SmartCloud Orchestration
IBM SmartCloud OrchestrationIBM Danmark
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationWinton Winton
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiVietnam Open Infrastructure User Group
 
OpenStack, SDN, and the Future of Software Defined Infrastructure
OpenStack, SDN, and the Future of Software Defined InfrastructureOpenStack, SDN, and the Future of Software Defined Infrastructure
OpenStack, SDN, and the Future of Software Defined InfrastructureLew Tucker
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureDavid Currie
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Vishwas N
 
IBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorIBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorAnna Landolfi
 
2109 mobile cloud integrating your mobile workloads with the enterprise
2109 mobile cloud  integrating your mobile workloads with the enterprise2109 mobile cloud  integrating your mobile workloads with the enterprise
2109 mobile cloud integrating your mobile workloads with the enterpriseTodd Kaplinger
 
Cloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and ContainersCloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and ContainersDaniel Berg
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization TransformationChloe Jackson
 
Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...PT Datacomm Diangraha
 
IBM Multicloud Management on the OpenShift Container Platform
IBM Multicloud Management on theOpenShift Container PlatformIBM Multicloud Management on theOpenShift Container Platform
IBM Multicloud Management on the OpenShift Container PlatformMichael Elder
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiVMware Tanzu
 
VMworld 2015: Introducing Application Self service with Networking and Security
VMworld 2015: Introducing Application Self service with Networking and SecurityVMworld 2015: Introducing Application Self service with Networking and Security
VMworld 2015: Introducing Application Self service with Networking and SecurityVMworld
 
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployDeploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployClaudia Ring
 
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...Michael Elder
 

Mais procurados (20)

Introduction to ibm cloud paks concept license and minimum config public
Introduction to ibm cloud paks concept license and minimum config publicIntroduction to ibm cloud paks concept license and minimum config public
Introduction to ibm cloud paks concept license and minimum config public
 
IBM SmartCloud Orchestration
IBM SmartCloud OrchestrationIBM SmartCloud Orchestration
IBM SmartCloud Orchestration
 
Kafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical PresentationKafka with IBM Event Streams - Technical Presentation
Kafka with IBM Event Streams - Technical Presentation
 
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. ChoiInnovation with Open Sources and App Modernization for Developers | Ian Y. Choi
Innovation with Open Sources and App Modernization for Developers | Ian Y. Choi
 
OpenStack, SDN, and the Future of Software Defined Infrastructure
OpenStack, SDN, and the Future of Software Defined InfrastructureOpenStack, SDN, and the Future of Software Defined Infrastructure
OpenStack, SDN, and the Future of Software Defined Infrastructure
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
IBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorIBM SmartCloud Orchestrator
IBM SmartCloud Orchestrator
 
CompTIA Cloud Plus Certification Bootcamp June 2017
CompTIA Cloud Plus Certification Bootcamp June 2017CompTIA Cloud Plus Certification Bootcamp June 2017
CompTIA Cloud Plus Certification Bootcamp June 2017
 
2109 mobile cloud integrating your mobile workloads with the enterprise
2109 mobile cloud  integrating your mobile workloads with the enterprise2109 mobile cloud  integrating your mobile workloads with the enterprise
2109 mobile cloud integrating your mobile workloads with the enterprise
 
Cloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and ContainersCloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and Containers
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization Transformation
 
Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...Seminar Accelerating Business Using Microservices Architecture in Digital Age...
Seminar Accelerating Business Using Microservices Architecture in Digital Age...
 
IBM Multicloud Management on the OpenShift Container Platform
IBM Multicloud Management on theOpenShift Container PlatformIBM Multicloud Management on theOpenShift Container Platform
IBM Multicloud Management on the OpenShift Container Platform
 
Jelastic Cluster Admin Panel Overview
Jelastic Cluster Admin Panel OverviewJelastic Cluster Admin Panel Overview
Jelastic Cluster Admin Panel Overview
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
VMworld 2015: Introducing Application Self service with Networking and Security
VMworld 2015: Introducing Application Self service with Networking and SecurityVMworld 2015: Introducing Application Self service with Networking and Security
VMworld 2015: Introducing Application Self service with Networking and Security
 
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode DeployDeploying to and Configuring WebSphere Application Server with UrbanCode Deploy
Deploying to and Configuring WebSphere Application Server with UrbanCode Deploy
 
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
 
vm provisioning
vm provisioningvm provisioning
vm provisioning
 

Semelhante a Kubernetes Basics - ICP Workshop Batch II

Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdfssuser9b44c7
 
aks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxaks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxWaseemShare
 
Newesis - Introduction to Containers
Newesis -  Introduction to ContainersNewesis -  Introduction to Containers
Newesis - Introduction to ContainersRauno De Pasquale
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetesElad Hirsch
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptxRyuzaki360
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetescsegayan
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...NETWAYS
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...NETWAYS
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019Kumton Suttiraksiri
 
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev Conference
 
Cluster Management _ kubernetes MADIHA HARIFI
Cluster Management _ kubernetes MADIHA HARIFICluster Management _ kubernetes MADIHA HARIFI
Cluster Management _ kubernetes MADIHA HARIFIHarifi Madiha
 
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxKubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxHectorSebastianMendo
 

Semelhante a Kubernetes Basics - ICP Workshop Batch II (20)

Managing containers at scale
Managing containers at scale          Managing containers at scale
Managing containers at scale
 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
 
Openshift Workshop
Openshift Workshop Openshift Workshop
Openshift Workshop
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
aks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptxaks_training_document_Azure_kuberne.pptx
aks_training_document_Azure_kuberne.pptx
 
Newesis - Introduction to Containers
Newesis -  Introduction to ContainersNewesis -  Introduction to Containers
Newesis - Introduction to Containers
 
Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
 
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB201904_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
 
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
 
Cluster Management _ kubernetes MADIHA HARIFI
Cluster Management _ kubernetes MADIHA HARIFICluster Management _ kubernetes MADIHA HARIFI
Cluster Management _ kubernetes MADIHA HARIFI
 
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptxKubernetes on on on on on on on on on on on on on on Azure Deck.pptx
Kubernetes on on on on on on on on on on on on on on Azure Deck.pptx
 

Mais de PT Datacomm Diangraha

Start Your Cloud Native Journey with Containerization
Start Your Cloud Native Journey with ContainerizationStart Your Cloud Native Journey with Containerization
Start Your Cloud Native Journey with ContainerizationPT Datacomm Diangraha
 
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...PT Datacomm Diangraha
 
Sutedjo - Digital Transformation for SAP
Sutedjo -  Digital Transformation for SAPSutedjo -  Digital Transformation for SAP
Sutedjo - Digital Transformation for SAPPT Datacomm Diangraha
 
Nam Khong - SAP on Cloud for Your Intelligent Enterprise
Nam Khong - SAP on Cloud for Your Intelligent EnterpriseNam Khong - SAP on Cloud for Your Intelligent Enterprise
Nam Khong - SAP on Cloud for Your Intelligent EnterprisePT Datacomm Diangraha
 
Micro services container - Nam Khong
Micro services container - Nam KhongMicro services container - Nam Khong
Micro services container - Nam KhongPT Datacomm Diangraha
 
Kubernetes Benefits - Sutedjo Tjahjadi
Kubernetes Benefits - Sutedjo TjahjadiKubernetes Benefits - Sutedjo Tjahjadi
Kubernetes Benefits - Sutedjo TjahjadiPT Datacomm Diangraha
 
OCP Datacomm RedHat - Kubernetes Launch
OCP Datacomm RedHat - Kubernetes LaunchOCP Datacomm RedHat - Kubernetes Launch
OCP Datacomm RedHat - Kubernetes LaunchPT Datacomm Diangraha
 
Cloud computing for making indonesia 4.0
Cloud computing for making indonesia 4.0 Cloud computing for making indonesia 4.0
Cloud computing for making indonesia 4.0 PT Datacomm Diangraha
 
Disaster Recovery: Understanding Trend, Methodology, Solution, and Standard
Disaster Recovery:  Understanding Trend, Methodology, Solution, and StandardDisaster Recovery:  Understanding Trend, Methodology, Solution, and Standard
Disaster Recovery: Understanding Trend, Methodology, Solution, and StandardPT Datacomm Diangraha
 
Perfect Match of Cloud Computing and Consumer Electronics
Perfect Match of Cloud Computing and Consumer ElectronicsPerfect Match of Cloud Computing and Consumer Electronics
Perfect Match of Cloud Computing and Consumer ElectronicsPT Datacomm Diangraha
 

Mais de PT Datacomm Diangraha (20)

Start Your Cloud Native Journey with Containerization
Start Your Cloud Native Journey with ContainerizationStart Your Cloud Native Journey with Containerization
Start Your Cloud Native Journey with Containerization
 
Disaster Recovery Cook Book
Disaster Recovery Cook BookDisaster Recovery Cook Book
Disaster Recovery Cook Book
 
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...
Converting Your Existing SAP Server Infrastructure to a Modern Cloud-Based Ar...
 
Sutedjo - open banking may 27, 2021
Sutedjo - open banking may 27, 2021Sutedjo - open banking may 27, 2021
Sutedjo - open banking may 27, 2021
 
Darwin - PT IMI
Darwin - PT IMIDarwin - PT IMI
Darwin - PT IMI
 
Sutedjo - Introduction to Cloud
Sutedjo - Introduction to CloudSutedjo - Introduction to Cloud
Sutedjo - Introduction to Cloud
 
Aditya - Connecting Future
Aditya - Connecting FutureAditya - Connecting Future
Aditya - Connecting Future
 
Wiranto
WirantoWiranto
Wiranto
 
Sutedjo - Digital Transformation for SAP
Sutedjo -  Digital Transformation for SAPSutedjo -  Digital Transformation for SAP
Sutedjo - Digital Transformation for SAP
 
Nam Khong - SAP on Cloud for Your Intelligent Enterprise
Nam Khong - SAP on Cloud for Your Intelligent EnterpriseNam Khong - SAP on Cloud for Your Intelligent Enterprise
Nam Khong - SAP on Cloud for Your Intelligent Enterprise
 
Micro services container - Nam Khong
Micro services container - Nam KhongMicro services container - Nam Khong
Micro services container - Nam Khong
 
Kubernetes Benefits - Sutedjo Tjahjadi
Kubernetes Benefits - Sutedjo TjahjadiKubernetes Benefits - Sutedjo Tjahjadi
Kubernetes Benefits - Sutedjo Tjahjadi
 
OCP Datacomm RedHat - Kubernetes Launch
OCP Datacomm RedHat - Kubernetes LaunchOCP Datacomm RedHat - Kubernetes Launch
OCP Datacomm RedHat - Kubernetes Launch
 
Cloud computing for making indonesia 4.0
Cloud computing for making indonesia 4.0 Cloud computing for making indonesia 4.0
Cloud computing for making indonesia 4.0
 
Cloud technology for hospitality
Cloud technology for hospitalityCloud technology for hospitality
Cloud technology for hospitality
 
Why build sap on cloud
Why build sap on cloudWhy build sap on cloud
Why build sap on cloud
 
Sap migration to cloud
Sap migration to cloudSap migration to cloud
Sap migration to cloud
 
Disaster Recovery: Understanding Trend, Methodology, Solution, and Standard
Disaster Recovery:  Understanding Trend, Methodology, Solution, and StandardDisaster Recovery:  Understanding Trend, Methodology, Solution, and Standard
Disaster Recovery: Understanding Trend, Methodology, Solution, and Standard
 
Hot Disaster Recovery Using Zerto
Hot Disaster Recovery Using ZertoHot Disaster Recovery Using Zerto
Hot Disaster Recovery Using Zerto
 
Perfect Match of Cloud Computing and Consumer Electronics
Perfect Match of Cloud Computing and Consumer ElectronicsPerfect Match of Cloud Computing and Consumer Electronics
Perfect Match of Cloud Computing and Consumer Electronics
 

Último

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Último (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Kubernetes Basics - ICP Workshop Batch II

  • 2. Everyone’s container journey starts with one container…. 2
  • 3. At first the growth is easy to handle…. 3
  • 4. But soon you have many applications, many instances… 4
  • 5. And that is why there is container orchestration 5
  • 6. What is container orchestration? 6 Cluster management creates unified targets for varied workload Scheduling intelligently distributes containers across nodes Service discovery knows where containers are located and provides a method to direct requests to them Replication allows the workload to be scaled Health management creates a method to ensure the application is assured to be viable by allowing unhealthy containers to be replaced Container Orchestrator Manager Scheduler Replicator Node Daemon Containers Node Daemon Containers Node Daemon Containers Image repository Discovery DB Management of the deployment, placement, and lifecycle of workload containers
  • 7. Container ecosystem © Copyright IBM Corporation 2017 Container scheduling Container orchestration Virtual infrastructure Container engine Physical infrastructure Operating system Application workflow 1 2 3 4 5 6 7 Kubernetes, Docker Swarm, Apache Mesos Docker VMWare, AWS Ubuntu, RedHat, CoreOS
  • 8. What is Kubernetes? Fully open source container orchestrator inspired and informed by Google's experiences and internal systems Unified API for deploying web applications, batch jobs, and databases maintaining and tracking the global view of the cluster Supports multiple cloud and bare-metal environments Manage applications, not machines providing a better framework to support rolling updates, canary deploys, and blue-green deployments Designed for extensibility Rich ecosystem of plug-ins for scheduling, storage, and networking Open source project managed by the Linux Foundation
  • 9. Kubernetes strengths Clear governance model ‒ Managed by the Linux Foundation. ‒ Google is driving the product features and roadmap, while allowing the rest of the ecosystem to participate. Growing and vibrant ecosystem ‒ IBM, Huawei, Intel, and Red Hat are among the companies making prominent contributions to the project. Avoid dependency and vendor lock-in ‒ Active community participation and ecosystem support. Support for a wide range of deployment options ‒ Customers can choose between bare metal, virtualization, private, public, and hybrid cloud deployments ‒ Wide range of delivery models across on-premises and cloud-based services. Design is more operations-centric ‒ First choice of DevOps teams.
  • 11. Immutability Build Once - Deploy Everywhere The same container image is built once and is moved between environments
  • 12. Pod A single unit of work in Kubernetes, which may consist of one or more containers All containers in a pod are co-located and co- scheduled, and share the kernel namespace (process, storage, network, etc.)
  • 13. Pod Health Checking Pods are automatically kept alive by “process check” checking the basic status of the main process for the application To go beyond this Kubernetes allows you to create a liveness probe to provide additional means for identifying health.
  • 14. Config Maps & Secrets Share and store configurations, credentials and more Store the configurations and secrets (credentials, certificates) in the K8s environment and mount them to the local filesystem within container(s) The container image can move un-changed between environments (i.e. container immutability)
  • 15. Replicaset Replicasets run one-to- many instances of the desired pod When possible the replica pod should be stateless or near-stateless Scale pods horizontally and provide resiliency
  • 16. Service Discovery Kubernetes has an internal DNS that is used as a Service Registry. A Service resource in Kubernetes results in an entry in the internal DNS By default, a Service points to an internal Cluster IP that load balances between a set of healthy running pods
  • 17. Ingress Resources External access to applications running in Kubernetes may be enabled through Ingress resources and proxy nodes The proxy node(s) in ICP expose services defined in Kubernetes
  • 18. More on Scaling More on Scaling Allows you to scale the number of running pods in a replicaset based upon resource (or application custom) metrics Horizontal Pod Auto-scaling (HPA)
  • 19. Statefulsets Similar to replicaset for the purpose of scale or redundancy and/or, statefulsets run one-to- many instances of the desired pod Unlike replicasets the are intended for applications requiring state. Valuable for applications that require: • Stable, unique network identifiers • Stable persistent storage • Ordered graceful deployment and scaling • Ordered graceful deletion and termination • Ordered automated rolling updates
  • 20. Persistence & Storage There are many types of persistent storage and many provider options Some pods must be able to persist data so that if Kubernetes restarts them on the same or another node data loss is avoided Kubernetes will re-attach the shared storage when the pod (re)starts Storage providers support different retention and recycling policies and the definitions of these are not universal
  • 22. We strive to simplify our configuration management by moving towards immutability It is about STATE not STORAGE 22 IBM Cloud / © 2018 IBM Corporation Stateless Applications that containerize the best tend to be stateless with a small number of configuration parameters required for personalization Containers are purposefully not Virtual Machines and do not carry the burden of a VMs resource management Containers Pervasive As orchestration is used to place containerized workload throughout the private cloud it becomes important that the persistent storage is equally mobile State Some services require backing storage to maintain the current operating state such as a database or an applications that persist transactions
  • 23. 23 Persistent Storage Persistent Volume is a storage resource within the cluster. PVs have a lifecycle independent of any individual pod that uses it. This API object encapsulates the details of the storage implementation or cloud-provider-specific storage system. A Persistent Volume Claim is a storage request, or claim, made by the developer. Claims request specific sizes of storage, as well as other aspects such as access modes. A StorageClass describes an offering of storage and allow for the dynamically provisioning of PVs and PVCs based upon these controlled definitions. Solution components
  • 25. Deployments Deployments manage rolling updates to ReplicaSets and StatefulSets When a new version of the application is available, the Deployment provides the ability to scale down the previous version of the application and scale up the new version in a controlled fashion with zero downtime Enables rollback in the case of failure
  • 26. CI / CD with Jenkins Build artifacts from Jenkins (the container image) are continuously built and deployed in ICP The same image is promoted between each environment (dev, QA, stage, prod)
  • 28. Worker node Kubernetes cluster architecture Worker node Master node Docker pod pod Docker pod pod Kubernetes cluster kubelet kubelet Kubernetes API kubectl controller 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 .yaml scheduler
  • 29. Master Node components • Make scheduling decisions for the cluster, and respond to cluster events, like a node failure • Can run on any node in the cluster, but typically all master components run on the same virtual machine (vm), and do not run any container apps on that vm Master node etcd kube-controller-manager Node controller Replication controller Endpoints controller Service account & token controller Kubernetes API scheduler DNS
  • 30. Master Node Components Etcd – A highly-available key value store – Stores all cluster data API Server – Exposes API for managing Kubernetes – Used by kubectl CLI Scheduler – Selects the worker node for each pods runs Controller manager – Daemon that runs controllers (background threads that handle routine tasks in the cluster) – Node Controller – Responsible for noticing and responding when nodes go down – Endpoints Controller – Populates the Endpoints object (joins services and pods) – Service Account and Token Controllers – Create default accounts and API access tokens for new namespaces
  • 31. Worker Node Components • Provide the Kubernetes runtime environment; run on every node • Maintain running pods Worker node kubelet kube-proxy Docker pod pod 10.0.0.3 10.0.0.3
  • 33. Naming in Kubernetes Name – Each resource object by type has a unique name Namespace – Resource isolation: Each namespace is a virtual cluster within the physical cluster • Resource objects are scoped within namespaces • Low-level resources are not in namespaces: nodes, persistent volumes, and namespaces themselves • Names of resources need to be unique within a namespace, but not across namespaces – Resource quotas: Namespaces can divide cluster resources – Initial namespaces • default – The default namespace for objects with no other namespace • kube-system – The namespace for objects created by the Kubernetes system
  • 34. Kubernetes configuring Containers and Resources Label • Metadata assigned to Kubernetes resources (pods, services, etc.) • Key-value pairs for identification • Critical to Kubernetes Selector • An expression that matches labels to identify related resources
  • 35. Kubectl commands Support different approaches to working with Kubernetes objects: • Imperative commands on live objects. • Individual configuration files or directories of files. Important: maintain a consistent approach when working with the same object; do not mix approaches. Basic syntax: <verb> <objecttype> [<subtype>] <instancename> • Where the <verb> is an action such as: create, run, expose, autoscale. • <objecttype> is the object type, such as a service. • Some objects have subtypes. For example, a service has ClusterIP, LoadBalancer, NodePort. • Use the -h flag to find the arguments and flags supported by a subtype • <instancename> specifies the name of the object © Copyright IBM Corporation 2018
  • 36. Kubectl command useful examples Get the state of a cluster $ kubectl cluster-info Get all the nodes of a cluster $ kubectl get nodes -o wide Get info about the pods of a cluster $ kubectl get pods -o wide Get info about the replication controllers of a cluster $ kubectl get rc -o wide Get info about the services of a cluster $ kubectl get services Get full config info about a Service $ kubectl get service NAME_OF_SERVICE -o json Get the IP of a Pod $ kubectl get pod NAME_OF_POD - template={{.status.podIP}} Delete a Pod $ kubectl delete pod NAME Delete a Service $ kubectl delete service NAME_OF_SERVICE
  • 37. Resources Kubernetes tutorial – https://kubernetes.io/docs/tutorials/kubernetes-basics/ Introduction to container orchestration – https://www.exoscale.ch/syslog/2016/07/26/container-orch/ TNS Research: The Present State of Container Orchestration – https://thenewstack.io/tns-research-present-state-container-orchestration/ Large-scale cluster management at Google with Borg – https://research.google.com/pubs/pub43438.html
  • 38. 38 © 2018 IBM Corporation