Upgrade to Pro — share decks privately, control downloads, hide ads and more …

kubefork - development experience like owning y...

Takamichi Omori
November 21, 2022
1.2k

kubefork - development experience like owning your own cluster

Cloud Native Days Tokyo 2022
movie: https://event.cloudnativedays.jp/cndt2022/talks/1590

Takamichi Omori

November 21, 2022
Tweet

Transcript

  1. ©2022 Wantedly, Inc. *BN 2 Takamichi Omori @onsd_ Engineer at

    DX Squad Love Kubernetes, Go, etc. Wantedly, Inc.
  2. ©2022 Wantedly, Inc. Kubefork ͱ͸ ࣗ෼ઐ༻ͷΫϥελΛ͍࣋ͬͯΔΑ͏ͳମݧ Ұͭͷ։ൃ༻Ϋϥελ͔ΒԾ૝తͳΫϥελΛ࡞Δ࢓૊Έ Copy on Write

    ΫϥελΛίϐʔ͢Δͷ͸ίετ͕͔͔Δ 
 มߋ͍ͨ͠Օॴ͚ͩมߋ͠ɺ ڞ༗Ͱ͖ΔϦιʔε͸ڞ༗͢Δ ΞΫηε͕෼཭͞Ε͍ͯΔͷͰ 
 ଞͷ։ൃऀʹ໎࿭͕͔͔Βͳ͍ ߴ଎ มߋՕॴ͕࠷খݶ ؀ڥʹΞΫηεͰ͖Δ·Ͱ͕ߴ଎ 5
  3. ©2022 Wantedly, Inc. ϚΠΫϩαʔϏε։ൃͰେ੾ͳͭͷ͜ͱ มߋΛૉૣ͘ࢼͤΔ ΋ͷͮ͘Γશൠʹ͓͍ͯେࣄ 
 มߋ͕ྑ͔ͬͨɾѱ͔ͬͨ͜ͱͷϑΟʔυόοΫϧʔϓ ଞਓͷมߋͷӨڹΛड͚ͳ͍ ૝ఆͱҟͳΔϨεϙϯεͷݪҼ͸୭ʁ

    ݪҼ͕ࣗ෼Ҏ֎ʹ͋ͬͨ৔߹ɺ֬ೝ͕೉͍͠ ґଘؔ܎Λҙࣝ͢Δඞཁ͕ͳ͍ ͜ͷαʔϏε͸Կʹґଘ͍ͯ͠Δʁ ։ൃ͢ΔͨΊʹ͸ԿʹΞΫηεͰ͖ΔΑ͏ʹ͢Δඞཁ͕͋Δʁ αʔϏεɾػೳ͝ͱʹґଘؔ܎Λ͓֮͑ͯ͘ͷ͸େม 
  4. ©2022 Wantedly, Inc. ΑΓΑ͍։ൃํ๏ େ੾ͳ͜ͱΛຬͨ͢։ൃํ๏͸͋Δʁ wมߋΛૉૣ͘ࢼͤΔ wଞਓͷมߋͷӨڹΛड͚ͳ͍ wґଘؔ܎Λҙࣝ͠ͳ͍  ϩʔΧϧͰ։ൃ͢Δ

     εςʔδϯά؀ڥʹσϓϩΠ͢Δ  5FMFQSFTFODFΛ࢖͏ ϚΠΫϩαʔϏε։ൃͷख๏Λൺֱ  8BOUFEMZͰߦΘΕ͍ͯͨ։ൃख๏Λൺֱ
  5. ©2022 Wantedly, Inc. طଘͷख๏ʢ̏ʣ 5FMFQSFTFODF ৄ͘͠͸IUUQTXXXUFMFQSFTFODFJP ˓มߋΛૉૣ͘ࢼͤΔ ɹEPDLFSCVJMEΛ଴ͭඞཁ͕ͳ͍ ˓ґଘؔ܎Λҙࣝ͢Δඞཁ͕ͳ͍ ɹಈ͍͍ͯΔγεςϜͷதͷϦΫΤετ͕खݩʹඈΜͰ͘Δ

    
 ✕ଞਓͷมߋͷӨڹΛड͚ͳ͍ ɹڞ༻ͷΫϥελͰ࣮ߦ͢ΔͱଞਓͷϦΫΤετ΋खݩʹདྷͯ͠·͏ $/$'4BOECPY1SPKFDU બ୒ͨ͠TFSWJDF΁ͷϦΫΤετΛ 
 ϩʔΧϧʹྲྀ͢͜ͱ͕Ͱ͖Δπʔϧ 12
  6. ©2022 Wantedly, Inc. ఺Λຬͨ͢։ൃख๏ *TUJP UFMFQSFTFODF *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ ಛఆͷϦΫΤετ͚ͩΛखݩʹϧʔςΟϯά ଞͷϦΫΤετ͸ڞ༻ͷ؀ڥΛ௨Δ 


    
 LVCFGPSLͷߟ͑ํ͸͔͜͜Βग़ൃ ˓มߋΛૉૣ͘ࢼͤΔ %PDLFSCVJMEΛ଴ͨͳͯ͘Α͍ ˓ଞਓͷมߋͷӨڹΛड͚ͳ͍ खݩͰ։ൃ͍ͯ͠ΔͷͰଞਓͷӨڹ͸ड͚ͳ͍ ˓ґଘؔ܎Λҙࣝ͢Δඞཁ͕ͳ͍ ಈ͍͍ͯΔγεςϜͷதͷϦΫΤετ͕खݩʹඈΜͰ͘Δ ߋʹৄ͘͠͸ͪ͜ΒɿIUUQTTQFBLFSEFDLDPNNPSVYJTUJPJOUFHSBUFEUFMFQSFTFODF 13
  7. ©2022 Wantedly, Inc. *TUJP UFMFQSFTFODF͔ΒͷਐԽ HBUFXBZϨΠϠͷ࣮૷ TPNFEFWXBOUFEMZDPN GPSLFEBTPNFEFWXBOUFEMZDPN (BUFXBZ ࣗ෼ͷมߋʹϧʔςΟϯά͢ΔͨΊʹ

    ಛผͳIFBEFS͕ඞཁͩͬͨ 
 (BUFXBZϨΠϠͷಋೖʹΑΓIFBEFSͳ͠Ͱ ࣗ෼ͷมߋʹ౸ୡͰ͖ΔΑ͏ʹ 14 ࣮Ϋϥελ͔Β࡞੒͞ΕΔԾ૝ΫϥελΛࢦ͢ 'PSLFE"͕7JSUVBM$MVTUFSʹ֘౰ 
 ϔομΛ࢖ͬͯϧʔςΟϯάΛૢ࡞͢Δମݧ͔ΒɺΫϥελΛίϐʔ͢ΔΑ͏ͳମݧʹ 7JSUVBM$MVTUFS
  8. ©2022 Wantedly, Inc. LVCFGPSL LVCFGPSLͷ׬੒ ϦΫΤετϧʔςΟϯάͳͲɺ 
 7JSUVBM$MVTUFSΛ࣮ݱ͢ΔͨΊʹ͸ 
 ଟ͘ͷϦιʔε͕ඞཁ

    
 ͦ͜ͰϦιʔεΛҰׅͯ͠؅ཧ͢Δ 
 ΧελϜίϯτϩʔϥʔΛ࣮૷ 
 GPSLϦιʔεΛBQQMZ͢Δ͜ͱͰ 
 ඞཁʹͳΔϦιʔεΛશͯ࡞੒Ͱ͖Δ 
 Α͏ʹ ͜͜·ͰͰݱࡏͷ࢓૊Έ͕׬੒ 
 LVCFGPSLͱݺͿΑ͏ʹ 15
  9. ©2022 Wantedly, Inc. 5FSNJOPMPHZ 7JSUVBM$MVTUFS Ծ૝తͳLVCFSFOUFTΫϥελ 'PSL*EFOUJ fi FS 'PSL͢Δ

    7JSUVBMDMVTUFSΛ۠ผ͢Δࣝผࢠ TIBSFE͔ΒWJSUVBMDMVTUFSΛ ಛఆͷGPSLJEFOUJ fi FSΛ΋ͱʹ ΞΫηεͰ͖Δ ࡞੒͢Δ͜ͱ 4ͭͷϚΠΫϩαʔϏε͔ΒͳΔγεςϜͱɺA,B ͷ fork ͞ΕͨΫϥελ 16
  10. ©2022 Wantedly, Inc. 5FSNJOPMPHZ 7JSUVBM$MVTUFS Ծ૝తͳLVCFSFOUFTΫϥελ 'PSL*EFOUJ fi FS 'PSL͢Δ

    7JSUVBMDMVTUFSΛ۠ผ͢Δࣝผࢠ TIBSFE͔ΒWJSUVBMDMVTUFSΛ ಛఆͷGPSLJEFOUJ fi FSΛ΋ͱʹ ΞΫηεͰ͖Δ ࡞੒͢Δ͜ͱ 4ͭͷϚΠΫϩαʔϏε͔ΒͳΔγεςϜͱɺA,B ͷ fork ͞ΕͨΫϥελ 17
  11. ©2022 Wantedly, Inc. 5FSNJOPMPHZ 7JSUVBM$MVTUFS Ծ૝తͳLVCFSFOUFTΫϥελ 'PSL*EFOUJ fi FS 'PSL͢Δ

    7JSUVBMDMVTUFSΛ۠ผ͢Δࣝผࢠ TIBSFE͔ΒWJSUVBMDMVTUFSΛ ಛఆͷGPSLJEFOUJ fi FSΛ΋ͱʹ ΞΫηεͰ͖Δ ࡞੒͢Δ͜ͱ 4ͭͷϚΠΫϩαʔϏε͔ΒͳΔγεςϜͱɺA,B ͷ fork ͞ΕͨΫϥελ 18
  12. ©2022 Wantedly, Inc. 5FSNJOPMPHZ 7JSUVBM$MVTUFS Ծ૝తͳLVCFSFOUFTΫϥελ 'PSL*EFOUJ fi FS 'PSL͢Δ

    7JSUVBMDMVTUFSΛ۠ผ͢Δࣝผࢠ TIBSFE͔ΒWJSUVBMDMVTUFSΛ ಛఆͷGPSLJEFOUJ fi FSΛ΋ͱʹ ΞΫηεͰ͖Δ ࡞੒͢Δ͜ͱ 4ͭͷϚΠΫϩαʔϏε͔ΒͳΔγεςϜͱɺA,B ͷ fork ͞ΕͨΫϥελ 19
  13. ©2022 Wantedly, Inc. *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ 
 
 ಛఆͷϦΫΤετ͚͕ͩϧʔςΟϯά͞ΕΔ 
 4FSWJDF %FQMPZNFOUΛ࡞੒

    4FSWJDFʹUFMFQSFTFODFΛ࣮ߦ͠ Ϋϥελ͔ΒͷϦΫΤετΛखݩʹϧʔςΟϯά ࣾ಺Ͱ͸MPDBMGPSLͱݺ͹Ε͍ͯΔ ૝ఆ͍ͯͨ͠ϢʔεέʔεɿΞϓϦέʔγϣϯ։ൃࢧԉ 22
  14. ©2022 Wantedly, Inc. ૝ఆ͍ͯͨ͠Ϣʔεέʔεɿखಈςετࢧԉ 23 *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ 
 
 ಛఆͷϦΫΤετ͚͕ͩϧʔςΟϯά͞ΕΔ 


    4FSJWJDF %FQMPZNFOUΛ࡞੒ 
 ͜͜Ͱ࡞੒͢Δ%FQMPZNFOU͸ࣗ෼͕มߋͨ͠ 
 *NBHFΛઃఆ͓ͯ͘͠ WJSUVBMDMVTUFS͕࡞੒Ͱ͖Ε͹ ϒϥ΢β͔Βมߋ͕ࢼͤΔ खಈςετɾϨϏϡʔͳͲͷ༻్Ͱར༻ 
 
 ࣾ಺Ͱ͸SFNPUFGPSLͱݺ͹Ε͍ͯΔ
  15. ©2022 Wantedly, Inc. ͪͳΈʹɿࣾ಺ͷ࿩ LVCF LVCFDUMͷϥούʔ ЋͷίϚϯυ Ϋϥελ͝ͱͷΞΫηεΛӅṭͨ͠Γ 7JSUVBMDMVTUFSͷ࡞੒ UFMFQSFTFODF

    ΛશࣗಈͰߦ͏ LVCFDUMʹ͸ͳ͍ศརػೳ͕ར༻Մೳ LVCFGPSL 24 มߋ͕ೖͬͨ7JSUVBM$MVTUFSͷ࡞੒Λ 
 ࣗಈͰߦ͏ LVCFGPSLSFNPUF
  16. ©2022 Wantedly, Inc. ৽͍͠Ϣʔεέʔε: Pull Request Preview 3FWJFX؀ڥͷࣗಈੜ੒ 13࡞੒࣌ʹWJSUVBMDMVTUFSΛࣗಈੜ੒ ੜ੒͞Εͨ63-ʹΞΫηε͢ΔͱࢼͤΔ

    .JDSPTFSWJDFͰ΋1SFWJFX ֎͔Β௚઀౸ୡͰ͖ͳ͍.JDSPTFSWJDF 
 ʹ΋ϧʔςΟϯάՄೳ ੜ੒͞Εͨ63-ʹΞΫηε͢Δ͜ͱͰ 
 Ұ෦͚ͩมߋ͞ΕͨγεςϜΛࢼͤΔ ඇΤϯδχΞʹࢼͯ͠΋Β͏ͱ͖΋ศར 
 ؀ڥߏங͕͍Βͳ͍ TBOECPYͷσʔλΛ͔ͭͬͯࢼͤΔ 25
  17. ©2022 Wantedly, Inc. ৽͍͠Ϣʔεέʔε: Pull Request Preview 3FWJFX؀ڥͷࣗಈੜ੒ 13࡞੒࣌ʹWJSUVBMDMVTUFSΛࣗಈੜ੒ ੜ੒͞Εͨ63-ʹΞΫηε͢ΔͱࢼͤΔ

    .JDSPTFSWJDFͰ΋1SFWJFXͰ͖Δ ֎͔Β௚઀౸ୡͰ͖ͳ͍.JDSPTFSWJDF 
 ʹ΋ϧʔςΟϯάՄೳ ੜ੒͞Εͨ63-ʹΞΫηε͢Δ͜ͱͰ 
 Ұ෦͚ͩมߋ͞ΕͨγεςϜΛࢼͤΔ ඇΤϯδχΞʹࢼͯ͠΋Β͏ͱ͖΋ศར 
 ؀ڥߏங͕͍Βͳ͍ TBOECPYͷσʔλΛ͔ͭͬͯࢼͤΔ 26
  18. ©2022 Wantedly, Inc. Pull Request Preview URL ͷ࢓૊Έ 27 

    ։ൃऀ͕(JU)VCʹมߋΛQVTI  มߋ͝ͱʹ%PDLFSJNBHFΛ࡞੒  %PDLFSJNBHFͷ४උ͕Ͱ͖ͨΒ 
 'PSLϦιʔεΛΫϥελʹ"QQMZ  7JSUVBM$MVTUFSͷ४උ͕Ͱ͖ͨΒ 
 13ʹίϝϯτ  ίϝϯτ͞Εͨ63-ʹΞΫηε
  19. ©2022 Wantedly, Inc. ৽͍͠Ϣʔεέʔε: Feature Flag ͷͨΊͷ؀ڥੜ੒ 'FBUVSF'MBH ΞϓϦέʔγϣϯͷڍಈΛมߋ͢ΔͨΊͷج൫ ୅දతͳྫɿ"#UFTU

    8BOUFEMZͷج൫͸)FBEFSͰ੍ޚՄೳ 
 9GFBUVSF fl BHT\TPNF"#UFTUz"z^ 'PSLJEFOUJ fi FSͱಉ͡Α͏ʹGFBUVSF fl BH΋఻೻͢Δ͜ͱͰ ޙଆͷNJDSPTFSWJDFͷڍಈͰ΋ม͑ΒΕΔ 28 )FBEFSΛ࢖੍ͬͨޚ
  20. ©2022 Wantedly, Inc. ৽͍͠Ϣʔεέʔε: Feature Flag ͷͨΊͷ؀ڥੜ੒ 'FBUVSF'MBH (BUFXBZ ಛఆͷGFBUVSF

    fl BH͕༗ޮʹͳͬͨԾ૝Ϋϥελ͕࡞੒Մೳ TPNFEFWXBOUFEMZDPN TPNFGFBUVSFFOBCMFETPNFEFWXBOUFEMZDPN ྫ  "#UFTUͷಛఆͷWBSJBOUͰදࣔ  ϦϦʔεલͷػೳΛ༗ޮʹ͢Δ  3BJMTͷΞϓϦέʔγϣϯͷBTTFUT 
 ͚ͩखݩͷϦιʔεΛ࢖͏ 29 'FBUVSF fl BHͳΒ৽نͷQPEແ͠Ͱར༻Մೳ
  21. ©2022 Wantedly, Inc. ͜͜·Ͱͷ·ͱΊ ,VCFGPSL wҰͭͷΫϥελ͔ΒԾ૝ΫϥελΛ࡞੒Ͱ͖Δ͘͠Έ wϢʔεέʔε wΞϓϦέʔγϣϯ։ൃࢧԉ wଞͷ։ൃऀʹ໎࿭Λ͔͚ͣʹUFMFQSFTFODFͰ͖Δ wखಈςετࢧԉ

    wखݩʹΞϓϦέʔγϣϯͷಈ࡞؀ڥ͕ͳͯ͘΋มߋΛ࣮ࡍͷϦΫΤετΛ࢖ͬͯࢼͤΔ w1VMM3FRVFTU1SFWJFX wͲΜͳαʔϏεͰ΋৮Γͳ͕ΒࢼͤΔ؀ڥͷࣗಈੜ੒ w'FBUVSF'MBHͷͨΊͷ؀ڥੜ੒ wσόοάʹศརͳ؀ڥ΍ɺ"#ςετͷൺֱͷͨΊͷ؀ڥͷੜ੒ 30
  22. ©2022 Wantedly, Inc. ߏ੒ཁૉ apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: labels:

    fork.k8s.wantedly.com/service: backend name: backend namespace: backend spec: hosts: - backend http: - match: - headers: x-fork-identifier: exact: many-todo-red route: - destination: host: backend-kubefork-many-todo-red - route: - destination: host: backend Service Mesh *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ ಛఆͷϔομ͕෇͍͍ͯΔϦΫΤετΛ ࢦఆͨ͠TFSWJDFʹϧʔςΟϯά͢Δ 34 Gateway "NCBTTBEPSͷIFBEFS෇༩ػೳΛ׆༻ ϗετ໊ͱϔομͷରԠ෇͚Λߦ͏
  23. ©2022 Wantedly, Inc. ߏ੒ཁૉ apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: labels:

    fork.k8s.wantedly.com/service: backend name: backend namespace: backend spec: hosts: - backend http: - match: - headers: x-fork-identifier: exact: many-todo-red route: - destination: host: backend-kubefork-many-todo-red - route: - destination: host: backend Service Mesh *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ ಛఆͷϔομ͕෇͍͍ͯΔϦΫΤετΛ ࢦఆͨ͠TFSWJDFʹϧʔςΟϯά͢Δ 35 Gateway "NCBTTBEPSͷIFBEFS෇༩ػೳΛ׆༻ ϗετ໊ͱϔομͷରԠ෇͚Λߦ͏
  24. ©2022 Wantedly, Inc. ߏ੒ཁૉ apiVersion: getambassador.io/v2 kind: Mapping metadata: labels:

    fork.k8s.wantedly.com/manager: kubefork-manager name: backend-todo-test-many-todo-red namespace: emissary ownerReferences: spec: allow_upgrade: - websocket ambassador_id: - default add_request_headers: x-fork-identifier: many-todo-red x-forwarded-host: '%REQ(:authority)%' host: many-todo-red.backend.todo.test host_rewrite: backend.backend prefix: / rewrite: "" service: backend.backend timeout_ms: 90000 Service Mesh *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ ಛఆͷϔομ͕෇͍͍ͯΔϦΫΤετΛ ࢦఆͨ͠TFSWJDFʹϧʔςΟϯά͢Δ 37 Gateway "NCBTTBEPSͷIFBEFS෇༩ػೳΛ׆༻ ϗετ໊ͱϔομͷରԠ෇͚Λߦ͏
  25. ©2022 Wantedly, Inc. ߏ੒ཁૉ apiVersion: getambassador.io/v2 kind: Mapping metadata: labels:

    fork.k8s.wantedly.com/manager: kubefork-manager name: backend-todo-test-many-todo-red namespace: emissary ownerReferences: spec: allow_upgrade: - websocket ambassador_id: - default add_request_headers: x-fork-identifier: many-todo-red x-forwarded-host: '%REQ(:authority)%' host: many-todo-red.backend.todo.test host_rewrite: backend.backend prefix: / rewrite: "" service: backend.backend timeout_ms: 90000 Service Mesh *TUJPͷϦΫΤετϧʔςΟϯάΛ׆༻ ಛఆͷϔομ͕෇͍͍ͯΔϦΫΤετΛ ࢦఆͨ͠TFSWJDFʹϧʔςΟϯά͢Δ 38 Gateway "NCBTTBEPSͷIFBEFS෇༩ػೳΛ׆༻ ϗετ໊ͱϔομͷରԠ෇͚Λߦ͏
  26. ©2022 Wantedly, Inc. 7JSUVBMDMVTUFSͷ࡞੒ 7JSUVBM$MVTUFSʹඞཁͳϦιʔε w%FQMPZNFOU w4FSWJDF w7JSUVBM4FSWJDF w.BQQJOH 39

    'PSLϦιʔε ্هͷϦιʔεΛҰׅͯ͠࡞੒͢Δ 'PSLϦιʔεΛBQQMZ͢Δͱ 7JSUVBMDMVTUFS͕࡞੒͞ΕΔମݧ 'PSLϦιʔε͸LVCFGPSLDPOUSPMMFS͕ఏڙɾ؅ཧ͢Δ
  27. ©2022 Wantedly, Inc. 7JSUVBMDMVTUFSͷ࡞੒ apiVersion: fork.k8s.wantedly.com/v1beta1 kind: Fork metadata: generation:

    1 labels: fork.k8s.wantedly.com/identifier: red name: kubefork-red namespace: option spec: deployments: replicas: 1 selector: matchLabels: app: option template: metadata: labels: app: red role: fork spec: containers: - env: - name: FORK_IDENTIFIER value: red image: onsd/todo-option:other name: todo-option resources: {} identifier: red manager: emissary/kubefork-manager services: selector: matchLabels: app: option 7JSUVBM$MVTUFSʹඞཁͳϦιʔε w%FQMPZNFOU w4FSWJDF w7JSUVBM4FSWJDF w.BQQJOH 40 'PSLϦιʔε ্هͷϦιʔεΛҰׅͯ͠࡞੒͢Δ 'PSLϦιʔεΛBQQMZ͢Δͱ 7JSUVBMDMVTUFS͕࡞੒͞ΕΔମݧ 'PSLϦιʔε͸LVCFGPSLDPOUSPMMFS͕ఏڙɾ؅ཧ͢Δ
  28. ©2022 Wantedly, Inc. 7JSUVBMDMVTUFSͷ࡞੒ apiVersion: fork.k8s.wantedly.com/v1beta1 kind: Fork metadata: generation:

    1 labels: fork.k8s.wantedly.com/identifier: red name: kubefork-red namespace: option spec: deployments: replicas: 1 selector: matchLabels: app: option template: metadata: labels: app: red role: fork spec: containers: - env: - name: FORK_IDENTIFIER value: red image: onsd/todo-option:other name: todo-option resources: {} identifier: red manager: emissary/kubefork-manager services: selector: matchLabels: app: option 7JSUVBM$MVTUFSʹඞཁͳϦιʔε w%FQMPZNFOU w4FSWJDF w7JSUVBM4FSWJDF w.BQQJOH 41 'PSLϦιʔε ্هͷϦιʔεΛҰׅͯ͠࡞੒͢Δ 'PSLϦιʔεΛBQQMZ͢Δͱ 7JSUVBMDMVTUFS͕࡞੒͞ΕΔମݧ 'PSLϦιʔε͸LVCFGPSLDPOUSPMMFS͕ఏڙɾ؅ཧ͢Δ
  29. ©2022 Wantedly, Inc. 7JSUVBMDMVTUFSͷ࡞੒ apiVersion: fork.k8s.wantedly.com/v1beta1 kind: Fork metadata: generation:

    1 labels: fork.k8s.wantedly.com/identifier: red name: kubefork-red namespace: option spec: deployments: replicas: 1 selector: matchLabels: app: option template: metadata: labels: app: red role: fork spec: containers: - env: - name: FORK_IDENTIFIER value: red image: onsd/todo-option:other name: todo-option resources: {} identifier: red manager: emissary/kubefork-manager services: selector: matchLabels: app: option 7JSUVBM$MVTUFSʹඞཁͳϦιʔε w%FQMPZNFOU w4FSWJDF w7JSUVBM4FSWJDF w.BQQJOH 42 'PSLϦιʔε ্هͷϦιʔεΛҰׅͯ͠࡞੒͢Δ 'PSLϦιʔεΛBQQMZ͢Δͱ 7JSUVBMDMVTUFS͕࡞੒͞ΕΔମݧ 'PSLϦιʔε͸LVCFGPSLDPOUSPMMFS͕ఏڙɾ؅ཧ͢Δ
  30. ©2022 Wantedly, Inc. 7JSUVBMDMVTUFSͷ࡞੒ apiVersion: fork.k8s.wantedly.com/v1beta1 kind: Fork metadata: generation:

    1 labels: fork.k8s.wantedly.com/identifier: red name: kubefork-red namespace: option spec: deployments: replicas: 1 selector: matchLabels: app: option template: metadata: labels: app: red role: fork spec: containers: - env: - name: FORK_IDENTIFIER value: red image: onsd/todo-option:other name: todo-option resources: {} identifier: red manager: emissary/kubefork-manager services: selector: matchLabels: app: option 7JSUVBM$MVTUFSʹඞཁͳϦιʔε w%FQMPZNFOU w4FSWJDF w7JSUVBM4FSWJDF w.BQQJOH 43 'PSLϦιʔε ্هͷϦιʔεΛҰׅͯ͠࡞੒͢Δ 'PSLϦιʔεΛBQQMZ͢Δͱ 7JSUVBMDMVTUFS͕࡞੒͞ΕΔମݧ 'PSLϦιʔε͸LVCFGPSLDPOUSPMMFS͕ఏڙɾ؅ཧ͢Δ
  31. ©2022 Wantedly, Inc. σϞ 47 5PEPදࣔαʔϏε ̏ͭͷαʔϏε͔ΒͳΔ  'SPOUFOE 

    #BDLFOE͔ΒUPEPΛऔಘ  #BDLFOE  5PEPͷϦετΛ͍࣋ͬͯΔ  ϦΫΤετ͕དྷΔͱɺ0QUJPO͔Β 
 5PEPͷ৭Λऔಘͯ͠ฦ͢  0QUJPO  5PEPͷ৭Λฦ͢αʔϏε
  32. ©2022 Wantedly, Inc. ·ͱΊ 51 kubefork ҰͭͷΫϥελ͔ΒԾ૝తͳΫϥελΛ࡞੒ 
 มߋΛͲΜͲΜࢼ͢͜ͱ͕Ͱ͖Δ؀ڥΛ࡞Δ େࣄͳͷ͸࣍ͷ̎ͭ

    wϔομΛ΋ͱʹͨ͠ϦΫΤετϧʔςΟϯά wϗετ໊ͱϔομͷରԠ෇͚ kubefork-controller ΧελϜϦιʔεΛ΋ͱʹԾ૝తͳΫϥελΛ࡞੒ (JU)VCʹͯެ։த