SlideShare a Scribd company logo
© Copyright 2018 Pivotal Software, Inc. All rights Reserved.
Paul Czarkowski
pczarkowski@pivotal.io
Twitter: @pczarkowski
Spring into
Kubernetes
© Copyright 2018 Pivotal Software, Inc. All rights Reserved.
Paul Czarkowski
pczarkowski@pivotal.io
Twitter: @pczarkowski
Spring into
Kubernetes
Register Today Use
Discount Code
S1P_Save200
October 7–10, 2019
Austin Convention Center
and Save!
Spring Into Kubernetes DFW
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 ?
9
?????
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 ?
10
?????
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
11
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
12
APP
APP
APP
APP
Containers
Spring Into Kubernetes DFW
Spring Into Kubernetes DFW
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"]
Spring Into Kubernetes DFW
$ docker build -t paulczar/hello .
$ docker push paulczar/hello
$ docker pull paulczar/hello
$ docker run -d -p 8080:8080 paulczar/hello
Spring Into Kubernetes DFW
Spring Into Kubernetes DFW
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=paulczar/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: paulczar/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=paulczar/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: paulczar/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.
ConfigMaps/Secrets (user-data)
Spring Into Kubernetes DFW
Helm
Helm is the best way to
find, share, and use
software built for Kubernetes
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: paulczar/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
@pczarkowski
https://unsplash.com/photos/WHWYBmtn3_0
@pczarkowski
+
@pczarkowski
APP
APP
APP
APP
@pczarkowski
Cluster Management
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Pipelines
● Pipeline
● Stage
● Deployment Strategies
@pczarkowski
Multi-Cloud Inventory
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Actions and Reactions
● Pipeline
● Stage
● Deployment Strategies
@pczarkowski
@pczarkowski
Cluster Management
● Server Group
● Cluster
● Applications
● Load Balancer
● Firewall
Deployment Management
● Pipeline
● Stage
● Deployment Strategies
Deployment Strategies
Spinnaker
Cloud
API
App App App
@pczarkowski
@pczarkowski
Halyard
https://en.wikipedia.org/wiki/Halyard
@pczarkowski
Spring Into Kubernetes DFW
Transforming How The World Builds Software
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.
Twitter: @pczarkowski
Video: https://youtu.be/zzBUpDS7pmY
Slides: check your email
© Copyright 2019 Pivotal Software, Inc. All rights Reserved.
Ad

Recommended

Kube Your Enthusiasm - Tyler Britten
Kube Your Enthusiasm - Tyler Britten
VMware Tanzu
 
Using Spinnaker to Create a Development Workflow on Kubernetes - Paul Czarkowski
Using Spinnaker to Create a Development Workflow on Kubernetes - Paul Czarkowski
VMware Tanzu
 
Kubernetes
Kubernetes
DONGJIN KIM
 
Basic Rails Training
Basic Rails Training
Arthit Hongchintakul
 
Kubernetes Scheduler deep dive
Kubernetes Scheduler deep dive
DONGJIN KIM
 
BOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyo
Toshiaki Maki
 
Web deploy command line
Web deploy command line
Larry Nung
 
Web deploy
Web deploy
Larry Nung
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
Laurent Bernaille
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
rhirschfeld
 
#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt
rhirschfeld
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)
ThirdWaveInsights
 
Heat and its resources
Heat and its resources
Sangeeth Kumar
 
Refactoring terraform
Refactoring terraform
Nell Shamrell-Harrington
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Puppet
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Kafka Confluent Platform services on Kubernetes
Kafka Confluent Platform services on Kubernetes
Ahmed Mekawy
 
Ansible : what's ansible & use case by REX
Ansible : what's ansible & use case by REX
Saewoong Lee
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
Laurent Bernaille
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
 
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Amrit Sarkar
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWS
Laurent Bernaille
 
Puppet Performance Profiling
Puppet Performance Profiling
ripienaar
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
Nicola Paolucci
 
GeekAustin DevOps
GeekAustin DevOps
Matt Ray
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
Chef Software, Inc.
 
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
VMware Tanzu
 
Kube Your Enthusiasm
Kube Your Enthusiasm
VMware Tanzu
 

More Related Content

What's hot (20)

10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
Laurent Bernaille
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
rhirschfeld
 
#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt
rhirschfeld
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)
ThirdWaveInsights
 
Heat and its resources
Heat and its resources
Sangeeth Kumar
 
Refactoring terraform
Refactoring terraform
Nell Shamrell-Harrington
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Puppet
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Kafka Confluent Platform services on Kubernetes
Kafka Confluent Platform services on Kubernetes
Ahmed Mekawy
 
Ansible : what's ansible & use case by REX
Ansible : what's ansible & use case by REX
Saewoong Lee
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
Laurent Bernaille
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
 
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Amrit Sarkar
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Discovering OpenBSD on AWS
Discovering OpenBSD on AWS
Laurent Bernaille
 
Puppet Performance Profiling
Puppet Performance Profiling
ripienaar
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
Nicola Paolucci
 
GeekAustin DevOps
GeekAustin DevOps
Matt Ray
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
Chef Software, Inc.
 
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin
 
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
10 ways to shoot yourself in the foot with kubernetes, #9 will surprise you! ...
Laurent Bernaille
 
Kubecon 2017 Zero Touch Kubernetes
Kubecon 2017 Zero Touch Kubernetes
rhirschfeld
 
#SREcon Immutable Infrastructure: rethinking configuration mgmt
#SREcon Immutable Infrastructure: rethinking configuration mgmt
rhirschfeld
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)
ThirdWaveInsights
 
Heat and its resources
Heat and its resources
Sangeeth Kumar
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Puppet
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Kafka Confluent Platform services on Kubernetes
Kafka Confluent Platform services on Kubernetes
Ahmed Mekawy
 
Ansible : what's ansible & use case by REX
Ansible : what's ansible & use case by REX
Saewoong Lee
 
Deep Dive in Docker Overlay Networks
Deep Dive in Docker Overlay Networks
Laurent Bernaille
 
Hands on Docker - Launch your own LEMP or LAMP stack
Hands on Docker - Launch your own LEMP or LAMP stack
Dana Luther
 
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Scaling search-clusters-solr-k8s-2020-amrit-sarkar
Amrit Sarkar
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Chris Bailey
 
Puppet Performance Profiling
Puppet Performance Profiling
ripienaar
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
Nicola Paolucci
 
GeekAustin DevOps
GeekAustin DevOps
Matt Ray
 
Cookbook refactoring & abstracting logic to Ruby(gems)
Cookbook refactoring & abstracting logic to Ruby(gems)
Chef Software, Inc.
 
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin on Kubernetes with Spark and Kafka - meetup @twitter
Apache Zeppelin
 

Similar to Spring Into Kubernetes DFW (20)

Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
VMware Tanzu
 
Kube Your Enthusiasm
Kube Your Enthusiasm
VMware Tanzu
 
Using kubernetes to lose your fear of using containers
Using kubernetes to lose your fear of using containers
josfuecas
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Kubernetes - Starting with 1.2
Kubernetes - Starting with 1.2
William Stewart
 
Kubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical View
Lei (Harry) Zhang
 
Introduction about Kubernates Cluster
Introduction about Kubernates Cluster
♛Kumar Aneesh♛
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
Claus Ibsen
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Kubernetes Internals
Kubernetes Internals
Shimi Bandiel
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
kubernetes.pdf
kubernetes.pdf
crezzcrezz
 
Kubernetes for Java developers
Kubernetes for Java developers
Robert Barr
 
Scaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
Deivid Hahn Fração
 
Kubernetes for the PHP developer
Kubernetes for the PHP developer
Paul Czarkowski
 
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
Bo Ingram
 
Kubernetes Introduction
Kubernetes Introduction
Miloš Zubal
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Anthony Dahanne
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Codemotion
 
It's not too late to learn about k8s
It's not too late to learn about k8s
Cesar Tron-Lozai
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
VMware Tanzu
 
Kube Your Enthusiasm
Kube Your Enthusiasm
VMware Tanzu
 
Using kubernetes to lose your fear of using containers
Using kubernetes to lose your fear of using containers
josfuecas
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Kubernetes - Starting with 1.2
Kubernetes - Starting with 1.2
William Stewart
 
Kubernetes Walk Through from Technical View
Kubernetes Walk Through from Technical View
Lei (Harry) Zhang
 
Introduction about Kubernates Cluster
Introduction about Kubernates Cluster
♛Kumar Aneesh♛
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
Claus Ibsen
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Kubernetes Internals
Kubernetes Internals
Shimi Bandiel
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
kubernetes.pdf
kubernetes.pdf
crezzcrezz
 
Kubernetes for Java developers
Kubernetes for Java developers
Robert Barr
 
Scaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
Deivid Hahn Fração
 
Kubernetes for the PHP developer
Kubernetes for the PHP developer
Paul Czarkowski
 
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
Bo Ingram
 
Kubernetes Introduction
Kubernetes Introduction
Miloš Zubal
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Anthony Dahanne
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Codemotion
 
It's not too late to learn about k8s
It's not too late to learn about k8s
Cesar Tron-Lozai
 
Ad

More from VMware Tanzu (20)

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
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 It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
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 It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Ad

Recently uploaded (20)

Impact of Social Media on Consumer Buying Behaviour of Personal Care Products
Impact of Social Media on Consumer Buying Behaviour of Personal Care Products
KARTIKTHANTH1
 
Writer and SEO Copyeditor Resume Michelle Pellettier
Writer and SEO Copyeditor Resume Michelle Pellettier
Michelle Pellettier
 
How To Create PR Content That Journalists Actually Use
How To Create PR Content That Journalists Actually Use
https://anewswire.com/
 
Core_Marketing_Concepts mba 1(1)[1].pptx
Core_Marketing_Concepts mba 1(1)[1].pptx
panther1234gaming
 
DataReportal-GDR013-20231019-Digital-2023-October-Global-Statshot-Report-v02-...
DataReportal-GDR013-20231019-Digital-2023-October-Global-Statshot-Report-v02-...
VanessaVerhusckaSanj1
 
Boost Your Communication with DIGINTRA'S Bulk SMS Service
Boost Your Communication with DIGINTRA'S Bulk SMS Service
DIGINTRA Teleservices
 
ANewswire vs Send2Press_ Who Provides Better Editorial Support
ANewswire vs Send2Press_ Who Provides Better Editorial Support
https://anewswire.com/
 
Top AI-Driven SEO Strategies to Rank High in 2025
Top AI-Driven SEO Strategies to Rank High in 2025
digitalzeroz01
 
Marketing Graphics for BTU Protocol & Bonitasoft
Marketing Graphics for BTU Protocol & Bonitasoft
sohamdatta047
 
MVP Thinking in a changing Search environment
MVP Thinking in a changing Search environment
Vanda Pokecz
 
The Ultimate Keyword & SEO Prompt Collection.docx
The Ultimate Keyword & SEO Prompt Collection.docx
Technology
 
TRESemme Objective, Source of Growth, Target Audience.pdf
TRESemme Objective, Source of Growth, Target Audience.pdf
giselladarfian
 
Marketing_Iceberg_By_CA_Suvidha_Chaplot.pdf
Marketing_Iceberg_By_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Turn less traffic into more revenue, Zero-click SEO
Turn less traffic into more revenue, Zero-click SEO
Anton Shulke
 
SEO in the era of AI - by Miranda Gahrmann
SEO in the era of AI - by Miranda Gahrmann
Miranda Gahrmann MSc ☆ Global eCommerce Consultant
 
How to Write a Press Release for a Product
How to Write a Press Release for a Product
https://anewswire.com/
 
Cost Accounting- Partnership Accounting - profit and loss appropriate account
Cost Accounting- Partnership Accounting - profit and loss appropriate account
DrDMoorthy
 
Strategic overview of Marketing Departement
Strategic overview of Marketing Departement
NabeelMalik49
 
The Ultimate Guide to Dominating Local Markets: National Brand Strategies for...
The Ultimate Guide to Dominating Local Markets: National Brand Strategies for...
KHM Anwar
 
Mapping the Most Magical Island in Fantasy Fiction.
Mapping the Most Magical Island in Fantasy Fiction.
globalbookmarketinga
 
Impact of Social Media on Consumer Buying Behaviour of Personal Care Products
Impact of Social Media on Consumer Buying Behaviour of Personal Care Products
KARTIKTHANTH1
 
Writer and SEO Copyeditor Resume Michelle Pellettier
Writer and SEO Copyeditor Resume Michelle Pellettier
Michelle Pellettier
 
Core_Marketing_Concepts mba 1(1)[1].pptx
Core_Marketing_Concepts mba 1(1)[1].pptx
panther1234gaming
 
DataReportal-GDR013-20231019-Digital-2023-October-Global-Statshot-Report-v02-...
DataReportal-GDR013-20231019-Digital-2023-October-Global-Statshot-Report-v02-...
VanessaVerhusckaSanj1
 
Boost Your Communication with DIGINTRA'S Bulk SMS Service
Boost Your Communication with DIGINTRA'S Bulk SMS Service
DIGINTRA Teleservices
 
Top AI-Driven SEO Strategies to Rank High in 2025
Top AI-Driven SEO Strategies to Rank High in 2025
digitalzeroz01
 
Marketing Graphics for BTU Protocol & Bonitasoft
Marketing Graphics for BTU Protocol & Bonitasoft
sohamdatta047
 
MVP Thinking in a changing Search environment
MVP Thinking in a changing Search environment
Vanda Pokecz
 
The Ultimate Keyword & SEO Prompt Collection.docx
The Ultimate Keyword & SEO Prompt Collection.docx
Technology
 
TRESemme Objective, Source of Growth, Target Audience.pdf
TRESemme Objective, Source of Growth, Target Audience.pdf
giselladarfian
 
Marketing_Iceberg_By_CA_Suvidha_Chaplot.pdf
Marketing_Iceberg_By_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Turn less traffic into more revenue, Zero-click SEO
Turn less traffic into more revenue, Zero-click SEO
Anton Shulke
 
Cost Accounting- Partnership Accounting - profit and loss appropriate account
Cost Accounting- Partnership Accounting - profit and loss appropriate account
DrDMoorthy
 
Strategic overview of Marketing Departement
Strategic overview of Marketing Departement
NabeelMalik49
 
The Ultimate Guide to Dominating Local Markets: National Brand Strategies for...
The Ultimate Guide to Dominating Local Markets: National Brand Strategies for...
KHM Anwar
 
Mapping the Most Magical Island in Fantasy Fiction.
Mapping the Most Magical Island in Fantasy Fiction.
globalbookmarketinga
 

Spring Into Kubernetes DFW

  • 1. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Paul Czarkowski [email protected] Twitter: @pczarkowski Spring into Kubernetes
  • 2. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Paul Czarkowski [email protected] Twitter: @pczarkowski Spring into Kubernetes
  • 3. Register Today Use Discount Code S1P_Save200 October 7–10, 2019 Austin Convention Center and Save!
  • 5. Operations is the Secret sauce (just not traditional operations)
  • 6. Operations as a Competitive Advantage
  • 9. 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 ? 9 ????? PaaS Application Platform Function Platform ??? API
  • 10. 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 ? 10 ????? PaaS Application Platform Pivotal Function Service ??? API
  • 11. 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 11 APP APP APP APP cf push
  • 12. 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 12 APP APP APP APP
  • 16. Saurabh Gupta. "Containers and Pivotal Cloud Foundry" 2016.
  • 17. 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"]
  • 19. $ docker build -t paulczar/hello . $ docker push paulczar/hello $ docker pull paulczar/hello $ docker run -d -p 8080:8080 paulczar/hello
  • 23. 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
  • 26. Vs
  • 27. Unix Philosophy: Do one thing. Do it well.
  • 29. Imperative $ kubectl run hello --image=paulczar/go-hello-world $ kubectl scale hello --replicas=3 $ kubectl create service clusterip hello --tcp=80:80
  • 30. Declarative $ kubectl apply -f hello-world.yaml
  • 33. apiVersion: v1 kind: Pod metadata: name: hello spec: containers: - image: paulczar/go-hello-world imagePullPolicy: Always name: hello
  • 36. POD
  • 37. one or more containers that share a network and storage
  • 38. the minimum scalable unit of your application
  • 39. 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 kubelet kubelet kubelet kubelet Scheduler hello Pod Name: hello Image: hello1
  • 41. MASTER Node 1 Node 2 Node 3 Node 4 hello kubelet kubelet kubelet kubelet Scheduler Pod Name: hello Image: hello1
  • 43. 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
  • 44. 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
  • 45. 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
  • 46. MASTER Node 1 Node 2 Node 3 Node 4 kubelet kubelet kubelet kubelet Scheduler Controller Manager Replica Set Name: hello Image: hello1 Size: 0
  • 48. 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
  • 49. 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
  • 50. 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
  • 52. 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
  • 53. 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
  • 54. 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
  • 55. 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: ...
  • 57. $ kubectl run hello --image=paulczar/hello -- port=8080
  • 58. ● 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
  • 59. $ kubectl scale --replicas=3 deployment/hello
  • 60. $ 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
  • 61. $ kubectl edit deployment hello ... spec: containers: - env: - name: MESSAGE value: HELLO I LOVE YOU!!!! image: paulczar/go-hello imagePullPolicy: Always name: hello
  • 62. $ 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
  • 63. $ 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>
  • 65. $ kubectl expose deployment hello --type=LoadBalancer --port 80 --target-port 8080
  • 66. 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>
  • 67. 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
  • 68. 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
  • 69. 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
  • 70. 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
  • 72. 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.
  • 73. Config Map / Secret
  • 74. $ kubectl create configmap hello --from-literal=’message=Hello S1T’
  • 75. 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"
  • 76. 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==
  • 77. 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. ConfigMaps/Secrets (user-data)
  • 79. Helm
  • 80. Helm is the best way to find, share, and use software built for Kubernetes
  • 82. Discover & launch great Kubernetes-ready apps Search charts 555 charts ready to deploy Wordpress, Jenkins, Kubeless... Secure | https://hub.helm.sh
  • 83. 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: paulczar/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
  • 84. $ helm install --name staging . --set db=’user:[email protected]/dbname’ $ helm install --name production . --set db=’user:[email protected]/dbname’
  • 92. Cluster Management ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Pipelines ● Pipeline ● Stage ● Deployment Strategies @pczarkowski
  • 93. Multi-Cloud Inventory ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Actions and Reactions ● Pipeline ● Stage ● Deployment Strategies @pczarkowski
  • 95. Cluster Management ● Server Group ● Cluster ● Applications ● Load Balancer ● Firewall Deployment Management ● Pipeline ● Stage ● Deployment Strategies Deployment Strategies
  • 101. Transforming How The World Builds Software © Copyright 2019 Pivotal Software, Inc. All rights Reserved.
  • 102. Twitter: @pczarkowski Video: https://youtu.be/zzBUpDS7pmY Slides: check your email © Copyright 2019 Pivotal Software, Inc. All rights Reserved.