SlideShare a Scribd company logo
1 of 62
Download to read offline
HYB205: CI/CD Across
Multiple Environments
Vic Iglesias, Cloud Solutions Architect, Google Cloud
Benjamin Good, Solutions Architect, Google Cloud
Karl Isenberg, Tech Lead Manager, Cruise
Agenda
Challenges of
Multi-environment
Infrastructure
Building a
Consistent
Platform with
Kubernetes
Reliable
Application
Rollouts
Building a Platform at
Cruise Automation
1 2 3 4
Karl Isenberg
Tech Lead Manager
Ben Good
Cloud Solutions Architect
Vic Iglesias
Cloud Solutions Architect
01
Challenges of
Multi-environment
Infrastructure
Prod
Dev
>SSH
Day 1
Staging
Dev
Prod
Shared Tools
>SSH
>SSH
Day 164
Staging
Dev
Prod
Shared Tools
Day 237
Staging
Dev
Prod
Shared Tools
Next Gen
Prod
Kubernetes
Engine
Compute
Engine
Staging
Compute
Engine
Day 900
Challenges with multiple environments
● Inconsistent deployment tooling
● Environment drift
● Managing access control
● Networking complexity
● Integrating your existing tools
On Prem
What is a platform?
Staging
Dev
Prod
Shared Tools
Next Gen
Prod
Kubernetes
Engine
Compute
Engine
Staging
Compute
Engine
What is a platform?
Staging
Dev
Prod
Shared Tools
Next Gen
Prod
Kubernetes
Engine
Compute
Engine
Staging
Compute
Engine
Platform
02
Building a
Consistent
Platform with
Kubernetes
Layers of your stack
Platform
Deployment tools, Service Management
Infrastructure
Networking, Compute, Storage
Applications
Layers of your stack
Users
Devs
Infrastructure
Platform
App
Benefits of Building with Kubernetes
● Substrate for building a consistent
deployment platform
● Single API for workload management
● Managed service on all major cloud providers
● On-prem installations with GKE On-prem
03
Reliable
Application
Rollouts
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['myapp']
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
apiVersion: v1
kind: ConfigMap
metadata:
name: game-config
namespace: default
data:
game.properties: |
enemies=aliens
lives=3
ui.properties: |
color.good=purple
color.bad=yellow
allow.textmode=true
how.nice.to.look=fairlyNice
kind: Endpoints
apiVersion: v1
metadata:
name: my-service
subsets:
- addresses:
- ip: 1.2.3.4
ports:
- port: 9376
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
Managing
Kubernetes Manifests
across Environments
What is a “Kubernetes Application”?
Pods Config Volumes SecretsServices
Pods Config Volumes Services
What is a “Kubernetes Application”?
YAML YAML YAML YAML
What is a “Kubernetes Application”?
Deployable ManifestEnvironment-specificBase
How do we deploy to many environments?
Staging
Production
> kubectl
> kubectl
Helm
● Use a templating engine to render your
manifests by passing in variables called
“values”
● Large community and lots of examples at
https://hub.helm.sh
● Use loops and conditionals to “program”
your end result. A double-edged sword.
● Familiar for folks coming from CM tools
like Ansible and Chef
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: {{ .Values.image }}
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
image: busybox
logLevel: debug
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
env:
- name: LOG_LEVEL
value: debug
pod.yaml values.yaml output.yaml
Helm
helm template .
Documentation: https://helm.sh/docs/helm/#helm-template
Helm
Kustomize
Additional Features
● Apply common labels and
annotations
● Add a prefix to all resource names
● Inject config map & secret contents
from local files
● Built-in to kubectl as of 1.14
Add patches to Kubernetes
YAML files leaving the
original YAML untouched
and usable as is.
Kustomize
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['app']
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
spec:
containers:
- name: myapp
command: ['app', '--dev']
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['app', '--dev']
base.yaml dev-patch.yaml output.yaml
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp
image: busybox
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
spec:
containers:
- name: myapp
image: busybox:dev
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp
image: busybox:dev
base.yaml dev.yaml output.yaml
Kustomize
dev/kustomization.yaml
namespace: vic-dev
commonLabels:
owner: vic
bases:
- ../base/
patches:
- patch.yaml
configMapGenerator:
- name: application-properties
files:
- properties
~/myapp
├── base/
└── deployment.yaml
└── service.yaml
└── kustomization.yaml
├── dev/
└── patch.yaml
└── properties
└── kustomization.yaml
kubectl apply -k .
kubectl apply -f .
Documentation: https://kubectl.docs.kubernetes.io
Kustomize
kubectl apply -k .
Documentation: https://kubectl.docs.kubernetes.io
Kustomize
App 1 Base
App 2 Base
Staging Patches Staging
Manifests
Prod Patches
Prod
Manifests
Java App Base
App 1 Patches
App 2 Patches
Environment ConfigApp Config Deployable Config
Kustomize Example
Deployment Strategies
Deployment Tooling
Staging
Dev
Prod
CI/CD Tools
bash
scripts
chef
puppet
Now with Kubernetes
Staging
Dev
Prod
CI/CD Tools
bash
scripts
Kubernetes
Engine
Kubernetes
Engine
Spinnaker to the Rescue
Staging
Dev
Prod
CI/CD Tools
Kubernetes
Engine
Kubernetes
Engine
Kubernetes Awareness
● Pod level visibility
● Automated rollbacks
● Account == k8s cluster
● Resource annotations
Spinnaker Pipeline
Start
Deploy
Frontend
Canary
Deploy
Backend
Canary
Rollout
Backend
Rollout
Frontend
Validate
Canary Success
Pipeline Considerations
● Use the same pipeline in all environments
● Pipelines as code
● Automate canary analysis with Kayenta
● Deploy pipelines
● Leverage Istio for traffic management
Start
Deploy
Frontend
Canary
Deploy
Backend
Canary
Rollout
Backend
Rollout
Frontend
Validate
Canary Success
Single Cluster Roll-out
Shared Tools
Kubernetes
Engine
GKE
us-central1
Kubernetes
Engine
Production
Staging
Deployment Strategies
Challenges in a Multi-Cluster Env
GKE
us-central1
Kubernetes
Engine
GKE
europe-west2
Kubernetes
Engine
GKE
On-prem
Kubernetes
Engine
Other Cloud
Kubernetes
1.12.5 1.12.5 1.11.7 1.12.4
● Variations in the clusters
● Configuration differences
Kubernetes
Shared Tools
Kubernetes
Engine
Multi-Cluster Rollouts
GKE
us-central1
Kubernetes
Engine
GKE
europe-west2
Kubernetes
Engine
GKE
On-prem
Kubernetes
Engine
Other Cloud
Kubernetes
1.12.5 1.12.5 1.11.7 1.12.4
● Leverage accounts aka “k8s clusters” in Spinnaker
○ Serial rollout of rollouts
○ Parallel rollout to each environment
● Canary on each cluster in each environment
Kubernetes
Kubernetes
Engine
Traffic Management
GKE
us-central1
Kubernetes
Engine
GKE
europe-west2
Kubernetes
Engine
GKE
On-prem
Kubernetes
Engine
Other Cloud
Kubernetes
1.12.5 1.12.5 1.11.7 1.12.4
● Use traffic management tools for North/South traffic
● Use Istio to manage East/West traffic
● Canary at the cluster level
Other Cloud
Kubernetes
1.12.5
Cloudflare, Akamai, Fastly, others
Kubernetes
Engine
Kubernetes Kubernetes
Updating Clusters
Shared Tools
Kubernetes
Engine
GKE
us-central1
Kubernetes
Engine
1.12.4
GKE
us-central1
Kubernetes
Engine
1.12.5
● Treat your pipelines like code
○ Keep them in source control
○ Deploy them like code
○ Declarative pipelines
● Google Cloud Storage plugin for Spinnaker
and Jenkins artifacts
● In Spinnaker “accounts” are K8s clusters
04
Building a
Platform at
Cruise
Automation
We’re building the world’s most advanced
self-driving vehicles to safely connect people with
the places, things, and experiences they care about.
https://cruise-automation.github.io/webviz/worldview/https://getcruise.com/
Multi-Cloud Infrastructure
On Premises
● Office IT
● Data Ingest
● Network Hub
GCP
● PaaS GKE
● Image Registry
● Continuous
Deployment
● Data Lake
● Data Processing
● Data Science
● Machine Learning
● Simulation
AWS
● PaaS AWS
● Source Control
● Continuous
Integration
@karlkfi
GCP Environments
@karlkfi
Dev Staging Prod
NetEng
Team X
PaaS
Kubernetes
Engine
Shared
Private
Network
Cloud SQL
Kubernetes
Engine
Shared
Private
Network
Cloud SQL
Kubernetes
Engine
Shared
Private
Network
Cloud SQL
Projects
Folders & Networks
GKE Environments
@karlkfi
Pods
Dev Staging Prod
Team A
Team B
Team C Pods Pods
Pods Pods Pods
Pods Pods Pods
Namespaces
Clusters
Security Challenges
Login
● Identity Provider
● Single Sign-On
● Service Accounts
● Credential Rotation
● Bootstrapping
Encryption
● Secret
Management
● Secrets Injection
● Secrets Caching
● TLS Termination
● TLS End to end
Access Control
● Groups
● Roles
● Role Binding
● User to Platform
● User to Service
● User through Service
● Service to Service
@karlkfi
In-Memory
Volume
DAYTONA
Init Container
App Container
Kubernetes Pod
Secrets
Login
Vault Integration
(Internal) cruise/daytona@karlkfi
Vault Login
Kubernetes service accounts used
for Vault authentication.
Secrets Injection
Init container side-loads secrets
GCP Service Accounts
Vault generates temporary
credentials on-demand
Vault Namespacing
@karlkfi
Group Permissions Path
Team Admin admin secret/<prefix>/<namespace>/*
Team Contractor list secret/<prefix>/<namespace>/*
App Service Account list, get secret/<prefix>/<namespace>/<env>/<app>/*
Deployment Challenges
Images
● Image Building
● Container Registry
● Image Caching
● Image Versioning
● Image Promotion
● Pull Secrets
App Ops
● Metrics Library
● Structured Logging
● DNS Config
● TLS Config
Lifecycle
● Templating
● Cloud Dev Env
● Integration Test Env
● Load Test Env
● Approval Gates
● Blue/Green
● Deploy Targets
● Account Management
@karlkfi
Image Building
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
name: example-build
spec:
serviceAccountName: build-auth-example
source:
git:
url: https://github.com/example/build-example.git
revision: master
steps:
- name: ubuntu-example
image: ubuntu
args: [“ubuntu-build-example”, “SECRETS-example.md”]
steps:
- image: gcr.io/example-builders/build-example
args: [“echo”, “hello-example”, “build”]
Build
GCR
Container Registry
(OSS) https://github.com/knative/build
Github
Source Control
Knative Build
@karlkfi
Spinnaker Account Management
apiVersion: spinnaker.getcruise.com/v1alpha
kind: SpinnakerAccount
metadata:
name: <project>-<cluster>-<namespace>-<role>
namespace: <namespace>
spec:
provider: kubernetes
credentials:
type: kubeconfig
vaultSecret:
path: secret/spinnaker/kubeconfig-<account-name>
address: https://vault.example.com:8200
kubernetesServiceAccount:
name: spinnaker-<account-name>
bindings:
- type: Role
role: edit
roles:
- name: <google-group>
permissions:
- write
SpinnakerAccount
Spinnaker Operator
(Internal) cruise/spinnaker-operator
App PodsApp PodsK8s Resources
Spinnaker
@karlkfi
Networking Challenges
DNS
● Public DNS (Private Zones)
● Private DNS (IP Masquerade)
Ingress
● Private Ingress (ILB, Nginx)
● Public Ingress (GCLB)
Egress
● Private Egress (Cloud Router)
● Public Egress (Cloud NAT, Network Tags)
@karlkfi
Private Ingress Controllers
App PodsApp Pods
Ingress
annotation:
kubernetes.io/ingress.class: nginx
Ingress Controller
(OSS) https://github.com/kubernetes-incubator/external-dns +
(OSS) https://github.com/kubernetes/ingress-nginx +
(OSS) https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing
App Pods
GCE Cloud Provider
Private
Cloud DNS
Internal
Load
Balancer
Kubernetes
Engine
@karlkfi
External DNS
(todo)
Service
type: LoadBalancer
annotation:
external-dns.alpha.kubernetes.io/hostname:
nginx.example.com.
Service
type: ClusterIP
Nginx Pods
Operations Challenges
Observability
● Metrics
● Logging
● Tracing
● Uptime Checks
Availability
● Backups
● Descheduler
● Node Pool Management
@karlkfi
Runscope Controller
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-build
annotations:
kubernetes.io/ingress.class: nginx
runscope.getcruise.com/bucket-name: paas-gke
runscope.getcruise.com/enable-api-tests: true
runscope.getcruise.com/parent-environment-id: <...>
runscope.getcruise.com/path: /
runscope.getcruise.com/schedule: 1m
spec:
rules:
- host: demoapp.example.com
http: {...}
tls:
...
Ingress
(Internal) cruise/runscope-controller
Runscope Controller
Runscope
Public SaaS
@karlkfi
App PodsApp PodsApp Pods
Private
DNS
ILB
Put your app ops and deploy
config where your app devs can
reach it.
https://medium.com/cruise
@karlkfi
Thank you!
Your Feedback is Greatly Appreciated!
Complete the
session survey
in mobile app
1-5 star rating
system
Open field for
comments
Rate icon in
status bar

More Related Content

What's hot

Openstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-ServiceOpenstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-ServiceChhavi Agarwal
 
WSO2 Cloud and Platform as a Service Strategy
WSO2 Cloud and Platform as a Service StrategyWSO2 Cloud and Platform as a Service Strategy
WSO2 Cloud and Platform as a Service StrategyImesh Gunaratne
 
Containers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesContainers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesDmitry Lazarenko
 
Social Connections 14 - Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections AdminsSocial Connections 14 - Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections Adminspanagenda
 
Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos Miguel Zuniga
 
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDocker, Inc.
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersImesh Gunaratne
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architectureOpenStack Korea Community
 
Containers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratosContainers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratosWSO2
 
Deploying WSO2 Middleware on Mesos
Deploying WSO2 Middleware on MesosDeploying WSO2 Middleware on Mesos
Deploying WSO2 Middleware on MesosImesh Gunaratne
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersArun Gupta
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
Kubernetes on Top of Mesos on Top of DCOS
Kubernetes on Top of Mesos on Top of DCOSKubernetes on Top of Mesos on Top of DCOS
Kubernetes on Top of Mesos on Top of DCOSStefan Schimanski
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
Docker Online Meetup: Infrakit update and Q&A
Docker Online Meetup: Infrakit update and Q&ADocker Online Meetup: Infrakit update and Q&A
Docker Online Meetup: Infrakit update and Q&ADocker, Inc.
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Vishnu Kannan
 
Webinar container management in OpenStack
Webinar container management in OpenStackWebinar container management in OpenStack
Webinar container management in OpenStackCREATE-NET
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud AppsAdrian Otto
 
Mesos swam-kubernetes-vds-02062017
Mesos swam-kubernetes-vds-02062017Mesos swam-kubernetes-vds-02062017
Mesos swam-kubernetes-vds-02062017Christophe Furmaniak
 

What's hot (20)

Openstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-ServiceOpenstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-Service
 
WSO2 Cloud and Platform as a Service Strategy
WSO2 Cloud and Platform as a Service StrategyWSO2 Cloud and Platform as a Service Strategy
WSO2 Cloud and Platform as a Service Strategy
 
Containers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. KubernetesContainers orchestrators: Docker vs. Kubernetes
Containers orchestrators: Docker vs. Kubernetes
 
Social Connections 14 - Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections AdminsSocial Connections 14 - Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections Admins
 
Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos Platform as a Service with Kubernetes and Mesos
Platform as a Service with Kubernetes and Mesos
 
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
Containers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratosContainers in production with docker, coreos, kubernetes and apache stratos
Containers in production with docker, coreos, kubernetes and apache stratos
 
Deploying WSO2 Middleware on Mesos
Deploying WSO2 Middleware on MesosDeploying WSO2 Middleware on Mesos
Deploying WSO2 Middleware on Mesos
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Kubernetes on Top of Mesos on Top of DCOS
Kubernetes on Top of Mesos on Top of DCOSKubernetes on Top of Mesos on Top of DCOS
Kubernetes on Top of Mesos on Top of DCOS
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Docker Online Meetup: Infrakit update and Q&A
Docker Online Meetup: Infrakit update and Q&ADocker Online Meetup: Infrakit update and Q&A
Docker Online Meetup: Infrakit update and Q&A
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10Kubernetes deep dive - - Huawei 2015-10
Kubernetes deep dive - - Huawei 2015-10
 
Webinar container management in OpenStack
Webinar container management in OpenStackWebinar container management in OpenStack
Webinar container management in OpenStack
 
Docker for Multi-Cloud Apps
Docker for Multi-Cloud AppsDocker for Multi-Cloud Apps
Docker for Multi-Cloud Apps
 
Mesos swam-kubernetes-vds-02062017
Mesos swam-kubernetes-vds-02062017Mesos swam-kubernetes-vds-02062017
Mesos swam-kubernetes-vds-02062017
 

Similar to CI/CD Across Multiple Environments

Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demoOpsta
 
Introduction to Kubernetes and GKE
Introduction to Kubernetes and GKEIntroduction to Kubernetes and GKE
Introduction to Kubernetes and GKEOpsta
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxNebulaworks
 
Kubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleKubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleAmir Moghimi
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...NETWAYS
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on KubernetesOpsta
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burntAmir Moghimi
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmJessica Deen
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsSjuul Janssen
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in KubernetesDaniel Smith
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...Oleg Shalygin
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifestLibbySchulze
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformBob Killen
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 
Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Victor Iglesias
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesOlanga Ochieng'
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses Docker, Inc.
 
Kubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceKubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceOmer Barel
 

Similar to CI/CD Across Multiple Environments (20)

Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Introduction to Kubernetes and GKE
Introduction to Kubernetes and GKEIntroduction to Kubernetes and GKE
Introduction to Kubernetes and GKE
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
Kubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleKubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battle
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and Helm
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetes
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses
 
Kubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidenceKubernetes Overview - Deploy your app with confidence
Kubernetes Overview - Deploy your app with confidence
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

CI/CD Across Multiple Environments

  • 1. HYB205: CI/CD Across Multiple Environments Vic Iglesias, Cloud Solutions Architect, Google Cloud Benjamin Good, Solutions Architect, Google Cloud Karl Isenberg, Tech Lead Manager, Cruise
  • 2. Agenda Challenges of Multi-environment Infrastructure Building a Consistent Platform with Kubernetes Reliable Application Rollouts Building a Platform at Cruise Automation 1 2 3 4 Karl Isenberg Tech Lead Manager Ben Good Cloud Solutions Architect Vic Iglesias Cloud Solutions Architect
  • 8. Challenges with multiple environments ● Inconsistent deployment tooling ● Environment drift ● Managing access control ● Networking complexity ● Integrating your existing tools
  • 9. On Prem What is a platform? Staging Dev Prod Shared Tools Next Gen Prod Kubernetes Engine Compute Engine Staging Compute Engine
  • 10. What is a platform? Staging Dev Prod Shared Tools Next Gen Prod Kubernetes Engine Compute Engine Staging Compute Engine Platform
  • 11.
  • 13. Layers of your stack Platform Deployment tools, Service Management Infrastructure Networking, Compute, Storage Applications
  • 14. Layers of your stack Users Devs Infrastructure Platform App
  • 15. Benefits of Building with Kubernetes ● Substrate for building a consistent deployment platform ● Single API for workload management ● Managed service on all major cloud providers ● On-prem installations with GKE On-prem
  • 17. apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['myapp'] apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 apiVersion: v1 kind: ConfigMap metadata: name: game-config namespace: default data: game.properties: | enemies=aliens lives=3 ui.properties: | color.good=purple color.bad=yellow allow.textmode=true how.nice.to.look=fairlyNice kind: Endpoints apiVersion: v1 metadata: name: my-service subsets: - addresses: - ip: 1.2.3.4 ports: - port: 9376 apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress spec: rules: - http: paths: - path: /testpath backend: serviceName: test servicePort: 80
  • 19. What is a “Kubernetes Application”? Pods Config Volumes SecretsServices
  • 20. Pods Config Volumes Services What is a “Kubernetes Application”?
  • 21. YAML YAML YAML YAML What is a “Kubernetes Application”?
  • 22. Deployable ManifestEnvironment-specificBase How do we deploy to many environments? Staging Production > kubectl > kubectl
  • 23. Helm ● Use a templating engine to render your manifests by passing in variables called “values” ● Large community and lots of examples at https://hub.helm.sh ● Use loops and conditionals to “program” your end result. A double-edged sword. ● Familiar for folks coming from CM tools like Ansible and Chef
  • 24. apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: {{ .Values.image }} env: - name: LOG_LEVEL value: {{ .Values.logLevel }} image: busybox logLevel: debug apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox env: - name: LOG_LEVEL value: debug pod.yaml values.yaml output.yaml Helm
  • 25. helm template . Documentation: https://helm.sh/docs/helm/#helm-template Helm
  • 26. Kustomize Additional Features ● Apply common labels and annotations ● Add a prefix to all resource names ● Inject config map & secret contents from local files ● Built-in to kubectl as of 1.14 Add patches to Kubernetes YAML files leaving the original YAML untouched and usable as is.
  • 27. Kustomize apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['app'] apiVersion: v1 kind: Pod metadata: name: myapp-pod spec: containers: - name: myapp command: ['app', '--dev'] apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['app', '--dev'] base.yaml dev-patch.yaml output.yaml
  • 28. apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp image: busybox apiVersion: v1 kind: Pod metadata: name: myapp-pod spec: containers: - name: myapp image: busybox:dev apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp image: busybox:dev base.yaml dev.yaml output.yaml Kustomize
  • 29. dev/kustomization.yaml namespace: vic-dev commonLabels: owner: vic bases: - ../base/ patches: - patch.yaml configMapGenerator: - name: application-properties files: - properties ~/myapp ├── base/ └── deployment.yaml └── service.yaml └── kustomization.yaml ├── dev/ └── patch.yaml └── properties └── kustomization.yaml kubectl apply -k .
  • 30. kubectl apply -f . Documentation: https://kubectl.docs.kubernetes.io Kustomize
  • 31. kubectl apply -k . Documentation: https://kubectl.docs.kubernetes.io Kustomize
  • 32. App 1 Base App 2 Base Staging Patches Staging Manifests Prod Patches Prod Manifests Java App Base App 1 Patches App 2 Patches Environment ConfigApp Config Deployable Config Kustomize Example
  • 35. Now with Kubernetes Staging Dev Prod CI/CD Tools bash scripts Kubernetes Engine Kubernetes Engine
  • 36. Spinnaker to the Rescue Staging Dev Prod CI/CD Tools Kubernetes Engine Kubernetes Engine
  • 37. Kubernetes Awareness ● Pod level visibility ● Automated rollbacks ● Account == k8s cluster ● Resource annotations
  • 39. Pipeline Considerations ● Use the same pipeline in all environments ● Pipelines as code ● Automate canary analysis with Kayenta ● Deploy pipelines ● Leverage Istio for traffic management Start Deploy Frontend Canary Deploy Backend Canary Rollout Backend Rollout Frontend Validate Canary Success
  • 40. Single Cluster Roll-out Shared Tools Kubernetes Engine GKE us-central1 Kubernetes Engine Production Staging Deployment Strategies
  • 41. Challenges in a Multi-Cluster Env GKE us-central1 Kubernetes Engine GKE europe-west2 Kubernetes Engine GKE On-prem Kubernetes Engine Other Cloud Kubernetes 1.12.5 1.12.5 1.11.7 1.12.4 ● Variations in the clusters ● Configuration differences Kubernetes Shared Tools Kubernetes Engine
  • 42. Multi-Cluster Rollouts GKE us-central1 Kubernetes Engine GKE europe-west2 Kubernetes Engine GKE On-prem Kubernetes Engine Other Cloud Kubernetes 1.12.5 1.12.5 1.11.7 1.12.4 ● Leverage accounts aka “k8s clusters” in Spinnaker ○ Serial rollout of rollouts ○ Parallel rollout to each environment ● Canary on each cluster in each environment Kubernetes Kubernetes Engine
  • 43. Traffic Management GKE us-central1 Kubernetes Engine GKE europe-west2 Kubernetes Engine GKE On-prem Kubernetes Engine Other Cloud Kubernetes 1.12.5 1.12.5 1.11.7 1.12.4 ● Use traffic management tools for North/South traffic ● Use Istio to manage East/West traffic ● Canary at the cluster level Other Cloud Kubernetes 1.12.5 Cloudflare, Akamai, Fastly, others Kubernetes Engine Kubernetes Kubernetes
  • 44. Updating Clusters Shared Tools Kubernetes Engine GKE us-central1 Kubernetes Engine 1.12.4 GKE us-central1 Kubernetes Engine 1.12.5 ● Treat your pipelines like code ○ Keep them in source control ○ Deploy them like code ○ Declarative pipelines ● Google Cloud Storage plugin for Spinnaker and Jenkins artifacts ● In Spinnaker “accounts” are K8s clusters
  • 46. We’re building the world’s most advanced self-driving vehicles to safely connect people with the places, things, and experiences they care about. https://cruise-automation.github.io/webviz/worldview/https://getcruise.com/
  • 47. Multi-Cloud Infrastructure On Premises ● Office IT ● Data Ingest ● Network Hub GCP ● PaaS GKE ● Image Registry ● Continuous Deployment ● Data Lake ● Data Processing ● Data Science ● Machine Learning ● Simulation AWS ● PaaS AWS ● Source Control ● Continuous Integration @karlkfi
  • 48. GCP Environments @karlkfi Dev Staging Prod NetEng Team X PaaS Kubernetes Engine Shared Private Network Cloud SQL Kubernetes Engine Shared Private Network Cloud SQL Kubernetes Engine Shared Private Network Cloud SQL Projects Folders & Networks
  • 49. GKE Environments @karlkfi Pods Dev Staging Prod Team A Team B Team C Pods Pods Pods Pods Pods Pods Pods Pods Namespaces Clusters
  • 50. Security Challenges Login ● Identity Provider ● Single Sign-On ● Service Accounts ● Credential Rotation ● Bootstrapping Encryption ● Secret Management ● Secrets Injection ● Secrets Caching ● TLS Termination ● TLS End to end Access Control ● Groups ● Roles ● Role Binding ● User to Platform ● User to Service ● User through Service ● Service to Service @karlkfi
  • 51. In-Memory Volume DAYTONA Init Container App Container Kubernetes Pod Secrets Login Vault Integration (Internal) cruise/daytona@karlkfi Vault Login Kubernetes service accounts used for Vault authentication. Secrets Injection Init container side-loads secrets GCP Service Accounts Vault generates temporary credentials on-demand
  • 52. Vault Namespacing @karlkfi Group Permissions Path Team Admin admin secret/<prefix>/<namespace>/* Team Contractor list secret/<prefix>/<namespace>/* App Service Account list, get secret/<prefix>/<namespace>/<env>/<app>/*
  • 53. Deployment Challenges Images ● Image Building ● Container Registry ● Image Caching ● Image Versioning ● Image Promotion ● Pull Secrets App Ops ● Metrics Library ● Structured Logging ● DNS Config ● TLS Config Lifecycle ● Templating ● Cloud Dev Env ● Integration Test Env ● Load Test Env ● Approval Gates ● Blue/Green ● Deploy Targets ● Account Management @karlkfi
  • 54. Image Building apiVersion: build.knative.dev/v1alpha1 kind: Build metadata: name: example-build spec: serviceAccountName: build-auth-example source: git: url: https://github.com/example/build-example.git revision: master steps: - name: ubuntu-example image: ubuntu args: [“ubuntu-build-example”, “SECRETS-example.md”] steps: - image: gcr.io/example-builders/build-example args: [“echo”, “hello-example”, “build”] Build GCR Container Registry (OSS) https://github.com/knative/build Github Source Control Knative Build @karlkfi
  • 55. Spinnaker Account Management apiVersion: spinnaker.getcruise.com/v1alpha kind: SpinnakerAccount metadata: name: <project>-<cluster>-<namespace>-<role> namespace: <namespace> spec: provider: kubernetes credentials: type: kubeconfig vaultSecret: path: secret/spinnaker/kubeconfig-<account-name> address: https://vault.example.com:8200 kubernetesServiceAccount: name: spinnaker-<account-name> bindings: - type: Role role: edit roles: - name: <google-group> permissions: - write SpinnakerAccount Spinnaker Operator (Internal) cruise/spinnaker-operator App PodsApp PodsK8s Resources Spinnaker @karlkfi
  • 56. Networking Challenges DNS ● Public DNS (Private Zones) ● Private DNS (IP Masquerade) Ingress ● Private Ingress (ILB, Nginx) ● Public Ingress (GCLB) Egress ● Private Egress (Cloud Router) ● Public Egress (Cloud NAT, Network Tags) @karlkfi
  • 57. Private Ingress Controllers App PodsApp Pods Ingress annotation: kubernetes.io/ingress.class: nginx Ingress Controller (OSS) https://github.com/kubernetes-incubator/external-dns + (OSS) https://github.com/kubernetes/ingress-nginx + (OSS) https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing App Pods GCE Cloud Provider Private Cloud DNS Internal Load Balancer Kubernetes Engine @karlkfi External DNS (todo) Service type: LoadBalancer annotation: external-dns.alpha.kubernetes.io/hostname: nginx.example.com. Service type: ClusterIP Nginx Pods
  • 58. Operations Challenges Observability ● Metrics ● Logging ● Tracing ● Uptime Checks Availability ● Backups ● Descheduler ● Node Pool Management @karlkfi
  • 59. Runscope Controller apiVersion: extensions/v1beta1 kind: Ingress metadata: name: example-build annotations: kubernetes.io/ingress.class: nginx runscope.getcruise.com/bucket-name: paas-gke runscope.getcruise.com/enable-api-tests: true runscope.getcruise.com/parent-environment-id: <...> runscope.getcruise.com/path: / runscope.getcruise.com/schedule: 1m spec: rules: - host: demoapp.example.com http: {...} tls: ... Ingress (Internal) cruise/runscope-controller Runscope Controller Runscope Public SaaS @karlkfi App PodsApp PodsApp Pods Private DNS ILB
  • 60. Put your app ops and deploy config where your app devs can reach it. https://medium.com/cruise @karlkfi
  • 62. Your Feedback is Greatly Appreciated! Complete the session survey in mobile app 1-5 star rating system Open field for comments Rate icon in status bar