Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Operating Rails in Kubernetes
Search
Kir Shatrov
April 17, 2018
Programming
520
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Operating Rails in Kubernetes
My talk at RailsConf 2018.
Kir Shatrov
April 17, 2018
Transcript
84 slides
Operating Rails in Kubernetes Kir Shatrov
1. Intro to Kubernetes 2. Rails in Kubernetes 3. Shopify’s
migration story
Containers are awesome! *
Containerizing Rails: Techniques, Pitfalls, & Best Practices by Daniel Azuma
Tomorrow 3:30pm
None
None
app01 app02 app03
app01 app02 app03
None
None
None
Smart container scheduling for better utilization
Smart container scheduling for better utilization
Smart container scheduling for better utilization
Kubernetes basics: Pod
Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
None
None
web jobs Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
web jobs Kubernetes basics: Deployment
Managing Resources
YAML
None
YAML apply when changed
YAML store in repository
None
Deploy process controlling servers
Deploy process sequentially applying commands by SSH
Capistrano sequentially applying commands by SSH
None
kubectl apply --file web.yml
kubectl apply --file jobs.yml
Controlling servers vs describing configuration
Controlling servers Describing configuration running commands remotely comparing output with
expected not prone to failures push configuration poll for it to apply abstracts from physical machines self-healing
Controlling servers Describing configuration running commands remotely comparing output with
expected not prone to failures push configuration poll for it to apply abstracts from physical machines self-healing
None
It's easy to run a container, but not Rails
The Twelve-Factor app
None
Disposability and termination
Web requests
Background Jobs
Long-running jobs
None
Abort and re-enqueue
Concurrency scale out via the process model
None
Assets
rake assets:precompile
Assets Shipped in container
Database Migrations
Migrations as a part of deploy
Migrations as a part of deploy
Asynchronous Migrations
1. Change code and add a migration 1. Add a
migration 2. Change code
1. Change code and add a migration 1. Add a
migration 2. Change code
Asynchronous Migrations
None
None
Secret Management
Secrets in the environment
Secrets in a container
Secrets in a container
Rails 5.2 Credentials
None
ENV[‘RAILS_MASTER_KEY’]
The Twelve Factors Let workers terminate gracefully Migrations as a
part of deploy can be fragile Rails 5.2 Credentials + Kubernetes Secrets
Kubernetes at Shopify
None
Resource specs in YAML
None
None
None
kubectl apply --file web.yml
None
None
Let robots help humans to migrate apps Developers don’t have
to write YAML configs kubernetes-deploy brings visibility into rollout progress
None
Kubernetes helps organizations to efficiently schedule workload and save resources
It’s not magic, it only schedules and runs your containers Things you need to know about Rails
None
None
Thanks! @kirs @kirshatrov
More Decks by Kir Shatrov
See All by Kir Shatrov
Running Jobs at Scale
kirs
1
250
RailsClub 2016
kirs
2
340
Performance regressions in Ruby on Rails Core
kirs
0
250
Building a toolkit to detect performance regressions in Ruby on Rails core
kirs
3
6.3k
Развертывание веб-приложений и фреймворк Capistrano
kirs
1
310
Capistrano 3
kirs
4
3.1k
Other Decks in Programming
See All in Programming
はじめてのPLATEAU
nokonoko1203
1
660
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
370
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
330
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
オーケストレーション記述言語 Katari
yukikurage
0
270
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
310
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
370
小さなアプリを作って公開するまで
onozaty
0
200
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Music & Morning Musume
bryan
48
7.5k
GitHub's CSS Performance
jonrohan
1033
470k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
Writing Fast Ruby
sferik
630
63k
Leo the Paperboy
mayatellez
11
2.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
Tell your own story through comics
letsgokoyo
1
1.1k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
Stop Working from a Prison Cell
hatefulcrawdad
274
21k