SlideShare uma empresa Scribd logo
1 de 99
Baixar para ler offline
© Copyright 2018 Pivotal Software, Inc. All rights Reserved.
Tyler Britten
tbritten@pivotal.io
Twitter: @tybritten
Kube Your
Enthusiasm
Operations is the
Secret sauce
(just not traditional operations)
Operations as a Competitive Advantage
APP
APP
APP
APP
Production
Platforms
Traditional
Ticket
Based
Human
Toil
Build App
Artifact
Build App
Container(s)
App → to the
Platform
Container Runtime
Container Hosts
CaaS
Container
Orchestrator
PaaS
Application Platform
Infrastructure
Platform
Container
Platform
Application
Platform
Infrastructure
As
Code
More Control Less Control
Less Efficiency More Efficiency
IaaS API
CF API
K8s API
Config
Management
Deployment
Manifest
IaaS
Hardware
Platform
PXE boot ?
6
?????
PaaS
Application Platform
Function
Platform
??? API
Traditional
Ticket
Based
Human
Toil
Build App
Artifact
Build App
Container(s)
App → to the
Platform
Container Runtime
Container Hosts
CaaS
Container
Orchestrator
PaaS
Application Platform
VMware
aws/gce/azure
Pivotal
Container Service
Pivotal
App Service
Infrastructure
As
Code
Pivotal Cloud Foundry 2.0
More Control Less Control
Less Efficiency More Efficiency
IaaS API
CF API
K8s API
Config
Management
Deployment
Manifest
IaaS
Dell
Or whatever
PXE boot ?
7
?????
PaaS
Application Platform
Pivotal
Function Service
??? API
App → to the
Platform
PaaS
Application Platform
Pivotal
App Service
Pivotal Cloud Foundry 2.0
More Control Less Control
Less Efficiency More Efficiency
CF API
8
APP
APP
APP
APP
cf push
Build App
Container(s)
CaaS
Container
Orchestrator
Pivotal
Container Service
Pivotal Cloud Foundry 2.0
More Control Less Control
Less Efficiency More Efficiency
K8s API
Deployment
Manifest
9
APP
APP
APP
APP
Containers
Saurabh Gupta. "Containers and Pivotal Cloud Foundry" 2016.
FROM maven:3.6-jdk-11-slim as BUILD
COPY . /src
WORKDIR /src
RUN mvn install -DskipTests
FROM openjdk:11.0.1-jre-slim-stretch
EXPOSE 8080
WORKDIR /app
ARG JAR=hello-0.0.1-SNAPSHOT.jar
COPY --from=BUILD /src/target/$JAR /app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
$ docker build -t tybritten/hello .
$ docker push tybritten/hello
$ docker pull tybritten/hello
$ docker run -d -p 8080:8080 tybritten/hello
Kubernetes
Master
Master
Master
API
Server
Users
Control Plane
Data Plane
etcd
Cloud Ctrl
Manager
Worker
Kubelet
kube-proxy
docker
Scheduler
Controller
Manager
Worker
Kubelet
kube-proxy
docker
Worker
Kubelet
kube-proxy
docker
Flannel Flannel Flannel
Controllers
Desired State
Actual State
Vs
Unix Philosophy:
Do one thing. Do it well.
$ kubectl
Imperative
$ kubectl run hello 
--image=tybritten/go-hello-world
$ kubectl scale hello 
--replicas=3
$ kubectl create service clusterip 
hello --tcp=80:80
Declarative
$ kubectl apply -f hello-world.yaml
Declarative
Vs
Imperative
manifests
apiVersion: v1
kind: Pod
metadata:
name: hello
spec:
containers:
- image: tybritten/go-hello-world
imagePullPolicy: Always
name: hello
Resources
● Pods
● Services
● Volumes
POD
one or more containers that share
a network and storage
the minimum scalable unit
of your application
MASTER
Node 1 Node 2 Node 3 Node 4
hello
kubelet kubelet kubelet kubelet
Scheduler
Pod
Name: hello
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello
kubelet kubelet kubelet kubelet
Scheduler
hello
Pod
Name: hello
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello
kubelet kubelet kubelet kubelet
Scheduler
Pod
Name: hello
Image: hello1
Replica Set
MASTER
Node 1 Node 2 Node 3 Node 4
hello-a
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Replica Set
Name: hello
Image: hello1
Size: 3
hello-ghello-s
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-b
Image: hello1
Pod
Name: hello-c
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello-a
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Replica Set
Name: hello
Image: hello1
Size: 3
hello-ghello-s hello-d
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-b
Image: hello1
Pod
Name: hello-d
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello-a
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Replica Set
Name: hello
Image: hello1
Size: 5
hello-ghello-s hello-d
hello-t hello-z
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-a
Image: hello1
Pod
Name: hello-a
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Replica Set
Name: hello
Image: hello1
Size: 0
Deployment
MASTER
Node 1 Node 2 Node 3 Node 4
hello-A-c
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Deployment
Name: hello
Image: hello1
Size: 3
hello-A-ghello-A-s
Replica Set
Name: hello-A
Image: hello1
Size: 3
MASTER
Node 1 Node 2 Node 3 Node 4
hello-A-c
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Deployment
Name: hello
Image: hello2
Size: 3
hello-A-ghello-A-s
Replica Set
Name: hello-A
Image: hello1
Size: 3
Replica Set
Name: hello-B
Image: hello2
Size: 3
hello-B-g
hello-B-r hello-B-c
MASTER
Node 1 Node 2 Node 3 Node 4
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
Deployment
Name: hello
Image: hello2
Size: 3
Replica Set
Name: hello-A
Image: hello1
Size: 0
Replica Set
Name: hello-B
Image: hello2
Size: 3
hello-B-g
hello-B-r hello-B-c
StatefulSet
MASTER
Node 1 Node 2 Node 3 Node 4
hello-1
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
StatefulSet
Name: db
Image: hello1
Size: 3
Pod
Name: hello-1
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello-1
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
StatefulSet
Name: hello
Image: hello1
Size: 3
hello-2
Pod
Name: hello-1
Image: hello1
Pod
Name: hello-2
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
hello-1
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
StatefulSet
Name: hello
Image: hello1
Size: 3
hello-3hello-2
Pod
Name: hello-1
Image: hello1
Pod
Name: hello-2
Image: hello1
Pod
Name: hello-3
Image: hello1
MASTER
Node 1 Node 2 Node 3 Node 4
db-1
kubelet kubelet kubelet kubelet
Scheduler
Controller
Manager
StatefulSet
Name: db
Image: cassandra
Size: 3
db-3db-2
Pod
Name: hello-a
Image:
Pod
Name: hello-b
Image:
Pod
Name: db-1
Image: ... vol vol vol
Pod
Name: hello-a
Image:
Pod
Name: hello-b
Image:
PVC
Name: db-1
Image: ...
$ kubectl
$ kubectl run hello 
--image=tybritten/hello 
-- port=8080
● kubectl run created a deployment “deployments.apps/hello”
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/hello 1 1 1 1 1m
● The deployment created a replicaset “replicaset.apps/hello-64f6bf9dd4”
NAME DESIRED CURRENT READY AGE
replicaset.apps/hello-64f6bf9dd4 1 1 1 1m
● Which created a pod “pod/hello-64f6bf9dd4-tq5dq”
NAME READY STATUS RESTARTS AGE
pod/hello-64f6bf9dd4-tq5dq 1/1 Running 0 2s
$ kubectl scale --replicas=3 
deployment/hello
$ kubectl scale --replicas=3 deployment/hello
deployment.extensions/hello scaled
$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/hello-64f6bf9dd4-2bndq 1/1 Running 0 15m
pod/hello-64f6bf9dd4-4kq9l 0/1 ContainerCreating 0 2s
pod/hello-64f6bf9dd4-8lkcs 1/1 Running 0 5s
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/hello 3 3 2 3 16m
NAME DESIRED CURRENT READY AGE
replicaset.apps/hello-64f6bf9dd4 3 3 2 16m
$ kubectl edit deployment hello
...
spec:
containers:
- env:
- name: MESSAGE
value: HELLO I LOVE YOU!!!!
image: tybritten/go-hello
imagePullPolicy: Always
name: hello
$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/hello-5c75b546c7-4lwnn 1/1 Running 0 1m
pod/hello-5c75b546c7-bwxxq 1/1 Running 0 1m
pod/hello-5c75b546c7-sl2pg 1/1 Running 0 1m
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/hello 3 3 3 3 23m
NAME DESIRED CURRENT READY AGE
replicaset.apps/hello-5c75b546c7 3 3 3 1m
replicaset.apps/hello-64f6bf9dd4 0 0 0 23m
$ kubectl port-forward deployment/hello 8080
Forwarding from 127.0.0.1:8080 -> 8080
$ curl localhost:8080
<html><head><title>HELLO I LOVE YOU!!!!</title></head><body>HELLO I LOVE
YOU!!!!!</body></html>
Service
$ kubectl expose deployment 
hello --type=LoadBalancer 
--port 80 --target-port 8080
kubectl expose deployment hello
● creates a service with a ClusterIP that acts as an internal loadbalancer to all
pods in the “hello” deployment
--type=LoadBalancer
● Creates a NodePort
● Configures a LoadBalancer to access the pods via the NodePort
$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello LoadBalancer 10.39.248.123 35.184.17.129 80:30468/TCP 5m
$ curl 35.184.17.129
<html><head><title>HELLO I LOVE YOU!!!!</title></head><body>HELLO I LOVE
YOU!!!!!</body></html>
Service
track Pods based on metadata and provides
connectivity and service discovery (DNS, Env
variables) for them.
Type
ClusterIP (default) exposes service on a
cluster-internal IP.
Container
Container
Pod
app=bacon
Container
Container
Pod
app=bacon
Service
app=bacon 10.3.55.7
Service
track Pods based on metadata and provides
connectivity and service discovery (DNS, Env
variables) for them.
Type
NodePort extends ClusterIP to expose services on
each node’s IP via a static port.
Container
Container
Pod
app=bacon
Container
Container
Pod
app=bacon
Service
app=bacon 10.3.55.7
192.168.0.5:4530
K8s Worker K8s Worker
192.168.0.6:4530
Service
track Pods based on metadata and provides
connectivity and service discovery (DNS, Env
variables) for them.
Type
LoadBalancer extends NodePort to configure a cloud
provider’s load balancer using the
cloud-controller-manager.
Container
Container
Pod
app=bacon
Container
Container
Pod
app=bacon
Service
app=bacon 10.3.55.7
192.168.0.5:4530
K8s Worker K8s Worker
192.168.0.6:4530
Load Balancer
33.6.5.22:80
Ingress
a controller that manages an external entity to provide
load balancing, SSL termination and name-based
virtual hosting to services based on a set of rules.
Ingress
Service
app=bacon
https://example.com
Service
app=eggs
/bacon /eggs
Volume
Container
Container
Pod
Volume
Is [effectively] a Directory, possibly with data in it,
available to all containers in a Pod.
Usually Shares lifecycle of a Pod (Created when Pod
is created, destroyed when Pod is destroyed).
Persistent Volumes outlive Pods.
Can be mounted from local disk, or from a network
storage device such as a EBS volume, iscsi, NFS, etc.
Config Map / Secret
$ kubectl create configmap hello 
--from-literal=’message=Hello S1T’
kubectl create configmap hello --from-file=index.html
● creates a configmap called “hello” containing the contents index.html
$ kubectl get configmap hello -o yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: hello
data:
index.html: "<html>n<head>nt<title>Hello to my
friends</title>n</head>n<body>ntHello
to my friendsn</body>n</html>nn"
kubectl create secret generic hello --from-file=index.html
● creates a secret called “hello” containing a base64 hash of contents index.html
$ kubectl get secret hello -o yaml
apiVersion: v1
kind: Secret
metadata:
name: hello
data:
index.html:
PGh0bWw+CjxoZWFkPgoJPHRpdGxlPkhlbGxvIHRvIG15IGZyaWVuZHM8L3RpdGxlPgo8L2hlYWQ+Cjxib2R5
PgoJSGVsbG8gdG8gbXkgZnJpZW5kcwo8L2JvZHk+CjwvaHRtbD4KCg==
Provides key-value pairs to be injected into a pod much like user-data is injected into a Virtual
Machine in the cloud.
Allows you to do last minute configuration of applications running on Kubernetes such as
setting a database host, or a admin password.
ConfigMaps store values as strings, Secrets store them as byte arrays (serialized as base64
encoded strings).
Secrets are [currently] not encrypted by default. This is likely to change.
Can be injected as files in a Volume, or as Environment Variables.
Helm
custom
load balancer
Chart.yaml
Values.yaml
templates/
ci
services
db
Discover & launch great
Kubernetes-ready apps
Search charts
555 charts ready to deploy
Wordpress, Jenkins, Kubeless...
Secure | https://hub.helm.sh
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.name }}-cm
data:
db: {{ .Value.db }}
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: {{ .Chart.name }}-app
labels:
app: {{ .Chart.name }}
...
...
spec:
containers:
- image: tybritten/hello
name: hello
volumeMounts:
- name: config
mountPath: /etc/hello
volumes:
- name: config
configMap:
name: {{ .Chart.name }}-cm
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.name }}-svc
labels:
app: {{ .Chart.name }}-world
spec:
ports:
- port: {{ .Value.port }}
protocol: TCP
targetPort: 8080
selector:
app: {{ .Chart.name }}-world
type: NodePort
$ helm install --name staging . 
--set db=’user:pass@staging.mysql/dbname’
$ helm install --name production . 
--set db=’user:pass@production.mysql/dbname’
$ helm create
Spinnaker
https://medium.com/netflix-techblog/announcing-ribbon-tying-the-netflix-mid
-tier-services-together-a89346910a62
https://giphy.com/gifs/frustrated-keyboard-g8GfH3i5F0hby
https://unsplash.com/photos/WHWYBmtn3_0
+
APP
APP
APP
APP
Cluster Management
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Pipelines
● Pipeline
● Stage
● Deployment Strategies
Multi-Cloud Inventory
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Actions and Reactions
● Pipeline
● Stage
● Deployment Strategies
Cluster Management
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Deployment Management
● Pipeline
● Stage
● Deployment Strategies
Deployment Strategies
Spinnaker
Cloud
API
App App App
Halyard
https://en.wikipedia.org/wiki/Halyard
Transforming How The World Builds Software
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.
Twitter: @tybritten
Video: https://youtu.be/57asZ7_2w5Q
Slides: check your email
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.

Mais conteúdo relacionado

Mais procurados

Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0
Cherie Williams
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3
Clinton Dreisbach
 

Mais procurados (20)

Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0
 
Ship your Scala code often and easy with Docker
Ship your Scala code often and easy with DockerShip your Scala code often and easy with Docker
Ship your Scala code often and easy with Docker
 
Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Deploying configurable frontend web application containers
Deploying configurable frontend web application containersDeploying configurable frontend web application containers
Deploying configurable frontend web application containers
 
Kubelet with no Kubernetes Masters | DevNation Tech Talk
Kubelet with no Kubernetes Masters | DevNation Tech TalkKubelet with no Kubernetes Masters | DevNation Tech Talk
Kubelet with no Kubernetes Masters | DevNation Tech Talk
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
 
Refactoring terraform
Refactoring terraformRefactoring terraform
Refactoring terraform
 
Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3Migrating Legacy Rails Apps to Rails 3
Migrating Legacy Rails Apps to Rails 3
 
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
 
Hopping in clouds: a tale of migration from one cloud provider to another
Hopping in clouds: a tale of migration from one cloud provider to anotherHopping in clouds: a tale of migration from one cloud provider to another
Hopping in clouds: a tale of migration from one cloud provider to another
 
POE
POEPOE
POE
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)Devfest 2021' - Artifact Registry Introduction (Taipei)
Devfest 2021' - Artifact Registry Introduction (Taipei)
 
Bosh 2.0
Bosh 2.0Bosh 2.0
Bosh 2.0
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
 
Api Design
Api DesignApi Design
Api Design
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker -  Launch your own LEMP or LAMP stackHands on Docker -  Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
 
Хокку про Heroku
Хокку про HerokuХокку про Heroku
Хокку про Heroku
 

Semelhante a Kube Your Enthusiasm - Tyler Britten

Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdfKubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Srinivasa Rao
 

Semelhante a Kube Your Enthusiasm - Tyler Britten (20)

Kube Your Enthusiasm
Kube Your EnthusiasmKube Your Enthusiasm
Kube Your Enthusiasm
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
Data warehouse on Kubernetes - gentle intro to Clickhouse Operator, by Robert...
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
 
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmetHow Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
 
[Hands-on] Kubernetes | Nov 18, 2017
[Hands-on] Kubernetes | Nov 18, 2017[Hands-on] Kubernetes | Nov 18, 2017
[Hands-on] Kubernetes | Nov 18, 2017
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
 
Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015Baking Docker Using Chef - ChefConf 2015
Baking Docker Using Chef - ChefConf 2015
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch KubernetesKubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Ports, pods and proxies
Ports, pods and proxiesPorts, pods and proxies
Ports, pods and proxies
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdfKubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
Kubernetes+-CKA-+0400+-+Application+Lifecycle+Management.pdf
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Openshift31-tech.ppt
Openshift31-tech.pptOpenshift31-tech.ppt
Openshift31-tech.ppt
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Taking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWSTaking Docker to Dance: Continuous Delivery on AWS
Taking Docker to Dance: Continuous Delivery on AWS
 
Kubernetes installation
Kubernetes installationKubernetes installation
Kubernetes installation
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 

Mais de VMware Tanzu

Mais de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Último (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

Kube Your Enthusiasm - Tyler Britten

  • 1. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Tyler Britten tbritten@pivotal.io Twitter: @tybritten Kube Your Enthusiasm
  • 2. Operations is the Secret sauce (just not traditional operations)
  • 3. Operations as a Competitive Advantage
  • 6. Traditional Ticket Based Human Toil Build App Artifact Build App Container(s) App → to the Platform Container Runtime Container Hosts CaaS Container Orchestrator PaaS Application Platform Infrastructure Platform Container Platform Application Platform Infrastructure As Code More Control Less Control Less Efficiency More Efficiency IaaS API CF API K8s API Config Management Deployment Manifest IaaS Hardware Platform PXE boot ? 6 ????? PaaS Application Platform Function Platform ??? API
  • 7. Traditional Ticket Based Human Toil Build App Artifact Build App Container(s) App → to the Platform Container Runtime Container Hosts CaaS Container Orchestrator PaaS Application Platform VMware aws/gce/azure Pivotal Container Service Pivotal App Service Infrastructure As Code Pivotal Cloud Foundry 2.0 More Control Less Control Less Efficiency More Efficiency IaaS API CF API K8s API Config Management Deployment Manifest IaaS Dell Or whatever PXE boot ? 7 ????? PaaS Application Platform Pivotal Function Service ??? API
  • 8. App → to the Platform PaaS Application Platform Pivotal App Service Pivotal Cloud Foundry 2.0 More Control Less Control Less Efficiency More Efficiency CF API 8 APP APP APP APP cf push
  • 9. Build App Container(s) CaaS Container Orchestrator Pivotal Container Service Pivotal Cloud Foundry 2.0 More Control Less Control Less Efficiency More Efficiency K8s API Deployment Manifest 9 APP APP APP APP
  • 11.
  • 12.
  • 13. Saurabh Gupta. "Containers and Pivotal Cloud Foundry" 2016.
  • 14. FROM maven:3.6-jdk-11-slim as BUILD COPY . /src WORKDIR /src RUN mvn install -DskipTests FROM openjdk:11.0.1-jre-slim-stretch EXPOSE 8080 WORKDIR /app ARG JAR=hello-0.0.1-SNAPSHOT.jar COPY --from=BUILD /src/target/$JAR /app.jar ENTRYPOINT ["java","-jar","/app.jar"]
  • 15.
  • 16. $ docker build -t tybritten/hello . $ docker push tybritten/hello $ docker pull tybritten/hello $ docker run -d -p 8080:8080 tybritten/hello
  • 17.
  • 18.
  • 20. Master Master Master API Server Users Control Plane Data Plane etcd Cloud Ctrl Manager Worker Kubelet kube-proxy docker Scheduler Controller Manager Worker Kubelet kube-proxy docker Worker Kubelet kube-proxy docker Flannel Flannel Flannel
  • 23. Vs
  • 24. Unix Philosophy: Do one thing. Do it well.
  • 26. Imperative $ kubectl run hello --image=tybritten/go-hello-world $ kubectl scale hello --replicas=3 $ kubectl create service clusterip hello --tcp=80:80
  • 27. Declarative $ kubectl apply -f hello-world.yaml
  • 30. apiVersion: v1 kind: Pod metadata: name: hello spec: containers: - image: tybritten/go-hello-world imagePullPolicy: Always name: hello
  • 33. POD
  • 34. one or more containers that share a network and storage
  • 35. the minimum scalable unit of your application
  • 36. MASTER Node 1 Node 2 Node 3 Node 4 hello kubelet kubelet kubelet kubelet Scheduler Pod Name: hello Image: hello1
  • 37. MASTER Node 1 Node 2 Node 3 Node 4 hello kubelet kubelet kubelet kubelet Scheduler hello Pod Name: hello Image: hello1
  • 38. MASTER Node 1 Node 2 Node 3 Node 4 hello kubelet kubelet kubelet kubelet Scheduler Pod Name: hello Image: hello1
  • 40. MASTER Node 1 Node 2 Node 3 Node 4 hello-a kubelet kubelet kubelet kubelet Scheduler Controller Manager Replica Set Name: hello Image: hello1 Size: 3 hello-ghello-s Pod Name: hello-a Image: hello1 Pod Name: hello-b Image: hello1 Pod Name: hello-c Image: hello1
  • 41. MASTER Node 1 Node 2 Node 3 Node 4 hello-a kubelet kubelet kubelet kubelet Scheduler Controller Manager Replica Set Name: hello Image: hello1 Size: 3 hello-ghello-s hello-d Pod Name: hello-a Image: hello1 Pod Name: hello-b Image: hello1 Pod Name: hello-d Image: hello1
  • 42. MASTER Node 1 Node 2 Node 3 Node 4 hello-a kubelet kubelet kubelet kubelet Scheduler Controller Manager Replica Set Name: hello Image: hello1 Size: 5 hello-ghello-s hello-d hello-t hello-z Pod Name: hello-a Image: hello1 Pod Name: hello-a Image: hello1 Pod Name: hello-a Image: hello1 Pod Name: hello-a Image: hello1 Pod Name: hello-a Image: hello1
  • 43. MASTER Node 1 Node 2 Node 3 Node 4 kubelet kubelet kubelet kubelet Scheduler Controller Manager Replica Set Name: hello Image: hello1 Size: 0
  • 45. MASTER Node 1 Node 2 Node 3 Node 4 hello-A-c kubelet kubelet kubelet kubelet Scheduler Controller Manager Deployment Name: hello Image: hello1 Size: 3 hello-A-ghello-A-s Replica Set Name: hello-A Image: hello1 Size: 3
  • 46. MASTER Node 1 Node 2 Node 3 Node 4 hello-A-c kubelet kubelet kubelet kubelet Scheduler Controller Manager Deployment Name: hello Image: hello2 Size: 3 hello-A-ghello-A-s Replica Set Name: hello-A Image: hello1 Size: 3 Replica Set Name: hello-B Image: hello2 Size: 3 hello-B-g hello-B-r hello-B-c
  • 47. MASTER Node 1 Node 2 Node 3 Node 4 kubelet kubelet kubelet kubelet Scheduler Controller Manager Deployment Name: hello Image: hello2 Size: 3 Replica Set Name: hello-A Image: hello1 Size: 0 Replica Set Name: hello-B Image: hello2 Size: 3 hello-B-g hello-B-r hello-B-c
  • 49. MASTER Node 1 Node 2 Node 3 Node 4 hello-1 kubelet kubelet kubelet kubelet Scheduler Controller Manager StatefulSet Name: db Image: hello1 Size: 3 Pod Name: hello-1 Image: hello1
  • 50. MASTER Node 1 Node 2 Node 3 Node 4 hello-1 kubelet kubelet kubelet kubelet Scheduler Controller Manager StatefulSet Name: hello Image: hello1 Size: 3 hello-2 Pod Name: hello-1 Image: hello1 Pod Name: hello-2 Image: hello1
  • 51. MASTER Node 1 Node 2 Node 3 Node 4 hello-1 kubelet kubelet kubelet kubelet Scheduler Controller Manager StatefulSet Name: hello Image: hello1 Size: 3 hello-3hello-2 Pod Name: hello-1 Image: hello1 Pod Name: hello-2 Image: hello1 Pod Name: hello-3 Image: hello1
  • 52. MASTER Node 1 Node 2 Node 3 Node 4 db-1 kubelet kubelet kubelet kubelet Scheduler Controller Manager StatefulSet Name: db Image: cassandra Size: 3 db-3db-2 Pod Name: hello-a Image: Pod Name: hello-b Image: Pod Name: db-1 Image: ... vol vol vol Pod Name: hello-a Image: Pod Name: hello-b Image: PVC Name: db-1 Image: ...
  • 54. $ kubectl run hello --image=tybritten/hello -- port=8080
  • 55. ● kubectl run created a deployment “deployments.apps/hello” NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE deployment.apps/hello 1 1 1 1 1m ● The deployment created a replicaset “replicaset.apps/hello-64f6bf9dd4” NAME DESIRED CURRENT READY AGE replicaset.apps/hello-64f6bf9dd4 1 1 1 1m ● Which created a pod “pod/hello-64f6bf9dd4-tq5dq” NAME READY STATUS RESTARTS AGE pod/hello-64f6bf9dd4-tq5dq 1/1 Running 0 2s
  • 56. $ kubectl scale --replicas=3 deployment/hello
  • 57. $ kubectl scale --replicas=3 deployment/hello deployment.extensions/hello scaled $ kubectl get all NAME READY STATUS RESTARTS AGE pod/hello-64f6bf9dd4-2bndq 1/1 Running 0 15m pod/hello-64f6bf9dd4-4kq9l 0/1 ContainerCreating 0 2s pod/hello-64f6bf9dd4-8lkcs 1/1 Running 0 5s NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE deployment.apps/hello 3 3 2 3 16m NAME DESIRED CURRENT READY AGE replicaset.apps/hello-64f6bf9dd4 3 3 2 16m
  • 58. $ kubectl edit deployment hello ... spec: containers: - env: - name: MESSAGE value: HELLO I LOVE YOU!!!! image: tybritten/go-hello imagePullPolicy: Always name: hello
  • 59. $ kubectl get all NAME READY STATUS RESTARTS AGE pod/hello-5c75b546c7-4lwnn 1/1 Running 0 1m pod/hello-5c75b546c7-bwxxq 1/1 Running 0 1m pod/hello-5c75b546c7-sl2pg 1/1 Running 0 1m NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE deployment.apps/hello 3 3 3 3 23m NAME DESIRED CURRENT READY AGE replicaset.apps/hello-5c75b546c7 3 3 3 1m replicaset.apps/hello-64f6bf9dd4 0 0 0 23m
  • 60. $ kubectl port-forward deployment/hello 8080 Forwarding from 127.0.0.1:8080 -> 8080 $ curl localhost:8080 <html><head><title>HELLO I LOVE YOU!!!!</title></head><body>HELLO I LOVE YOU!!!!!</body></html>
  • 62. $ kubectl expose deployment hello --type=LoadBalancer --port 80 --target-port 8080
  • 63. kubectl expose deployment hello ● creates a service with a ClusterIP that acts as an internal loadbalancer to all pods in the “hello” deployment --type=LoadBalancer ● Creates a NodePort ● Configures a LoadBalancer to access the pods via the NodePort $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello LoadBalancer 10.39.248.123 35.184.17.129 80:30468/TCP 5m $ curl 35.184.17.129 <html><head><title>HELLO I LOVE YOU!!!!</title></head><body>HELLO I LOVE YOU!!!!!</body></html>
  • 64. Service track Pods based on metadata and provides connectivity and service discovery (DNS, Env variables) for them. Type ClusterIP (default) exposes service on a cluster-internal IP. Container Container Pod app=bacon Container Container Pod app=bacon Service app=bacon 10.3.55.7
  • 65. Service track Pods based on metadata and provides connectivity and service discovery (DNS, Env variables) for them. Type NodePort extends ClusterIP to expose services on each node’s IP via a static port. Container Container Pod app=bacon Container Container Pod app=bacon Service app=bacon 10.3.55.7 192.168.0.5:4530 K8s Worker K8s Worker 192.168.0.6:4530
  • 66. Service track Pods based on metadata and provides connectivity and service discovery (DNS, Env variables) for them. Type LoadBalancer extends NodePort to configure a cloud provider’s load balancer using the cloud-controller-manager. Container Container Pod app=bacon Container Container Pod app=bacon Service app=bacon 10.3.55.7 192.168.0.5:4530 K8s Worker K8s Worker 192.168.0.6:4530 Load Balancer 33.6.5.22:80
  • 67. Ingress a controller that manages an external entity to provide load balancing, SSL termination and name-based virtual hosting to services based on a set of rules. Ingress Service app=bacon https://example.com Service app=eggs /bacon /eggs
  • 69. Container Container Pod Volume Is [effectively] a Directory, possibly with data in it, available to all containers in a Pod. Usually Shares lifecycle of a Pod (Created when Pod is created, destroyed when Pod is destroyed). Persistent Volumes outlive Pods. Can be mounted from local disk, or from a network storage device such as a EBS volume, iscsi, NFS, etc.
  • 70. Config Map / Secret
  • 71. $ kubectl create configmap hello --from-literal=’message=Hello S1T’
  • 72. kubectl create configmap hello --from-file=index.html ● creates a configmap called “hello” containing the contents index.html $ kubectl get configmap hello -o yaml apiVersion: v1 kind: ConfigMap metadata: name: hello data: index.html: "<html>n<head>nt<title>Hello to my friends</title>n</head>n<body>ntHello to my friendsn</body>n</html>nn"
  • 73. kubectl create secret generic hello --from-file=index.html ● creates a secret called “hello” containing a base64 hash of contents index.html $ kubectl get secret hello -o yaml apiVersion: v1 kind: Secret metadata: name: hello data: index.html: PGh0bWw+CjxoZWFkPgoJPHRpdGxlPkhlbGxvIHRvIG15IGZyaWVuZHM8L3RpdGxlPgo8L2hlYWQ+Cjxib2R5 PgoJSGVsbG8gdG8gbXkgZnJpZW5kcwo8L2JvZHk+CjwvaHRtbD4KCg==
  • 74. Provides key-value pairs to be injected into a pod much like user-data is injected into a Virtual Machine in the cloud. Allows you to do last minute configuration of applications running on Kubernetes such as setting a database host, or a admin password. ConfigMaps store values as strings, Secrets store them as byte arrays (serialized as base64 encoded strings). Secrets are [currently] not encrypted by default. This is likely to change. Can be injected as files in a Volume, or as Environment Variables.
  • 75.
  • 76. Helm
  • 77.
  • 79. Discover & launch great Kubernetes-ready apps Search charts 555 charts ready to deploy Wordpress, Jenkins, Kubeless... Secure | https://hub.helm.sh
  • 80. apiVersion: v1 kind: ConfigMap metadata: name: {{ .Chart.name }}-cm data: db: {{ .Value.db }} apiVersion: apps/v1beta1 kind: Deployment metadata: name: {{ .Chart.name }}-app labels: app: {{ .Chart.name }} ... ... spec: containers: - image: tybritten/hello name: hello volumeMounts: - name: config mountPath: /etc/hello volumes: - name: config configMap: name: {{ .Chart.name }}-cm apiVersion: v1 kind: Service metadata: name: {{ .Chart.name }}-svc labels: app: {{ .Chart.name }}-world spec: ports: - port: {{ .Value.port }} protocol: TCP targetPort: 8080 selector: app: {{ .Chart.name }}-world type: NodePort
  • 81. $ helm install --name staging . --set db=’user:pass@staging.mysql/dbname’ $ helm install --name production . --set db=’user:pass@production.mysql/dbname’
  • 87. +
  • 89. Cluster Management ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Pipelines ● Pipeline ● Stage ● Deployment Strategies
  • 90. Multi-Cloud Inventory ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Actions and Reactions ● Pipeline ● Stage ● Deployment Strategies
  • 91.
  • 92. Cluster Management ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Deployment Management ● Pipeline ● Stage ● Deployment Strategies Deployment Strategies
  • 94.
  • 96.
  • 97.
  • 98. Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.
  • 99. Twitter: @tybritten Video: https://youtu.be/57asZ7_2w5Q Slides: check your email © Copyright 2019 Pivotal Software, Inc. All rights Reserved.