Likbez ïŒ Alexaã«ãããšããããŸã§ã®ãšããRedditã¯äžçã®ããã20ãµã€ãïŒç±³åœã§ã¯6äœïŒã«å ¥ã£ãŠããŸãã ãã®ã¢ã¡ãªã«åºèº«ã®ãªã³ã©ã€ã³ã³ãã¥ããã£ã¯ã4å人以äžã®ã¢ã¯ãã£ããªïŒ1ãæ以å ã®ïŒãŠãŒã¶ãŒã1200äžã®åºçç©ãããã³1æ¥ããã20å祚ã§æ§æãããŠããŸãã
Redditãšã³ãžãã¢ãæšå¹Ž12æã«KubeCon 2018ã§Kubernetesã«æ¥ãçç±ãšæ¹æ³ã«ã€ããŠïŒ ãã¬ãŒã³ããŒã·ã§ã³ + ãã㪠ïŒãããžã§ã¯ããšã³ãžãã¢ãªã³ã°ã®ãªãªãŒã¹ãšã³ãžãã¢ãªã³ã°ã°ã«ãŒããã€ã³ãã©ã¹ãã©ã¯ãã£éšéã®é·ã§ããGreg Taylor
ãªãKubernetesã«æ¥ãã®ã§ããïŒ
2016幎ã®åãã ã¢ããªã·ãã¯ã¢ããªã±ãŒã·ã§ã³ãšããŠå®è£ ããããµãŒãã¹ã«ã¯ãçŽ20人ã®ãšã³ãžãã¢ã3ã€ã®ããŒã ã圢æãããã®ãã¡ã®1人ã¯ã¹ããŒãªãŒã®ããŒããŒã§ããã€ã³ãã©ã¹ãã©ã¯ãã£ããŒã ã§ããã ããããä»å¹Žã¯å€§ããªå€åããããããŸãããä»å¹Žã®çµãããŸã§ã«ã60人以äžã®ãšã³ãžãã¢ãäŒç€Ÿã§åããŠããŸããïŒãããŠ2018幎ã®çµãããŸã§ã«ã圌ãã®æ°ã¯200人ã«å¢å ããŸãããã€ãŸããããã3幎ã§ãã¹ã¿ããã®10åã®å¢å ã芳å¯ãããŸãã ïŒã
ãã®ãããªæ¥éãªæé·çã¯ãã¢ããªã·ãã¯ã¢ããªã±ãŒã·ã§ã³ã¢ãŒããã¯ãã£ã®ç¡é¢ä¿æ§ïŒéå¹çæ§ïŒãã¢ãžã§ã³ãã«çœ®ããŠããŸãããªããªããããŸããŸãªã³ã³ããŒãã³ãã«ïŒç°ãªãããŒã ã«ãã£ãŠïŒå€æ°ã®å€æŽãå ããããšãéåžžã«å°é£ã«ãªã£ãããã§ãã åé¡ã解決ããããã«éãŸã£ãŠå€ãã®ãªãã·ã§ã³ãæ€èšãããšã³ãžãã¢ã¯ã ãµãŒãã¹æåã¢ãŒããã¯ãã£ïŒSOAïŒã®éãéžã³ãŸããã
倧ããªã¢ããªã¹ã®ä»£ããã«ãµãŒãã¹ã¢ãŒããã¯ãã£ã«åãæ¿ãããšãRedditã¯æ°ããåé¡ã«ã¶ã€ãããŸããã ã€ã³ãã©ã¹ãã©ã¯ãã£ããŒã 㯠ããµãŒãã¹ã®åæåäžãç¶ç¶æäœäžããããã°äžããã³ããã©ãŒãã³ã¹åé¡ã®è§£æ±ºäžãªã©ãããŸããŸãªæ®µéã§éåžžã«äŸåããŠããããšãå€æããéçºè ã®æŽ»åã®ããã«ããã¯ã«ãªããŸãã ã åé¡ã®è¿ éãªè§£æ±ºçãšããŠãäŒç€Ÿã¯ãã€ã³ãã©ã¹ãã©ã¯ãã£æåããšåŒã°ããèªçµŠèªè¶³ã®ããŒã ã圢æããŸããããã®ãããªããŒã ã®åå è ã¯ãã€ã³ãã©ã¹ãã©ã¯ãã£ã®éçšåéã§å¿ èŠãªã¹ãã«ãåããŠãããããã€ã³ãã©ã¹ãã©ã¯ãã£ããŒã ã®ã¢ã¯ã·ã§ã³ãåŸ ããã«å€ãã®å°é£ãå æããããšãã§ããŸããã
ããããããã¯ãŸã äžæçãªè§£æ±ºçã§ãããå®è·µã«ããã誰ãããµãŒãã¹ã®ããã«ã¹ã¿ãã¯å šäœãæäœãããããã§ã¯ãªãããšã瀺ãããŸããã
ãã®ç¶æ³ã¯ã©ã®ããã«è§£æ±ºãããŸãããïŒ çµç¹ã¯ã ãµãŒãã¹ææè ã®æŠå¿µãå°å ¥ããŸããã ãµãŒãã¹ææè 㯠ããµãŒãã¹ãæåããæåŸãŸã§éçºãããµãŒãã¹ãæ©æã«é »ç¹ã«å±éãããµãŒãã¹ãéçšã§ããŸãïŒå¯çšæ§ãšããã©ãŒãã³ã¹ã®åé¡ãå«ãïŒã ãããããããéæããæ¹æ³ã¯ïŒ
éã®æã¡æã®ãªãã¹ãã«ãæã€ãšã³ãžãã¢ã®ããŒã ããç¥èã®ãªãå€ãã®ã¬ã³ã¬ã®ãµãŒãã¹ãçµã¿åãããããšãæåŸ ãã代ããã«ãæå°éã®ãã¯ãããžãŒã«åœ±é¿ãäžããããµãŒãã¹ãçç£ã«ããããããã®ç¶¿å¯ãªäºåå®çŸ©ããããã¹ãæäŸããå¿ èŠããããŸãã ããã«ããããšã³ãžãã¢ãå€ãã®æ°ããæè¡ãããŒã«ãåŠã¶å¿ èŠããªããªããŸãã
ããã®ã¢ã€ãã¢ãå®è·µããããã«ã¯ãç¥èãããã»ã¹ããã¹ããã©ã¯ãã£ã¹ãªã©ãããã¢ã¯ã»ã¹ãããã圢åŒã«ãè©°ã蟌ããå¿ èŠããããŸãããã
InfreRedd-Redditã®Kubernetes
ããããKubernetesãããŒã¹ã«ããRedditã®å éšã€ã³ãã©ã¹ãã©ã¯ãã£è£œåã§ããInfreReddã®ç»å Žã§ãã
å®çŸ©ã§æå®ããããµãŒãã¹ææè ã®3ã€ã®ããŒãºã¯ã©ã®ããã«æºããããŸãããïŒ
1.éçº
çµç¹ã§ã®éçºã®æšæºã¯ãç¹å®ã®èšèªãŸãã¯ãã¬ãŒã ã¯ãŒã¯ã®éžæã瀺ããã®ã§ã¯ãªãã察å¿ãããµãŒãã¹ã®äžè¬çãªã圢åŒããèšå®ããŸãã æšæºâããã°ã©ãã³ã°èšèªã«äŸåããªããµãŒãã¹ä»æ§ âã«ã¯ãRPCãããã³ã«ã®å®çŸ©ãç§å¯ã®æäœãã¡ããªãã¯ã®è¿åŽããã¬ãŒãµããªãã£ãããã³ãã°çºè¡ã®åœ¢åŒãå«ãŸããŸãã Pythonã§ã®ãã®ãããªä»æ§ã®å®è£ äŸã¯ã ããŒã¹ãã¬ãŒããããžã§ã¯ãã§èŠã€ããããšãã§ããŸãããå®éã®äœ¿çšã«åœ¹ç«ã€ãšã¯æãããŸããããã€ã³ã¹ãã¬ãŒã·ã§ã³ã«ãªãå¯èœæ§ããããŸãã
ããã«ãæ°ãããµãŒãã¹ãäœæããéã®ã¯ã€ãã¯ã¹ã¿ãŒãã®ããã«ãããŸããŸãªèšèªïŒPythonãGoãNodeïŒã®ã³ãŒãã¹ã¿ããDockerfileãCIã®æ§æããã«ã ãã£ãŒããªã©ã®ãããªã¢ã«ãäœæãããŸããã
ããŒã«ã«éçºãæ¯æŽããããã«ãRedditãšã³ãžãã¢ã®éžæã¯Googleã®è£œåSkaffoldã«å§ããããŸãã ãããã¯ãéçºè ã«ãªãŒãã¹ã«ãŒãµã€ã¯ã«ç·šéâåæ§ç¯âæŽæ°ãæäŸããŸãã
- Kubernetesã®è©³çŽ°ãªç¥èã¯å¿ èŠãããŸããã
- å¯èœãªéãçç£ã«è¿ãã
- æšæºã®ãã£ãŒã/ç»åã䜿çšã§ããŸãã
- ããã³-以å䜿çšãããŠããMinikubeãšã¯ç°ãªããSkaffoldã§ã®äœæ¥ã«ã¯ ã皌åäžã®ã©ãããããããã®èšå€§ãªãªãœãŒã¹ã¯å¿ èŠãããŸãã ïŒããŒã«ã¢ãŠãã¯ãªã¢ãŒãã¯ã©ã¹ã¿ãŒã«å¯ŸããŠè¡ãããããïŒã
2.ãããã€ãã
Redditã¯ç¶ç¶çé ä¿¡ãã©ãããã©ãŒã Droneã䜿çšããŠãã¹ããå®è¡ããã¢ãŒãã£ãã¡ã¯ãïŒéåžžã¯Dockerã€ã¡ãŒãžïŒãæ§ç¯ããŸãã
Kubernetesã¯ããšããšDroneã®Helmãã©ã°ã€ã³ãå±éã«äœ¿çšããŠããŸãããããšã³ãžãã¢ã¯ããã«ãäœæãŸãã¯æŽæ°ããããªããžã§ã¯ãã®ç¶æ ãããããç解ãããã·ã¹ãã ãå¿ èŠã§ãããå±éããã»ã¹ã®ãããªãèªååã«ã€ãªãããããHelmã¯ããã«æºè¶³ããŠããªããšããçµè«ã«éããŸãã䜿çšããããŒã«ã«ã¢ããŒã«ããé害ãããã©ãŒãã³ã¹ã®åé¡ãçºçããå Žåã«ããŒã«ããã¯ãäžæåæ¢ã§ãããœãªã¥ãŒã·ã§ã³ã®å¿ èŠæ§ã
ãã®çµæã Spinnakerã¯Kubernetesã§ã®å±éã調æŽããããã«éžã°ããŸããã 圌ã®ããã«ããã³ãã¬ãŒãã¯å žåçãªãã€ãã©ã€ã³çšã«äœæãããŸããïŒJsonnetäžïŒã 次ã«ãHelmãã£ãŒããçæãããŸããããã¯ã Spinnaker ã®åãçµã¿ã«ãã Kubernetesã«æ¢ã«å±éãããŠããŸãã ãŠãŒã¶ãŒã¯ãå±éã®é²è¡ç¶æ³ã«é¢ããæ å ±ãåãåããåé¡ãçºçããå Žåã®èšºæã«åœ¹ç«ã¡ãŸãã ã¹ããŒãžã³ã°/ãããã¯ã·ã§ã³ã§ã®äžè¬çãªå±éããã»ã¹ã¯ãéåžžã«äžè¬çãªæ¹æ³ã§ãã
3.æäœ
ãŸãããµãŒãã¹ææè ãšã€ã³ãã©ã¹ãã©ã¯ãã£ããŒã ã®çŸ©åã¯ã©ã®ããã«å ±æãããŸããïŒ
- ãµãŒãã¹ææè ïŒKubernetesã®åºæ¬ãç解ãã ãµãŒãã¹ãå±éããŠéçšããŸãã
- ã€ã³ãã©ã¹ãã©ã¯ãã£ããŒã ïŒKubernetesã¯ã©ã¹ã¿ãŒã®æäœæ§ïŒããŒã«ã¢ãŠãããµããŒããã¹ã±ãŒãªã³ã°ïŒãç¶æããå¿ èŠãªãã¹ãŠã®ãªãœãŒã¹ãæäŸããä¿¡é Œæ§ãé«ãçç£çãªãã©ãŒã«ããã¬ã©ã³ããµãŒãã¹ã®èšèšã«ã€ããŠçµç¹ã®ãšã³ãžãã¢ã«ã¢ããã€ã¹ããŸãïŒç¹ã«ããã¬ãŒãã³ã°ã»ãã·ã§ã³ãå®æçã«éå¬ããããã®èšé²ãé åžãããŸãïŒäŒç€Ÿå šäœïŒã
ãµãŒãã¹ææè ã®æš©å©ã¯å¶éãããŠããŸãã ãã ããïŒåé¡ã蚺æããããã«ïŒæ¬çªç°å¢ã«ã¢ã¯ã»ã¹ããããã«ãããŒã ã¹ããŒã¹ãžã®å®å šãªæš©éãäžããäžæããŒã¯ã³ãïŒç¹å¥ãªã³ã³ãœãŒã«ãŠãŒãã£ãªãã£ãä»ããŠïŒèŠæ±ããããšãã§ããŸãã
åäœã®å¥ã®éèŠãªãã€ã³ãã¯ãããŸããŸãªãœãŒã¹ããçããå¯èœæ§ã®ããæœåšçãªæå·ã®æå°åã§ãã Redditãããã«å¯ŸããŠè¡ãããšã¯æ¬¡ã®ãšããã§ãã
æäœã«æºãããšã³ãžãã¢ã®ç掻ã楜ã«ããããã«ã次ã®ããšãå«ãŸããŸãã
- Wavefront-ã¡ããªãã¯çšã
- PagerDuty-ã¢ã©ãŒãçšã
- Zipkin-ãã¬ãŒã¹çšã
- Sentry-äŸå€ãšãšã©ãŒã远跡ããŸãã
- éäžãã°ã·ã¹ãã ã
Redditã®Kubernetesã¹ããŒã¿ã¹
æšå¹Ž12æã®æç¹ã§ã®Kubernetesã€ã³ãã©ã¹ãã©ã¯ãã£ã«é¢ããäžè¬çãªçµ±èšã¯æ¬¡ã®ãšããã§ãã
- 7åã®ã¯ã©ã¹ã¿ãŒïŒ3ã6åã®æ°ããã¯ã©ã¹ã¿ãŒã¯ãä»åŸæ°ãæ以å ã«è¿œå ãããäºå®ã§ããïŒã
- ãã¹ãŠã®ãšã³ãžãã¢ãªã³ã°ããŒã ã®3åã®1ããååãKubernetesãšå¯Ÿè©±ããŸãã
- çŽ20ã®RedditãµãŒãã¹ãK8ã§éçšãããŠããŸãã
- å¶æ¥æ¥ã«ããããã®ãµãŒãã¹ã®K8ãžã®10ã20ã®å±éãè¡ãããŸãã
çµç¹å šäœã§ã®Kubernetesã§ã®InfreReddã®å¯çšæ§ã¯2019幎ã®ç¬¬1ååæã«èšç»ãããŠãããããKubernetesãæäŸããéçšç°å¢ã§ã®æ°ãããµãŒãã¹ã®å±éãæ瀺ãããŸããã ïŒåœæãããã¯4ã€ã®æ°ãããµãŒãã¹ã®ãã¡çŽ3ã€ã§çºçããŠããŸãããïŒ
èšäºã®åé ã§è¿°ã¹ãããã«ããã®ãã€ã«ã¹ããŒã³ã¯å é±æåããŸããã
ãµã€ã¯ã«ããã®ä»ã®èšäº
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã1ïŒ eBayã®4,200ã®å²çè£ãšTessMaster ã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã2ïŒ ConcurãšSAP ãã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã3ïŒ GitHub ãã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã4ïŒ SoundCloudïŒèè PrometheusïŒ ã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã5ïŒ Monzo Digital Bankã ã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã6ïŒ BlaBlaCar ãã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã7ïŒ BlackRock ãã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã8ïŒ Huawei ãã
- ã Kubernetesã®çç£ã«ãããæåäºäŸã ããŒã9ïŒ CERNããã³210 K8sã¯ã©ã¹ã¿ãŒã