introduction to container mangement
TRANSCRIPT
![Page 1: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/1.jpg)
ADVISORYPRESENTATION
OPINIONATED CONTENT
![Page 2: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/2.jpg)
Introduction to Container Managemen
tOverview
Got Infrastructure?
Delivery & Deployment
KubernetesArchitecture & Concepts
Scratching the Surface
Practical Application
![Page 3: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/3.jpg)
Philosophic excursion
Stay with me!
![Page 4: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/4.jpg)
Is Infrastructure a Commodity?
The word commodity came into use in English in the 15th century,
from the French commodité, "amenity, convenience". Going further
back, the French word derives from the Latin commoditas, meaning
"suitability, convenience, advantage". The Latin word commodus
(from which English gets other words including commodious and
accommodate) meant variously "appropriate", "proper measure,
time, or condition", and "advantage, benefit".Commodity — Wikipedia, The Free Encyclopedia
![Page 5: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/5.jpg)
Properties of Commodities
● Immediate Availability
● Highly Competitive Market
● Can change vendor without
telling difference
● Unreliable Availability (Not
plannable)
● No Competitive Market (No
choice)
● Notable differences for the same
product between vendors● No or Low Process Visibility
● No- or Low-Friction
● No- or Low-Overhead
● No or Low-Overlap
![Page 6: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/6.jpg)
Infrastructure can be defined as "the physical components of interrelated systems providing commodities
and services essential to enable, sustain, or enhance societal living conditions." the word infrastructure
has been used in English since at least 1887 and in French since at least 1875, originally meaning "The
installations that form the basis for any operation or system".
Is Infrastructure a Commodity?
Infrastructure — Wikipedia, The Free Encyclopedia
![Page 7: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/7.jpg)
Introduction to
Container Manageme
ntDelivery & Deployment
![Page 8: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/8.jpg)
Delivery & Deployment
![Page 9: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/9.jpg)
Delivery
![Page 10: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/10.jpg)
Deployment
![Page 11: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/11.jpg)
Classic Deployment
![Page 12: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/12.jpg)
Containers
![Page 13: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/13.jpg)
Components of a Single Application
Application
Server
Operating System
What’s this?
Libraryv2
(required to run App)
Where do I put this?
And who’s responsible that it works all together?
Library
v1
Library
v3
Libraryv1
Libraryv4
Library
v2
Same Colors
don’t go together
![Page 14: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/14.jpg)
Scaling Up / Scaling OutApplication
Operating System
Hardware
Administrator
Operating System
Application
Hardware
![Page 15: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/15.jpg)
Virtualization
Application
Operating System
Virtual Machine
Virtualization Infrastructure
Application
Operating System
Virtual Machine
Application
Operating System
Virtual Machine
Administrator
Infrastructure
![Page 16: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/16.jpg)
Containers
Application
Container
Virtual Machine
Virtualization Infrastructure
Application
Virtual Machine
Application
Virtual Machine
Operating System
Container
Operating System
Container
Operating SystemAdministrator
Infrastructure
![Page 17: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/17.jpg)
Application
Container OrchestrationApplication
Container
Virtual Machine
Virtualization Infrastructure
Virtual MachineVirtual Machine
Operating System
Orchestration
Application ApplicationApplication
Container
Operating System
Container
Operating System
Administrator
Infrastructure
![Page 18: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/18.jpg)
Application
Container Orchestration
Virtualization Infrastructure
Virtual Machine Virtual MachineVirtual Machine
Application Application
Container Container Container
Operating System Operating System Operating System
Orc
hest
ratio
n Service / Endpoint Management
Scheduling
Resource Management
Administrator
Infrastructure
ApplicationApplicationApplication
![Page 19: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/19.jpg)
Kubernetes Overview
Architecture & Concepts
![Page 20: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/20.jpg)
Orchestration Tools
![Page 21: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/21.jpg)
Why Kubernetes● Largest User Base
● Most Commercial Offerings
● On-Premise & Cloud offers same interface
● Component of the Cloud Native Computing Foundation
○ Members
![Page 22: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/22.jpg)
Kubernetes Components● etcd
Persistence for Cluster State
Usually not part of the Cluster
● kubectlor any API client
● kube-apiserver
● kube-controller-manager
● kube-scheduler
● kubelet
![Page 23: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/23.jpg)
Architecture Overviewetcd
Cluster State kubectlMaster
kube-scheduler
controller-manager
API endpoints
kube-proxy
Nodekubelet
kube-proxy
Nodekubelet
kube-proxy
Nodekubelet
kube-proxy
![Page 24: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/24.jpg)
Architecture Overview etcdetcd
Cluster State ● Storage Backend for Cluster State
● Usually a 3 - 5 node cluster
● Distributed Consistent Storage
● Monitoring via Prometheus
![Page 25: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/25.jpg)
Architecture Overview MasterMaster
kube-scheduler
controller-manager
API endpoints
kube-proxy ● Provides all functionality to create
cluster resources
● Central component that mediates
between desired state and actual
state
● Can (and should) be highly available
![Page 26: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/26.jpg)
Nodekubelet
kube-proxy
Architecture Overview Node● Work-horse of the cluster
● As many as required by capacity needs
kubelet
● Manages pods and their containers, their images, their volumes, etc
kube-proxy
● Makes services available to the inside and outside world
![Page 27: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/27.jpg)
Orc
hest
ratio
n Service / Endpoint Management
Scheduling
Resource Management
Cluster Administration Tasks● Urgent need to learn
● Provide Persistence Layer
● Provide Docker Registry
● Create (common) Containers
● In-Depth Knowledge of Resource Types
● Excellent Knowledge of all Levels ofSystem Administration
● Monitor/Handle Error Conditions
● Capacity Planning
● Provide Best Practices
● Good Knowledge of Ecosystem(https://github.com/kubernetes-incubator)
● https://kubernetes.io/docs/admin/
![Page 28: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/28.jpg)
Cluster Usage
● Package Application
○ Create Containers
● Request Persistence
● Describe Dependencies
● Deploy
Orchestration
Application Application
App AppApp
![Page 29: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/29.jpg)
Cluster Usage Best PracticesConfiguration files must be stored in version control before
being pushed to the cluster
When defining configurations, specify the latest stable API version (currently v1).
Write your configuration files using YAML rather than JSON
Group related objects together in a single file where this makes sense
Don’t specify default values unnecessarily
Put an object description in an annotation to allow better introspection
![Page 30: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/30.jpg)
Kubernetes Concepts
Scratching the Surface
![Page 31: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/31.jpg)
Resources Provided● Workloads — Container, CronJob,
DaemonSet, Deployment, Job, Pod, ReplicaSet, ReplicationController, StatefulSet (PetSet)
● Discovery & Load Balancing — Endpoints, Ingress, Service
● Config & Storage — ConfigMap, Secret, PersistentVolumeClaim, StorageClass, Volume
Metadata — Event, LimitRange, HorizontalPodAutoScaler, PodTemplate, PodDisruptionBudget, ThirdPartyResource
Cluster — Binding, CertificateSigningRequest, ClusterRole, ClusterRoleBinding, ComponentStatus, LocalSubjectAccessReview, Namespace, Node, PersistentVolume, ResourceQuota, Role, RoleBinding, SelfSubjectAccessReview, ServiceAccount, SubjectAccessReview, TokenReview, NetworkPolicy
![Page 32: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/32.jpg)
apiVersion: v1kind: Podmetadata: name: command-demospec: containers: - name: command-demo-container image: debian command: ["printenv"] args: ["HOSTNAME"]
Resource Type PodPod
![Page 33: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/33.jpg)
apiVersion: extensions/v1beta1kind: ReplicaSetmetadata: name: my-first-rsspec: replicas: 1 template: metadata: name: command-demo-rs spec: containers: - name: command-demo-container image: debian command: ["printenv"] args: ["HOSTNAME"]
Resource Type ReplicaSetReplica Set
Pod
![Page 34: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/34.jpg)
apiVersion: extensions/v1beta1kind: Deploymentmetadata: name: nginx-deploymentspec: replicas: 3 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80
Resource Type DeploymentDeployment
Replica Set
Pod
![Page 35: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/35.jpg)
Kubernetes Overview
Practical Application
![Page 36: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/36.jpg)
Guestbookhttps://github.com/kubernetes/kubernetes/tree/v1.5.2/examples/guestbook
![Page 37: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/37.jpg)
![Page 38: Introduction to container mangement](https://reader036.vdocuments.mx/reader036/viewer/2022062503/58ce7e2d1a28ab210a8b4f41/html5/thumbnails/38.jpg)
Administrator Infrastructure