SlideShare a Scribd company logo
From Code to Kubernetes
About Us
Art Richards
CTO - truckin.io
About Me
Daniel Oliveira
Devops Engineer
danieloliv79
danieloliveira079
daniel@truckin.io
Agenda
● Scenario and Architecture
● Technologies
● Challenges
● Results
● Foundations
● Infrastructure as Code
● Configuration Management
● Building and Deployments
● Application Debugging using Weavescope
● Demo - From code to Kubernetes
● Future
● QA
git push
Scenario and Architecture
Distributed
Teams
Early stages products
Greenfield projects
One man's operations team
Priorities vs Resources
Deployments Lifecycle
10+
Non-production deployments per day
8 Projects
Frontend, Backend API, Android
Development, Test, Staging, Demo and Production
Weekly
Production deployments
(mobile, frontend and backend)
Technologies
Applications
Infrastructure
Challenges
● CI/CD Pipeline
● Infrastructure as Code
● Isolated Environments (Dev, Test, Demo, Staging, Production)
● Unified orchestrator for builds and deployments processes
● Integrations
● Easy application debugging
● Automation
Results
From Code to Kubernetes
Foundations
IaaS
Cloud Provider
Resources
Network, Instances, IAM, Disk, Registry,
Kubernetes Cluster
Software, Packages and Configs
Salt Master, Salt Minion, Docker, Postgresql
and Elasticsearch
ProvisioningOrder
Desired State
Minions, API, Reactor, Integrations
Let's talk about
provisioning
Google Cloud Platform
https://cloud.google.com
Infrastructure as Code
IaaS
Cloud Provider
Resources
Network, Instances, IAM, Disk, Registry,
Kubernetes Cluster
Software, Packages and Configs
Salt Master, Salt Minion, Docker, Postgresql
and Elasticsearch
ProvisioningOrder
Desired State
Minions, API, Reactor, Integrations
Terraform by Hashicorp
https://www.terraform.io
Basic network resources configuration file
variable
● Command line tool (apply, plan, destroy)
● Multiples Providers
● Config based resources
● Usage of Variables
● Dependencies Graph
● Execution Plan
● Resource Creation in Parallel
● Multiples Provisioners
● Detailed Output
dependency
Terraform output
Configure 'Em All
Network, Firewall, Subnetworks, Instances,
Buckets, Disks, Kubernetes Cluster, Services
Accounts and IAM
Configuration Management
IaaS
Cloud Provider
Resources
Network, Instances, IAM, Disk, Registry,
Kubernetes Cluster
Software, Packages and Configs
Salt Master, Salt Minion, Docker, Postgresql
and Elasticsearch
ProvisioningOrder
Desired State
Minions, API, Reactor, Integrations
https://saltstack.com
SaltStack Open Source
https://docs.saltstack.com/en/latest/
Master
MinionOperator
Minion
Postgresql
Minion
Builder
MinionElastic
G@roles:builder and G@environment:test
Selectors
Master
Minion
Builder
Executed imperatively via command line or reactively via Salt Reactor.
salt cli selector command
Salt Pillars
"Offer global values that can be distributed to minions"
From Code to Kubernetes
From Code to Kubernetes
Salt States
"The SLS is a representation of the state in which a system should be in, and is
set up to contain this data in a simple format."
state ID
modulename.command
arguments
From Code to Kubernetes
Using defined pillars within states
● Introducing the map.jinja file
● Passing pillars values when compiling states
From Code to Kubernetes
Output to MinionParse + Merge
SaltStack Compilation Process
+ =Pillars
dictionaries
States
jinja2
Low Data
Parse
Gitfs
"The gitfs backend allows Salt to serve files from git repositories."
push 15s
Master
Gitfs
Putting all together
Desired State
● 8 VMs
○ Salt Master
○ Operator
○ Builder
○ Postgresql
○ Elasticsearch
○ 3 Kubernetes nodes
● 2 Persistent Data Disks: 500GB attached to PG and ELS
● 1 Kubernetes Cluster
● Network
○ Required Firewall Rules
○ 2 Subnets
● 2 IAM/Service Accounts: Pull/Push Docker Registry
Complete Cloud Provision Flow
Network
Firewall, Subnets, Static IPs,
...
Instances
Salt Master, Salt Minion,
Postgresql, Elasticsearch, Builder,
Operator
Kubernetes
Cluster
Nodes, Firewall Rules,
K8S Master and Workers
● $ terraform apply
Salt states are applied just after an
instance is created, based on its
"role" specified in the grains config
Core resources are
created during this
phase
Creates the initial
cluster state based on
the number of nodes
specified
From Code to Kubernetes
Work is done!
Google Cloud Admin Panel
From Code to Kubernetes
From Code to Kubernetes
http://kubernetes.io/
Kubernetes Dashboard
From Code to Kubernetes
From Code to Kubernetes
Show me the flow!
Salt API
https
https
ssh
Builder
Operator
runners
reactor
Event Hub
https
Building and Deploying
Kubernetes Objects
"Kubernetes Objects are persistent entities in the Kubernetes system.
Kubernetes uses these entities to represent the state of your cluster."
Kubernetes objects
● Abstracts: deployments, services, replica sets, ingress, ...
● Generated on the fly by Salt using templates
● Final .yaml file compiled including pillars and arguments
● $ kubectl apply -f mysite-development.yaml
● Garbage collector
deploymentV1.yaml
Builder
1 2
3
4
5
6
7
8
Code to Image Flow
Registry
Reactor
push
state.apply
notify
notify
notify
push notify
Operator
Kubernetes Deployment Flow
Registry
Reactor
(Post Build)
Pullkubectlstate.apply1
2 4
notify
3
5
notify
6
https://operable.io/
ChatOps
Build
Build
Rollback
Application Debugging
https://www.weave.works/products/weave-scope/
From Code to Kubernetes
From Code to Kubernetes
From Code to Kubernetes
From Code to Kubernetes
Demo
Live from code to Kubernetes!
Future
What must be improved?
● Error Handling
● Credentials Management
● Logging and Monitoring
● On Demand Environments
● Terraform File Refactoring
● Implement Production
● Rollout Deployments
● Postgresql Cluster
● Elasticsearch Cluster
● ...
Wrap up
What I've seen so far?
● Automated provision
● Infrastructure as Code
● Event driven environment
● Fast delivery cycle
● Isolated environments
● Application Debugging
● ChatOps
Final Words
Doesn't have to be perfect from day 0!
Pick up the right people
"When you get into one of these groups,
there's only a couple of ways you can
get out: one is death, the other is mental
institutions..." - Devops Engineer testimonial
Links
Saltstack - https://saltstack.com
Salt States - https://docs.saltstack.com/en/latest/topics/tutorials/starting_states.html
Salt Pillars - https://docs.saltstack.com/en/latest/topics/pillar/
Terraform - https://www.terraform.io/intro/index.html
Weavescope - https://www.weave.works/products/weave-scope
Kubernetesio - http://kubernetes.io
Jenkins CI - https://jenkins.io
Docker - https://docker.com
Google Cloud Platform - cloud.google.com
GCP Calculator - https://cloud.google.com/products/calculator/
Danke Schön!
Questions?

More Related Content

What's hot (20)

PDF
Implementing an Automated Staging Environment
Daniel Oliveira Filho
 
PDF
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Oleg Chunikhin
 
PDF
Orchestrating Microservices with Kubernetes
Weaveworks
 
PDF
Kubernetes Monitoring & Best Practices
Ajeet Singh Raina
 
PDF
Deploying WSO2 Middleware on Kubernetes
Imesh Gunaratne
 
PDF
KubeCon EU 2016: Heroku to Kubernetes
KubeAcademy
 
PDF
How to integrate Kubernetes in OpenStack: You need to know these project
inwin stack
 
PPTX
Introduction to Kubernetes
rajdeep
 
PDF
Running and Managing Kubernetes on OpenStack
Victor Palma
 
PDF
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
PDF
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Wojciech Barczyński
 
PDF
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeAcademy
 
PDF
Kubernetes - Starting with 1.2
William Stewart
 
PPTX
Why kubernetes matters
Platform9
 
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
PDF
Kubernetes Architecture and Introduction
Stefan Schimanski
 
PPTX
Introducing LinuxKit
Docker, Inc.
 
PDF
Running Production-Grade Kubernetes on AWS
DoiT International
 
PDF
Managing kubernetes deployment with operators
Cloud Technology Experts
 
PDF
Kubernetes extensibility
Docker, Inc.
 
Implementing an Automated Staging Environment
Daniel Oliveira Filho
 
Setting up CI/CD pipeline with Kubernetes and Kublr step-by-step
Oleg Chunikhin
 
Orchestrating Microservices with Kubernetes
Weaveworks
 
Kubernetes Monitoring & Best Practices
Ajeet Singh Raina
 
Deploying WSO2 Middleware on Kubernetes
Imesh Gunaratne
 
KubeCon EU 2016: Heroku to Kubernetes
KubeAcademy
 
How to integrate Kubernetes in OpenStack: You need to know these project
inwin stack
 
Introduction to Kubernetes
rajdeep
 
Running and Managing Kubernetes on OpenStack
Victor Palma
 
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Wojciech Barczyński
 
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeAcademy
 
Kubernetes - Starting with 1.2
William Stewart
 
Why kubernetes matters
Platform9
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Kubernetes Architecture and Introduction
Stefan Schimanski
 
Introducing LinuxKit
Docker, Inc.
 
Running Production-Grade Kubernetes on AWS
DoiT International
 
Managing kubernetes deployment with operators
Cloud Technology Experts
 
Kubernetes extensibility
Docker, Inc.
 

Viewers also liked (20)

PDF
Understanding Kubernetes
Tu Pham
 
PPTX
Scalling development teams using Docker
Daniel Oliveira Filho
 
PPTX
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
PDF
An Introduction to Kubernetes
Imesh Gunaratne
 
PDF
Kubernets Helm - Okay so my cluster's up, how do I manage all the sh*t to run...
Mike Splain
 
PDF
"On-premises" FaaS on Kubernetes
Alex Casalboni
 
PDF
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
PDF
Lessons Learned: Using Concourse In Production
Shingo Omura
 
PPTX
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Oleg Shalygin
 
PDF
Extending DevOps to Big Data Applications with Kubernetes
Nicola Ferraro
 
PDF
Oxalide Workshop #5 - Docker avancé & Kubernetes
Ludovic Piot
 
PPTX
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
PPTX
Docker and kubernetes
Dongwon Kim
 
PDF
Kubernetes on aws
Yousun Jeong
 
PPTX
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
PPTX
Stateful set in kubernetes implementation & usecases
Krishna-Kumar
 
PDF
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Arjen Wassink
 
PDF
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
PDF
Kubernetes Networking
CJ Cullen
 
PDF
Extend and build on Kubernetes
Stefan Schimanski
 
Understanding Kubernetes
Tu Pham
 
Scalling development teams using Docker
Daniel Oliveira Filho
 
Monitoring, Logging and Tracing on Kubernetes
Martin Etmajer
 
An Introduction to Kubernetes
Imesh Gunaratne
 
Kubernets Helm - Okay so my cluster's up, how do I manage all the sh*t to run...
Mike Splain
 
"On-premises" FaaS on Kubernetes
Alex Casalboni
 
Kubernetes in 30 minutes (2017/03/10)
lestrrat
 
Lessons Learned: Using Concourse In Production
Shingo Omura
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Oleg Shalygin
 
Extending DevOps to Big Data Applications with Kubernetes
Nicola Ferraro
 
Oxalide Workshop #5 - Docker avancé & Kubernetes
Ludovic Piot
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
Docker and kubernetes
Dongwon Kim
 
Kubernetes on aws
Yousun Jeong
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
Apigee | Google Cloud
 
Stateful set in kubernetes implementation & usecases
Krishna-Kumar
 
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Arjen Wassink
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Arjen Wassink
 
Kubernetes Networking
CJ Cullen
 
Extend and build on Kubernetes
Stefan Schimanski
 
Ad

Similar to From Code to Kubernetes (20)

PDF
A DevOps guide to Kubernetes
Paul Czarkowski
 
PDF
Kubernetes Intro
Antonio Ojea Garcia
 
PPTX
kubernetesforbeginners.pptx
BaskarKannanK
 
PDF
KubeCon 2019 Recap (Parts 1-3)
Ford Prior
 
PPTX
Iac d.damyanov 4.pptx
Dimitar Damyanov
 
PDF
kubernetes.pdf
crezzcrezz
 
PPTX
Kubernetes 101
Stanislav Pogrebnyak
 
PDF
Devops learning path
sunil173422
 
PPTX
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
PPTX
Container Conf 2017: Rancher Kubernetes
Vishal Biyani
 
PPTX
Kubernetes
Lhouceine OUHAMZA
 
PPTX
Kubernetes Intro @HaufeDev
Haufe-Lexware GmbH & Co KG
 
PPTX
Kubernetes Introduction
Martin Danielsson
 
PDF
Kubernetes From Scratch .pdf
ssuser9b44c7
 
PPTX
Kubernetes Internals
Shimi Bandiel
 
PDF
Best practices in Deploying SUSE CaaS Platform v3
Juan Herrera Utande
 
PDF
Kubernetes
Martin Podval
 
PDF
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
PDF
Effective Building your Platform with Kubernetes == Keep it Simple
Wojciech Barczyński
 
A DevOps guide to Kubernetes
Paul Czarkowski
 
Kubernetes Intro
Antonio Ojea Garcia
 
kubernetesforbeginners.pptx
BaskarKannanK
 
KubeCon 2019 Recap (Parts 1-3)
Ford Prior
 
Iac d.damyanov 4.pptx
Dimitar Damyanov
 
kubernetes.pdf
crezzcrezz
 
Kubernetes 101
Stanislav Pogrebnyak
 
Devops learning path
sunil173422
 
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Container Conf 2017: Rancher Kubernetes
Vishal Biyani
 
Kubernetes
Lhouceine OUHAMZA
 
Kubernetes Intro @HaufeDev
Haufe-Lexware GmbH & Co KG
 
Kubernetes Introduction
Martin Danielsson
 
Kubernetes From Scratch .pdf
ssuser9b44c7
 
Kubernetes Internals
Shimi Bandiel
 
Best practices in Deploying SUSE CaaS Platform v3
Juan Herrera Utande
 
Kubernetes
Martin Podval
 
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Effective Building your Platform with Kubernetes == Keep it Simple
Wojciech Barczyński
 
Ad

Recently uploaded (20)

PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 

From Code to Kubernetes