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
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
Lessons from Spec-Driven Development
simas
PRO
0
190
RTSPクライアントを自作してみた話
simotin13
0
600
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Claspは野良GASの夢をみるか
takter00
0
190
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.8k
Featured
See All Featured
Believing is Seeing
oripsolob
1
140
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Paper Plane
katiecoart
PRO
1
51k
The SEO Collaboration Effect
kristinabergwall1
1
480
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Design in an AI World
tapps
1
240
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