Ingress For Anthosを活用した安全なk8sクラスタ運用/Ingress For Anthos In Production
by
Hiroki Sakamoto
×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Ingress For Anthos In Production @taisho6339
Slide 2
Slide 2 text
ࣗݾհ ࡔຊେক (Hiroki Sakamoto) Twitter: taisho6339 Github: taisho6339 ΩϟϦΞ Ϡϑʔ → ϦΫϧʔτςΫϊϩδʔζ → ϑϦʔϥϯε ݱࡏͷࣄ k8sʹΑΔϚΠΫϩαʔϏεͷͨΊͷج൫ͮ͘Γͱӡ༻ ࠓޙͷํ 2021/01 ~ ࠶ͼਖ਼ࣾһΤϯδχΞʹͳΔ͔ݕ౼த KubernetesΛΰϦΰϦ͍͖͍ͬͯͨ
Slide 3
Slide 3 text
ࢲͷνʔϜ͕୲͢ΔαʔϏε ● WebϝσΟΞαʔϏε ● 2000 req ~ 4000 req / sec ● ϚΠΫϩαʔϏεΞʔΩςΫνϟ ● GKEͰӡ༻
Slide 4
Slide 4 text
ΞʔΩςΫνϟ Ingress Gateway Service A Service B Service C LB CDN
Slide 5
Slide 5 text
ΞʔΩςΫνϟ Ingress Gateway Service A Service B Service C LB CDN γϯάϧ ΫϥελͰӡ༻
Slide 6
Slide 6 text
՝ʹͳ͍ͬͯΔϙΠϯτ ΫϥελͷԘ௮͚Խ
Slide 7
Slide 7 text
ӡ༻՝ Ԙ௮͚Խͱʁ ● ΫϥελΞοϓάϨʔυϦεΫ ● IstioͳͲͷίΞίϯϙʔωϯτͷΞο ϓάϨʔυϦεΫ ݁Ռ ͏͔ͭʹ৮ΕͣԘ௮͚Խ
Slide 8
Slide 8 text
ӡ༻՝ Ԙ௮͚Խͱʁ ● ΫϥελΞοϓάϨʔυϦεΫ ● IstioͳͲͷίΞίϯϙʔωϯτͷΞο ϓάϨʔυϦεΫ ݁Ռ ͏͔ͭʹ৮ΕͣԘ௮͚Խ ϚϧνΫϥελԽͷඞཁੑʂ
Slide 9
Slide 9 text
վળʹ͋ͨΔཁٻ Ͳ͏ͯ͠ϚϧνΫϥελԽ͢Δ͔ʁ ● Ϋϥελ͝ͱʹϩʔϦϯάΞοϓσʔτ͍ͨ͠ ● ൃੜ͙࣌͢ʹFail Over͠ɺোΫϥελͷϧʔςΟϯάε τοϓ͍ͨ͠
Slide 10
Slide 10 text
ϚϧνΫϥελͷ࣮ݱํ๏ ● AnthosΞʔΩςΫνϟͷϞφλΠθʔ γϣϯΛςʔϚʹ༷ʑͳϓϩμΫτΛఏ ڙʂ ● Ingress For Anthosͱ͍͏ϓϩμΫτ͕Ϛ ϧνΫϥελԽΛαϙʔτ GCP Anthos
Slide 11
Slide 11 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos ● ୯ҰVIPͷLB ● IP AnycastͰཧࢄ
Slide 12
Slide 12 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos
Slide 13
Slide 13 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos ઃఆ༻ͷCustomResource ΛDeploy͢ΔΫϥελ
Slide 14
Slide 14 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos Managed Controller ͕LBϦιʔεΛੜ
Slide 15
Slide 15 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos
Slide 16
Slide 16 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos URL Map
Slide 17
Slide 17 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos LB Backend
Slide 18
Slide 18 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos LBͷϧʔςΟϯάઃఆ ͲͷϧʔϧͰ ͲͷMCSʹྲྀ͔͢
Slide 19
Slide 19 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos Ϋϥελʹލͬͨ Podͷཧάϧʔϐϯά
Slide 20
Slide 20 text
Ingress For Anthos Ҿ༻: https://cloud.google.com/kubernetes-engine/docs/concepts/ingress-for-anthos MCS͔Βࣗಈతʹੜ NEGͱͯ͠ LBͷόοΫΤϯυʹొ
Slide 21
Slide 21 text
ߟྀ͢Δ՝ ߟྀϙΠϯτ ● Fail Overͷ݅ʁ ● HealthCheckͰԿΛ୲อ͢Δ͔ʁ ● αʔϏε͝ͱʹFail OverՄೳ͔ʁ
Slide 22
Slide 22 text
ߟྀ͢Δ՝ FailOverͷ݅ ● Health Check͕ࣦഊͨ͠ΒFail Over
Slide 23
Slide 23 text
ߟྀ͢Δ՝ αʔϏε͝ͱͷFail Over ● Istio ͷSingle Control Plane of Multi Cluster ύλʔϯͳΒՄೳ ● Traffic DirectorͳͲΛ͑ڪΒ͘Մೳ ● ಛघͳߏΛऔΕՄೳ
Slide 24
Slide 24 text
ߟྀ͢Δ՝ αʔϏε͝ͱͷFail Over ● Istio ͷSingle Control Plane of Multi Cluster ύλʔϯͳΒՄೳ ● Traffic DirectorͳͲΛ͑ڪΒ͘Մೳ ● ಛघͳߏΛऔΕՄೳ Too HeavyͳͷͰ Ұ୴அ೦
Slide 25
Slide 25 text
ݕ౼ͨ͠ಛघΞʔΩςΫνϟ
Slide 26
Slide 26 text
ߟྀ͢Δ՝ कΓ͍ͨͷ k8sIstioىҼͰ αʔϏεͷμϯλΠϜ͕ͳ͍͜ͱ ࣮ ΫϥελʹͬͯΔαʔϏε͕ શ෦HealthyͳΒ HealthyΛฦ͢ ಠࣗαʔϏεΛར༻ Health CheckͰԿΛ୲อ͢Δʁ
Slide 27
Slide 27 text
ߟྀ͢Δ՝ ಠࣗHealth Checker ● Ϋϥελߋ৽͚࣌ͩɺશαʔϏεͷHealth CheckϞʔυ ● ͦΕҎ֎ͷฏৗ࣌ɺಛʹԿͤͣ200Λฦ٫
Slide 28
Slide 28 text
ߟྀ͢Δ՝ ಠࣗHealth Checker ● Ϋϥελߋ৽͚࣌ͩɺશαʔϏεͷHealth CheckϞʔυ ● ͦΕҎ֎ͷฏৗ࣌ɺಛʹԿͤͣ200Λฦ٫ ● LBͷϨΠϠͰΫϥελ͚ͩ νΣοΫ ● ΞϓϦέʔγϣϯ ArgoRolloutͳͲͰؤுΔ
Slide 29
Slide 29 text
ϚϧνΫϥελΞʔΩςΫνϟ Ingress Gateway Service A Service B Service C LB Ingress Gateway Service A Service B Service C CDN ࠷ऴతͳߏ Health Checker Health Checker
Slide 30
Slide 30 text
Pros/Cons Pros ● DNS ͳͲͷTTLʹࢧ͞Εͳ͍ ● ཧࢄͰ࠷దͳϧʔςΟϯά ● ಉҰϦʔδϣϯͷϚϧνΫϥελͳΒκʔϯͰۉҰࢄ ● ҙ֎ͱ͍҆
Slide 31
Slide 31 text
Pros/Cons Cons ● ྑ͘ѱ͘κʔϯͰۉҰࢄ ○ ΧφϦΞͰ͖ͳ͍ ○ ҰؾʹτϥϑΟοΫ͕ྲྀΕΔ͜ͱ͋Δ ○ Podͷκʔϯ͝ͱͷࢄঢ়گߟྀ͞Εͳ͍ ● Config Cluster͕༨ʹඞཁ ● ෳࡶͳϧʔςΟϯά͍ͨ͠߹URL Mapͷ੍ʹҙ
Slide 32
Slide 32 text
Follow Me!! @taisho6339
Slide 33
Slide 33 text
Thank you for listening!