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
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
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
Spec-driven Development with AI
simas
PRO
0
2.3k
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
310
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
730
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
160
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
290
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
320
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
Featured
See All Featured
Abbi's Birthday
coloredviolet
4
11k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
370
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Skip the Path - Find Your Career Trail
mkilby
1
290
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Crafting Experiences
bethany
1
430
Designing for Timeless Needs
cassininazir
1
550
Google's AI Overviews - The New Search
badams
0
1.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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