äŒçµ±çã«ãç§ãã¡ã¯ã¬ããŒã ïŒçŽ1æéãèšäºãããã¯ããã«æçïŒãšããã¹ã圢åŒã§ã®äž»ãªçµã蟌ã¿ã®ãããªãæ瀺ããŠåãã§ããŸãã è¡ããïŒ
çè«
ãã®ã¬ããŒãã¯ãéå»æ°å¹Žã«ããã£ãŠããŸããŸãªå Žæã§ãããŸã¬ããã«æ±ããããŠããæã人æ°ã®ãã質åã®1ã€ãHabrãŸãã¯YouTubeã®ã³ã¡ã³ãããœãŒã·ã£ã«ãããã¯ãŒã¯ãªã©ãžã®åçãšããŠç»å ŽããŸããã ãKubernetesã§æ ç¹ãéå¶ããããšã¯å¯èœã§ããïŒãããããŠãéåžžãã¯ããããã...ããšçããå Žåããããã®ãäžè¬çãããã³ãããããã«ã€ããŠååãªèª¬æã¯ãããŸããã§ãããçãã¡ãã»ãŒãžã§æåããŸããã§ããã
ãã ãããŸãããããŒã¿ããŒã¹[ããŒã¿]ãããå šäœãšããŠã¹ããŒããã«ãŸã§ã®åé¡ãèŠçŽããŸãã DBMSã¯ãã¹ããŒããã«ãªæ±ºå®ã®ç¹å¥ãªå Žåã«éãããããå®å šãªãªã¹ãã¯æ¬¡ã®ããã«è¡šãããšãã§ããŸãã
ç¹å®ã®ã±ãŒã¹ãèŠãåã«ãKubernetesã®åäœ/䜿çšã®3ã€ã®éèŠãªæ©èœã«ã€ããŠèª¬æããŸãã
1. Kubernetesã®é«å¯çšæ§ã®å²åŠ
ãããããšç ãã®é¡æšã誰ããç¥ã£ãŠãããKubernetesã矀ãã®äžçã®ç©èªã§ããå Žåãå€å žçãªDBMSã¯åãªããããã§ããããšãç解ããŠããŸãã
ãŸãããããããã®ã¢ãŒããã¯ãã£ã¯ããäŒçµ±çãªãããŒãžã§ã³ã§ã¯ã©ã®ããã«èŠããŸãããïŒ MySQLãã€ã³ã¹ããŒã«ããå žåçãªäŸã¯ãåé·é»æºãåãã2å°ã®é補ãµãŒããŒããã£ã¹ã¯ããããã¯ãŒã¯...ãããã³ãã®ä»ãã¹ãŠïŒãšã³ãžãã¢ããã³ããŸããŸãªè£å©ããŒã«ãå«ãïŒã§ã®ã¬ããªã±ãŒã·ã§ã³ã§ããããã«ãããMySQLããã»ã¹ã倱æããªãããšã確èªã§ããŸãã ITã³ã³ããŒãã³ãã®å Žåããã©ãŒã«ããã¬ã©ã³ã¹ãèæ ®ãããŸãã
Kubernetesã§ãåãããã«èŠããŸããïŒ ããã§ã¯ãéåžžãããå€ãã®é補ãµãŒããŒããããããã·ã³ãã«ã§ãåé·ãªé»æºãšãããã¯ãŒã¯ã¯ãããŸããïŒ1å°ã®ãã·ã³ã®æ倱ãäœã«ã圱é¿ããªããšããæå³ã§ïŒ-ãããã¯ãã¹ãŠã¯ã©ã¹ã¿ãŒã«çµåãããŸãã ãã®ãã©ãŒã«ããã¬ã©ã³ã¹ã¯ãœãããŠã§ã¢ã«ãã£ãŠæäŸãããŸããããŒãã«äœããçºçããå ŽåãKubernetesã¯ä»ã®ããŒãã§å¿ èŠãªã€ã³ã¹ã¿ã³ã¹ãæ€åºããŠèµ·åããŸãã
K8ã®é«å¯çšæ§ã®ã¡ã«ããºã ã¯äœã§ããïŒ
- ã³ã³ãããŒã©ãŒ å€æ°ãããŸããã2ã€ã®äž»ãªãã®ããããŸãã
Deployment
ïŒã¹ããŒãã¬ã¹ã¢ããªã±ãŒã·ã§ã³çšïŒãšStatefulSet
ïŒã¹ããŒããã«ã¢ããªã±ãŒã·ã§ã³çšïŒã§ãã ãããã¯ãããŒããã¯ã©ãã·ã¥ããå Žåã«å®è¡ãããã¢ã¯ã·ã§ã³ã®ãã¹ãŠã®ããžãã¯ãä¿åããŸãïŒããããžã®ã¢ã¯ã»ã¹äžèœïŒã -
PodAntiAffinity
ç¹å®ã®ããããåãããŒãäžã«ãªãããã«æå®ããæ©èœã -
PodDisruptionBudgets
ã¹ã±ãžã¥ãŒã«ãããäœæ¥ã®å Žåã«åæã«ãªãã«ã§ãããããã€ã³ã¹ã¿ã³ã¹ã®æ°ã®å¶éã
2. Kubernetesã®äžè²«æ§ã®ä¿èšŒ
䜿ãæ £ããã·ã³ã°ã«ãã¹ã¿ãŒãã©ãŒã«ããã¬ã©ã³ã¹ã¹ããŒã ã¯ã©ã®ããã«æ©èœããŸããïŒ 2ã€ã®ãµãŒããŒïŒãã¹ã¿ãŒãšã¹ã¿ã³ãã€ïŒããã®ãã¡ã®1ã€ã¯ã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠåžžã«ã¢ã¯ã»ã¹ãããããŒããã©ã³ãµãŒãä»ããŠäœ¿çšãããŸãã ãããã¯ãŒã¯ã«åé¡ãããå Žåã¯ã©ããªããŸããïŒ
åŸæ¥ã®ã¹ããªãããã¬ã€ã³ ïŒã¢ããªã±ãŒã·ã§ã³ã¯ãDBMSã®äž¡æ¹ã®ã€ã³ã¹ã¿ã³ã¹ãžã®ã¢ã¯ã»ã¹ãéå§ããŸããåã€ã³ã¹ã¿ã³ã¹ã¯ãããèªäœãã¡ã€ã³ã€ã³ã¹ã¿ã³ã¹ãšèŠãªããŸãã ãããåé¿ããããã«ãkeepalivedã¯3ã€ã®ã€ã³ã¹ã¿ã³ã¹ãæã€corosyncã«çœ®ãæãããããã¹ã¿ãŒã«æ祚ãããšãã«å®è¶³æ°ãéæããŸããã ãã ãããã®å Žåã§ãåé¡ããããŸãïŒåããDBMSã€ã³ã¹ã¿ã³ã¹ããèªæ®ºãããããã«æåãå°œããïŒIPã¢ãã¬ã¹ãåé€ããããŒã¿ããŒã¹ãèªã¿åãå°çšã«å€æãããªã©ïŒå Žåãã¯ã©ã¹ã¿ãŒã®ä»ã®éšåã¯ãŠã£ã¶ãŒãã«äœãèµ·ãã£ãã®ãããããŸãã-ãã®ããŒãã¯å®éã«ãŸã æ©èœããŠããããªã¯ãšã¹ããããã«å°éããããšãã€ãŸããŠã£ã¶ãŒããåãæ¿ããããšãã§ããªãããšãæå³ããŸãã
ãã®ç¶æ³ã解決ããããã«ã誀ã£ãæäœããã¯ã©ã¹ã¿ãŒå šäœãä¿è·ããããã«ããŒããåé¢ããã¡ã«ããºã ããããŸãããã®ããã»ã¹ã¯ãã§ã³ã·ã³ã°ãšåŒã°ããŸãã å®çšçãªæ¬è³ªã¯ãç§ãã¡ãèœã¡ãè»ãã殺ããããã«äœããã®å€éšæ段ã«ãã£ãŠè©Šã¿ãŠãããšããäºå®ã«èŠçŽãããŸãã ã¢ãããŒãã¯ç°ãªãå ŽåããããŸããIPMIãä»ããŠãã·ã³ããªãã«ããŠã¹ã€ããã®ããŒãããããã¯ããããšãããã¯ã©ãŠããããã€ããŒã®APIã«ã¢ã¯ã»ã¹ããããšãªã©ã§ãã ãããŠããã®æäœã®åŸã®ã¿ããŠã£ã¶ãŒããåãæ¿ããããšãã§ããŸãã ãããã£ãŠã æ倧1åã®ä¿èšŒãéæããã äžè²«æ§ãä¿èšŒãããŸãã
Kubernetesã§åãããšãéæããæ¹æ³ã¯ïŒ ãããè¡ãããã«ããã§ã«èšåãããŠããã³ã³ãããŒã©ãŒããããããŒãã®ã¢ã¯ã»ã¹äžèœã®å Žåã®åäœã¯ç°ãªããŸãïŒ
-
Deployment
ïŒã3ã€ã®ããããããã¯ãã ãšèšãããŸããããçŸåšã¯2ã€ã®ããããããããŸãã-æ°ããããããäœæããŸãã; -
StatefulSet
ïŒããããã¯ãªããªã£ãïŒã åŸ ã¡ãŸãïŒãã®ããŒããæ»ããã殺ãããã«èšãããŸãã ã³ã³ãããŒèªäœïŒãªãã¬ãŒã¿ãŒã®ã¢ã¯ã·ã§ã³ãªãïŒã¯åäœæãããŸããã ããã¯ãåãæ倧1åã®ä¿èšŒãéæãããæ¹æ³ã§ãã
ãã ããããã§ã¯ãåŸè ã®å Žåããã§ã³ã·ã³ã°ãå¿ èŠã§ãããã®ããŒãã確å®ã«ãããªãããšã確èªããã¡ã«ããºã ãå¿ èŠã§ãã èªååããããšã¯ã第äžã«éåžžã«é£ããïŒå€ãã®å®è£ ãå¿ èŠã§ãïŒã第äºã«ããã«æªãããšã«ãéåžžã¯ããŒãããã£ãããšæ®ºããŸãïŒIPMIãžã®ã¢ã¯ã»ã¹ã«ã¯æ°ç§ããæ°åç§ãããã«ã¯æ°åããããŸãïŒã ããŒã¹ãæ°ãããã¹ã¿ãŒã«åãæ¿ããã®ã«æ°ååŸ ã€äººã¯ã»ãšãã©ããŸããã ãããããã§ã³ã·ã³ã°ã¡ã«ããºã ãå¿ èŠãšããªãå¥ã®ã¢ãããŒãããããŸã...
Kuberneteså€ã§åœŒã®èª¬æãå§ããŸãã ããã¯ãšã³ããDBMSã«ã¢ã¯ã»ã¹ããããã®ç¹å¥ãªããŒããã©ã³ãµãŒã䜿çšããŸãã ãã®ç¹ç°æ§ã¯ãäžè²«æ§ã®ç¹æ§ãæã£ãŠãããšããäºå®ã«ãããŸãã ãããã¯ãŒã¯é害ãšã¹ããªãããã¬ã€ã³ã«å¯Ÿããä¿è·ãçŸåšã®ãã¹ã¿ãŒãžã®ãã¹ãŠã®æ¥ç¶ãåé€ããå¥ã®ããŒãã§åæïŒã¬ããªã«ïŒãåŸ ã£ãŠããåãæ¿ããããšãã§ããããã§ãã ç§ã¯ãã®ã¢ãããŒãã®ç¢ºç«ãããçšèªãèŠã€ããããã Consistent SwitchoverãšåŒãã§ããŸããã
圌ãšã®äž»ãªè³ªåã¯ãã¯ã©ãŠããããã€ããŒãšãã©ã€ããŒãã€ã³ã¹ããŒã«ã®äž¡æ¹ã«ãµããŒããæäŸããããããŠãããŒãµã«ã«ããæ¹æ³ã§ãã ãã®ããããããã·ãã¢ããªã±ãŒã·ã§ã³ã«è¿œå ãããŸãã ãããã®ããããã¯ããã®ã¢ããªã±ãŒã·ã§ã³ããã®èŠæ±ãåãå ¥ãïŒãããŠããããDBMSã«è»¢éãïŒãããããã¹ãŠããå®è¶³æ°ãåéãããŸãã ã¯ã©ã¹ã¿ã®äžéšã«é害ãçºçãããšãã¯ã©ãŒã©ã ã倱ã£ããããã·ã¯ããã«DBMSãžã®æ¥ç¶ãåé€ããŸãã
3.ããŒã¿ã¹ãã¬ãŒãžãšKubernetes
äž»ãªã¡ã«ããºã ã¯ãå¿ èŠãªã¯ã©ãŠããªãã·ã§ã³ãŸãã¯ãã¢ã¡ã¿ã«çšã®ããŸããŸãªå®è£ ã®ãããã¯ãŒã¯ãããã¯ããã€ã¹ ïŒå¥åSANïŒãããã¯ãŒã¯ãã©ã€ãã§ãã ãã ããããŒããããããŒã¿ããŒã¹ïŒããšãã°ã50000 IOPSãå¿ èŠãšããMySQLïŒãã¯ã©ãŠãïŒAWS EBSïŒã«é 眮ããããšã¯ã åŸ ã¡æéã®ããã«æ©èœããŸããã
ãã®ãããªå Žåã®Kubernetesã«ã¯ãããŒã«ã«ããŒããã©ã€ãïŒ ããŒã«ã«ã¹ãã¬ãŒãžïŒãæ¥ç¶ããæ©èœããããŸãã é害ãçºçããå ŽåïŒãããã§ãã£ã¹ã¯ã䜿çšã§ããªããªã£ãå ŽåïŒããã®ãã·ã³ã修埩ããå¿ èŠããããŸããããã¯ã1ã€ã®ä¿¡é Œã§ãããµãŒããŒã«é害ãçºçããå Žåã®åŸæ¥ã®ã¹ããŒã ãšåæ§ã§ãã
äž¡æ¹ã®ãªãã·ã§ã³ïŒ ãããã¯ãŒã¯ãããã¯ããã€ã¹ãšããŒã«ã«ã¹ãã¬ãŒãž ïŒã¯ReadWriteOnceã«ããŽãªã«å±ããŸãïŒã¹ãã¬ãŒãžã2ãæïŒãããïŒã«ããŠã³ãããããšã¯äžå¯èœã§ã-ãã®ã¹ã±ãŒãªã³ã°ã§ã¯ãæ°ãããã£ã¹ã¯ãäœæããŠæ°ãããããã«æ¥ç¶ããå¿ èŠããããŸãïŒãã®ããã®çµã¿èŸŒã¿ã®K8ã¡ã«ããºã ããããŸãïŒ ããããŠå¿ èŠãªããŒã¿ãå ¥åããŸãïŒãã§ã«è»éã«ãã£ãŠè¡ãããŠããŸãïŒã
ReadWriteManyã¢ãŒããå¿ èŠãªå Žåã¯ããããªãã¯ã¯ã©ãŠãçšã®
AzureFile
ãš
AWSElasticFileSystem
ãåæ£ã·ã¹ãã ã®ãã¡ã³çšã®CephFSãšGlusterfsãããã³ã€ã³ã¹ããŒã«çšã®NFSã®Network File System ïŒãŸãã¯NASïŒå®è£ ãå©çšå¯èœã§ãã
ç·Žç¿ãã
1.ã¹ã¿ã³ãã¢ãã³
ãã®ãªãã·ã§ã³ã¯ãããŒã«ã«ã¹ãã¬ãŒãžã䜿çšããŠåå¥ã®ãµãŒããŒã¢ãŒãã§DBMSãèµ·åããããšã劚ãããã®ãäœããªãå Žåã«ã€ããŠã§ãã ããã¯é«å¯çšæ§ã«é¢ãããã®ã§ã¯ãããŸãã...ãã ããéã¬ãã«ã§ããçšåºŠïŒã€ãŸãããã®ã¢ããªã±ãŒã·ã§ã³ã«ååïŒå®è£ ã§ããŸãã ãã®ã¢ããªã±ãŒã·ã§ã³ã«ã¯å€ãã®ã±ãŒã¹ããããŸãã ãŸã第äžã«ããããã¯ããããçš®é¡ã®ã¹ããŒãžã³ã°ç°å¢ãšéçºç°å¢ã§ãããããã ãã§ã¯ãããŸãããã»ã«ã³ããªãµãŒãã¹ãããã«èœã¡ã15åéããããç¡å¹ã«ããããšã¯éèŠã§ã¯ãããŸããã Kubernetesã§ã¯ãããã¯1ã€ã®ããããæã€
StatefulSet
ã«ãã£ãŠå®è£ ãããŸãã
äžè¬ã«ãããã¯å®è¡å¯èœãªãªãã·ã§ã³ã§ãããç§ã®èŠ³ç¹ããã¯ãå¥ã®ä»®æ³ãã·ã³ã«DBMSãã€ã³ã¹ããŒã«ããå Žåãšæ¯ã¹ãŠãã€ãã¹ã¯ãããŸããã
2.æååãæ¿ãã«ããè€è£œãã¢
StatefulSet
åã³äœ¿çšãããŸãããäžè¬çãªã¹ããŒã ã¯æ¬¡ã®ããã«ãªããŸãã
ããŒãã®1ã€ã倱æããå ŽåïŒ
mysql-a-0
ïŒãå¥è·¡ã¯çºçããŸãããããã©ãã£ãã¯ãåãæ¿ããããšãã§ããã¬ããªã«ïŒ
mysql-b-0
ïŒããããŸãã ãã®å Žåããã©ãã£ãã¯ãåãæ¿ããåã§ãã
mysql
ãµãŒãã¹ããDBMSãªã¯ãšã¹ããåé€ããã ãã§ãªããDBMSã«æåã§ãã°ã€ã³ãããã¹ãŠã®æ¥ç¶ãå®äºããŠããããšã確èªããŠïŒkillïŒãDBMSãã2çªç®ã®ããŒãã«ç§»åããŠã¬ããªã«ãåæ§æããããšãå¿ããªãã§ãã ããå察æ¹åã«ã
çŸåšãèªåãã§ãŒã«ãªãŒããŒãªãã®2ã€ã®ãµãŒããŒïŒãã¹ã¿ãŒ+ã¹ã¿ã³ãã€ïŒã§ã¯ã©ã·ãã¯ããŒãžã§ã³ã䜿çšããŠããå Žåããã®ãœãªã¥ãŒã·ã§ã³ã¯Kubernetesã§åçã§ãã MySQLãPostgreSQLãRedisãªã©ã®è£œåã«é©ããŠããŸãã
3.èªã¿èŸŒã¿è² è·ã®ã¹ã±ãŒãªã³ã°
å®éããã®ã±ãŒã¹ã¯ã¹ããŒããã«ã§ã¯ãããŸããããªããªããç§ãã¡ã¯èªæžã«ã€ããŠã ã話ããŠããããã§ãã ããã§ãã¡ã€ã³DBMSãµãŒããŒã¯èæ ®ãããã¹ããŒã ã®å€åŽã«ãããKubernetesã®ãã¬ãŒã ã¯ãŒã¯å ã«ãèªã¿åãå°çšã®ãã¹ã¬ãŒããµãŒããŒã®ãã¡ãŒã ããäœæãããŸãã äžè¬çãªã¡ã«ããºã -ãã®ãã¡ãŒã ã®æ°ããåãããã§DBMSããŒã¿ãå ¥åããããã®initã³ã³ããã®äœ¿çšïŒããããã³ããŸãã¯è¿œå ã®ã¢ã¯ã·ã§ã³ãªã©ãå«ãéåžžã®ãããã®äœ¿çš-䜿çšãããDBMSã«ãã£ãŠç°ãªããŸãïŒã åã€ã³ã¹ã¿ã³ã¹ããã¹ã¿ãŒããé¢ããããªãããã«ããããã«ã掻æ§ãã¹ãã䜿çšã§ããŸãã
4.ã¹ããŒãã¯ã©ã€ã¢ã³ã
3ã€ã®memcachedã®
StatefulSet
ãäœæãããšãKubernetesã¯èŠæ±ã®ãã©ã³ã¹ããšããªãç¹å¥ãªãµãŒãã¹ãæäŸããŸãããç¬èªã®ãã¡ã€ã³ã®åããããäœæããŸãã ã¯ã©ã€ã¢ã³ãã¯ã圌èªèº«ãã·ã£ãŒãã£ã³ã°ãšè€è£œãã§ããå Žåãããããšé£æºããããšãã§ããŸãã
äŸã«ç®ãåããå¿ èŠã¯ãããŸãããããã¯ããã®ãŸãŸã§PHPã§ã»ãã·ã§ã³ã¹ãã¬ãŒãžãæ©èœããæ¹æ³ã§ãã ã»ãã·ã§ã³èŠæ±ããšã«ããã¹ãŠã®ãµãŒããŒã«å¯ŸããŠåæã«èŠæ±ãè¡ããããã®åŸããµãŒããŒããæãé¢é£æ§ã®é«ãåçãéžæãããŸãïŒã¬ã³ãŒããšåæ§ïŒã
5.ã¯ã©ãŠããã€ãã£ããœãªã¥ãŒã·ã§ã³
æåã¯ããŒãã®é害ã«çŠç¹ãåœãŠãå€ãã®ãœãªã¥ãŒã·ã§ã³ããããŸãã ãããèªäœãããŒãã®ãã§ã€ã«ãªãŒããŒãšãªã«ããªãè¡ãã äžè²«æ§ãä¿èšŒããŸãã ããã¯ãããã®å®å šãªãªã¹ãã§ã¯ãªããäžè¬çãªäŸã®äžéšã«ãããŸããã
ãããã¯ãã¹ãŠ
StatefulSet
åçŽã«é 眮ããããã®åŸãããŒãã¯ãäºããèŠã€ããŠã¯ã©ã¹ã¿ãŒã圢æããŸãã 補åèªäœã¯ã次ã®3ã€ã®ããšãå®è£ ããæ¹æ³ãç°ãªããŸãã
- ããŒãã¯ãäºããã©ã®ããã«åŠç¿ããŸããïŒ Kubernetes APIãDNSã¬ã³ãŒããéçæ§æãç¹æ®ããŒãïŒã·ãŒãïŒããµãŒãããŒãã£ã®ãµãŒãã¹æ€åºãªã©ã®ã¡ãœããããããŸã...
- ã¯ã©ã€ã¢ã³ãã¯ã©ã®ããã«æ¥ç¶ããŸããïŒ ãã¹ãã«åæ£ããããŒããã©ã³ãµãŒãä»ããŠããŸãã¯ã¯ã©ã€ã¢ã³ãã¯ãã¹ãŠã®ãã¹ãã«ã€ããŠç¥ãå¿ èŠããããåŠçæ¹æ³ã決å®ããŸãã
- æ°Žå¹³ã¹ã±ãŒãªã³ã°ã¯ã©ã®ããã«è¡ãããŸããïŒ ãŸãããå®å šãŸãã¯å°é£/å¶éä»ãã
ãããã®åé¡ã«å¯ŸããŠéžæããããœãªã¥ãŒã·ã§ã³ã«é¢ä¿ãªãããããã®è£œåã¯ãã¹ãŠã çããšããŠäœæããããããKubernetesã§ããŸãæ©èœããŸãã
6. Stolon PostgreSQL
Stolonã¯å®éã«ã ããããšããŠäœæãããPostgreSQLãçã«å€ããããšãã§ããŸãã ããã¯ã©ã®ããã«éæãããŸããïŒ
- æåã«ã etcd ïŒä»ã®ãªãã·ã§ã³ãå©çšå¯èœïŒã®åœ¹å²ã®ãµãŒãã¹çºèŠãå¿
èŠã§ã-ãããã®ã¯ã©ã¹ã¿ãŒã¯
StatefulSet
é 眮ãããŸãã - ãã1ã€ã®ã€ã³ãã©ã¹ãã©ã¯ãã£ã¯ãPostgreSQLã€ã³ã¹ã¿ã³ã¹ãåãã
StatefulSet
ã§ãã é©åãªDBMSã«å ããŠãåã€ã³ã¹ããŒã«ã®æšªã«ã¯ãDBMSæ§æãå®è¡ããkeeperãšããã³ã³ããŒãã³ãããããŸãã - å¥ã®ã³ã³ããŒãã³ãã§ããã»ã³ããã«ã¯ã
Deployment
ãšããŠãããã€ãããã¯ã©ã¹ã¿ãŒæ§æãç£èŠããŸãã 誰ããã¹ã¿ãŒãšã¹ã¿ã³ãã€ã«ãªããã決å®ãããã®æ å ±ãetcdã«æžã蟌ã¿ãŸãã ãŸããããŒããŒã¯etcdããããŒã¿ãèªã¿åããPostgreSQLã®ã€ã³ã¹ã¿ã³ã¹ã䜿çšããŠçŸåšã®ã¹ããŒã¿ã¹ã«å¯Ÿå¿ããã¢ã¯ã·ã§ã³ãå®è¡ããŸãã -
Deployment
ãPostgreSQLã€ã³ã¹ã¿ã³ã¹ã«å¯Ÿé¢ãããã1ã€ã®ã³ã³ããŒãã³ãã§ãããããã·ã¯ãåè¿°ã®Consistent Switchoverãã¿ãŒã³ã®å®è£ ã§ãã ãããã®ã³ã³ããŒãã³ãã¯etcdã«æ¥ç¶ãããŠããããã®æ¥ç¶ã倱ãããå Žåããããã·ã¯ããã«çºä¿¡æ¥ç¶ã匷å¶çµäºããŸãããã®æç¹ããããµãŒããŒã®åœ¹å²ïŒãã¹ã¿ãŒãŸãã¯ã¹ã¿ã³ãã€ã®ã©ã¡ããªã®ãïŒãç¥ããªãããã§ãã - æåŸã«ããããã·ã€ã³ã¹ã¿ã³ã¹ã¯éåžžã®
LoadBalancer
LoadBalancerã«çŽé¢ããŸãã
çµè«
Kubernetesã«æ ç¹ã眮ãããšã¯å¯èœã§ããïŒ ã¯ãããã¡ãããå Žåã«ãã£ãŠã¯å¯èœã§ã...ãããŠãé©åãªå Žåã¯ããã®ããã«è¡ãããŸãïŒStolonã¯ãŒã¯ãããŒãåç §ïŒ...
æè¡ã¯æ³¢ã®ããã«é²åããŠããããšã誰ããç¥ã£ãŠããŸãã æåã¯ãæ°ããããã€ã¹ã䜿çšããã®ã¯éåžžã«é£ããå ŽåããããŸãããæéãçµã€ã«ã€ããŠããã¹ãŠãå€ãããŸãããã¯ãããžãŒãå©çšå¯èœã«ãªããŸãã ã©ããžè¡ãã®ïŒ ã¯ããå éšã¯ãã®ãŸãŸã§ãããã©ã®ããã«æ©èœãããã¯ããããŸããã Kubernetesã¯ã ãªãã¬ãŒã¿ãŒãç©æ¥µçã«éçºããŠããŸã ã ãããŸã§ã®ãšãããããã»ã©å€ãã¯ãªããããŸãè¯ããããŸãããããã®æ¹åã«åãããããŸãã
ãããªãšã¹ã©ã€ã
ããã©ãŒãã³ã¹ããã®ãããªïŒçŽ1æéïŒïŒ
ã¬ããŒãã®ãã¬ãŒã³ããŒã·ã§ã³ïŒ
PSãããäžã§ããã®ã¬ããŒãããã®éåžžã«çãïŒïŒïŒçãããã¹ãã®çµã蟌ã¿ãèŠã€ããŸããããã³ã©ã€ãŽã©ã«ãã³ãã³ã«æè¬ããŸãã
PPS
ããã°ã®ä»ã®ã¬ããŒãïŒ
- â ã¢ãã¿ãªã³ã°ãšKubernetes â; ïŒDmitry Stolyarov; 2018幎5æ28æ¥RootConfïŒ ;
- â KubernetesãšGitLabã䜿çšãããã¹ãCI / CDãã©ã¯ãã£ã¹ â; ïŒDmitry Stolyarov; 2017幎11æ7æ¥HighLoad ++ïŒ ;
- â å°ããªãããžã§ã¯ãã§ã®Kubernetesã§ã®çµéš â; ïŒDmitry Stolyarov; 2017幎6æ6æ¥RootConfïŒ ;
- ã CI / CDã®Dockerã€ã¡ãŒãžãdappã§è¿ éãã€äŸ¿å©ã«åéããŸã ã ïŒDmitry Stolyarovã2016幎11æ8æ¥ãHighLoad ++ïŒ ã
- ã Dockerã«ããç¶ç¶çããªããªãŒã®å®è·µ ã ïŒDmitry Stolyarovã2016幎5æ31æ¥ãRootConfïŒ ã
次ã®åºçç©ã«ãèå³ããããããããŸããã