Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Operating Rails in Kubernetes
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kir Shatrov
April 17, 2018
Programming
500
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
More Decks by Kir Shatrov
See All by Kir Shatrov
Running Jobs at Scale
kirs
1
240
RailsClub 2016
kirs
2
330
Performance regressions in Ruby on Rails Core
kirs
0
230
Building a toolkit to detect performance regressions in Ruby on Rails core
kirs
3
6.1k
Развертывание веб-приложений и фреймворк Capistrano
kirs
1
300
Capistrano 3
kirs
4
3k
Other Decks in Programming
See All in Programming
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
200
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
290
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
13
2.3k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
450
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
140
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
740
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
1.5k
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
2
440
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.3k
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
120
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
990
どこまでゆるくて許されるのか
tk3fftk
0
340
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
270
Code Reviewing Like a Champion
maltzj
528
40k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Practical Orchestrator
shlominoach
191
11k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
450
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Building Adaptive Systems
keathley
44
3.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Context Engineering - Making Every Token Count
addyosmani
9
1k
Transcript
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