The Design of Storage for Stateful Application in Kubernetes (Container World 2019@Silicon Valley)

The Design of Storage for Stateful Application in Kubernetes (Container World 2019@Silicon Valley)

We developed the Kubernetes as a Service for Yahoo! JAPAN. Also, we are developing a stateful environment in Kubernetes for stateful Application such as a database. Especially, it is important to design a system that integrates Kubernetes and Storage.
I introduce the 5 points of design Know-How for your Data Center.

17d762ae166e66cab39e9b2e3df7d198?s=128

Yukinori Sakashita

April 19, 2019
Tweet

Transcript

  1. 5IF%FTJHOPG4UPSBHFGPS 4UBUFGVM"QQMJDBUJPOJO ,VCFSOFUFT :VLJOPSJ4BLBTIJUB

  2. "CPVUNF ‣4QFDJBMUZ  .BOBHFNFOU4PGUXBSF  $MPVE  4FSWFS4UPSBHF  "VUPNBUJPO"VUPOPNJD$PNQVUJOH

     "*.- // ).. #BZFTJBO/FUXPSL  ‣&YQFSJFODF  -BC.BOBHFSBU)JUBDIJ"NFSJDB 3%  4FOJPS3FTFBSDIFSBU)JUBDIJ 3% !2 :VLJOPSJ4BLBTIJUB 1I% ‣ 5FBN-FBEFSPG4PGUXBSF%FWFMPQNFOUBU;-BC :BIPP+BQBO$PSQPSBUJPO ‣ 7JDF$IBJSPG5FDIOPMPHZ$PNNJUUFFBU4/*"+ .BJMZTBLBTIJ![MBCDPKQ 2JJUBZTBLBTIJUB
  3. 1VCMJDBUJPO ‣ 1VCMJTIFEJO ‣ %FTDSJCFTIPXUPNBLFQSPEVDUJPO SFBEZDPOUBJOFSBOEBQQMJDBUJPO ‣ "WBJMBCMFPOBNB[PODPKQ FUD ‣

    +BQBOFTFPOMZ !3
  4. "HFOEB  0VS4FSWJDF  1FSTJTUFOU%BUBGPS4UBUFGVM"QQMJDBUJPO,VCFSOFUFT  1PJOUTPG4UPSBHF4ZTUFNGPS4UBUFGVM"QQMJDBUJPO  4VNNBSZ !4

  5. 0VS4FSWJDF

  6. ;-BC ‣ 4VCTJEJBSZPG:BIPP+"1"/ ‣ &TUBCMJTIFEJO ‣ 3%DPNQBOZP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PS4UBUFGVM "QQMJDBUJPO,VCFSOFUFT

  14. 4UBUFGVM"QQMJDBUJPO !14 bin/lib Container App Logic Data bin/lib Container App

    Logic Data ‣ ZFBSTBHP  /PUTVJUBCMFGPSBQQMJDBUJPOTXJUI TUBUF EBUB   *OJUJBMJ[FEBUBGPSFBDI BQQMJDBUJPOEFQMPZNFOU ‣ $VSSFOU  4FQBSBUFEBUBBOEMPHJD  ,FFQEBUBPOFYUFSOBMTUPSBHF
  15. ,VCFSOFUFT !15 ‣ %FGBDUPTUBOEBSEPGDPOUBJOFSPSDIFTUSBUJPO ‣ $FOUFSPGFDPTZTUFNJO$/$'
 $MPVE/BUJWF$PNQVUJOH'PVOEBUJPO  ‣ .BJOGVODUJPO

     4FSWJDFEJTDPWFSZBOEMPBECBMBODJOH  4FMGIFBMJOH  "VUPNBUFESPMMPVUTBOESPMMCBDLT  )PSJ[POUBMTDBMJOH  4UPSBHFPSDIFTUSBUJPO
  16. $MPVE/BUJWF-BOETDBQF !16 3FG$/$'MBOETDBQF IUUQTHJUIVCDPNDODGMBOETDBQF

  17. !17 3FG$/$'MBOETDBQF IUUQTHJUIVCDPNDODGMBOETDBQF $MPVE/BUJWF4UPSBHF

  18. ‣ ,VCFSOFUFTW `   %ZOBNJD1SPWJTJPOJOH ‣ ,VCFSOFUFTW ` 

     'MFY7PMVNF ‣ ,VCFSOFUFTW `   $4* $POUBJOFS4UPSBHF *OUFSGBDF  "MQIB  ‣ ,VCFSOFUFTW b   -PDBM7PMVNF #FUB !18 ‣ ,VCFSOFUFTW `   7PMVNF3FTJ[JOH ‣ ,VCFSOFUFTW b   7PMVNF4OBQTIPU "MQIB   5PQPMPHZ"XBSF7PMVNF 1SPWJTJPOJOH #FUB  ‣ ,VCFSOFUFTW `   $4* ("  ‣ ,VCFSOFUFTW `   -PDBM7PMVNF ("  )JTUPSZPG4UPSBHF'VODUJPOT
  19. 4VQQPSUFE7PMVNF5ZQFT ‣ BXT&MBTUJD#MPDL4UPSF ‣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 TQFD DPOUBJOFST OBNFNZTRM JNBHFNZTRM ʜ WPMVNF.PVOUT OBNFNZTRMEBUB

    NPVOU1BUIWBSMJCNZTRM WPMVNF$MBJN5FNQMBUFT NFUBEBUB OBNFNZTRMEBUB TQFD BDDFTT.PEFT<3FBE8SJUF0ODF> TUPSBHF$MBTT/BNFHPME SFTPVSDFT SFRVFTUT TUPSBHF(J 4FMFDU4$
  29. %ZOBNJD1SPWJTJPOJOH !29 ʜ TQFD DPOUBJOFST OBNFNZTRM JNBHFNZTRM ʜ WPMVNF.PVOUT OBNFNZTRMEBUB

    NPVOU1BUIWBSMJCNZTRM WPMVNF$MBJN5FNQMBUFT NFUBEBUB OBNFNZTRMEBUB TQFD BDDFTT.PEFT<3FBE8SJUF0ODF> TUPSBHF$MBTT/BNFHPME SFTPVSDFT SFRVFTUT TUPSBHF(J Storage $SFBUF7PMVNF QSPWJTJPOFS
  30. %ZOBNJD1SPWJTJPOJOH !30 ʜ TQFD DPOUBJOFST OBNFNZTRM JNBHFNZTRM ʜ WPMVNF.PVOUT OBNFNZTRMEBUB

    NPVOU1BUIWBSMJCNZTRM WPMVNF$MBJN5FNQMBUFT NFUBEBUB OBNFNZTRMEBUB TQFD BDDFTT.PEFT<3FBE8SJUF0ODF> TUPSBHF$MBTT/BNFHPME SFTPVSDFT SFRVFTUT TUPSBHF(J Storage OS "TTJHO $SFBUF
 17
  31. %ZOBNJD1SPWJTJPOJOH !31 ʜ TQFD DPOUBJOFST OBNFNZTRM JNBHFNZTRM ʜ WPMVNF.PVOUT OBNFNZTRMEBUB

    NPVOU1BUIWBSMJCNZTRM WPMVNF$MBJN5FNQMBUFT NFUBEBUB OBNFNZTRMEBUB TQFD BDDFTT.PEFT<3FBE8SJUF0ODF> TUPSBHF$MBTT/BNFHPME SFTPVSDFT SFRVFTUT TUPSBHF(J Storage OS Container Runtime Container .PVOU
 ɹ17
  32. 3PMMJOH6QEBUF !32 ‣ 1PEJTSFDSFBUFEJOSPMMJOHVQEBU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4UPSBHF $4* $4* $JOEFS $4* 4XPSEpTI$FQI $JOEFSFUD $4*EJSFDU 1SPYZ $JOEFS 1SPYZ 0QFO4%4
  51. 4VNNBSZ !51 ‣ 4FSWJDFTPGNZDPNQBOZBOECBTJDTUPSBHFGFBUVSFTPG,VCFSOFUFT ‣ $POUBJOFSPGTUBUFGVMBQQMJDBUJPOTOFBSJOHQSPEVDUJPOSFBEZTUBHF ‣ QPJOUTPGLOPXIPXGPSTUBUFGVMBQQMJDBUJPOCZTUPSBHFTZTUFN  3PMMJOHVQEBUF

     -PDLJOH  4FDVSJUZ  2VPUB  *OUFSGBDF
  52. !52 We’re Hiring! https://zlab.co.jp/  (Japanese) https://zlab.co.jp/en/career.html (English) Kubernetes, Docker, Prometheus, Golang, etc.