Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
managed_Kubernetes_on-premises.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yuhara
December 05, 2018
Technology
890
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
managed_Kubernetes_on-premises.pdf
yuhara
December 05, 2018
More Decks by yuhara
See All by yuhara
Introduce Conftest
yuhara
2
560
Other Decks in Technology
See All in Technology
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
350
Claude Codeをどのように キャッチアップしているか
oikon48
13
8.1k
AAIFに入ってみた ~内から見えるコミュニティ動向~
sato4
0
240
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
190
自宅LLMの話
jacopen
1
590
小さく始める AI 活用推進 ― 日経電子版 Web チームの事例/nikkei-tech-talk47
nikkei_engineer_recruiting
0
270
【2026年版】 ベクトル検索䛸 Embedding最前線
mocobeta
0
160
LLMにもCAP定理があるという話
harukasakihara
0
380
AGENTS.mdとSkillsで始めるAIエージェント活用
sonoda_mj
3
210
【NRUG vol.18】KubernetesにおけるNew Relicデータ取得量削減の考え方
nrug_member
0
120
Android の公式 Skill / Android skills
yanzm
0
150
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
610
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
A better future with KSS
kneath
240
18k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
New Earth Scene 8
popppiees
3
2.3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
We Are The Robots
honzajavorek
0
250
Scaling GitHub
holman
464
140k
Transcript
ΦϯϓϨͩͬͯ͜͜·ͰͰ͖Δ KubernetesͰ࡞ΔࣗલPaaS Takaaki Yuhara Infrastructure Service Group Gurunavi, Inc. 2018.12.04
Japan Container Days v18.12
Takaaki Yuhara Infrastructure Engineer 2014~ ͙Δͳͼ ɹ͙ΔͳͼશͯͷαΠτΠϯϑϥͷߏஙͱӡ༻ ɹVirtualization/OS/Middleware/Container/k8s…ϨΠϠʔΛ୲ ɹΠϯϑϥͷίʔυԽɾࣗಈԽɺࢹςετͷ࠷దԽ etc…
ΦϯϓϨKubernetes kubeadm, Rancher, RKEͳͲɺखܰʹΦϯϓ ϨϛεͰߏஙͰ͖ΔΑ͏ʹͳΓ·ͨ͠ɻ ςʔϚɿΦϯϓϨKubernetesΛͲͷΑ͏ʹ׆༻͢Δ͔
Kubernetesに詳しくなくても誰でも簡単に使えるプラットフォーム
γεςϜ֓ཁ Generator API Management Console Load Barancer Ingress Service Deployment
Namespace
γεςϜ֓ཁ Generator API Management Console Load Barancer ར༻ऀManagement Console͔ Βඞཁࣄ߲Λೖྗ͠ར༻։࢝Ϙλϯ
ΛΫϦοΫ
γεςϜ֓ཁ Generator API Management Console Load Barancer Generator APIͷ֤छδϣϒʹϦΫ Τετ͕Δ
γεςϜ֓ཁ Generator API Management Console Load Barancer Ingress Service Deployment
Namespace Kubernetes APIΛ௨ͯ͡ NamespaceඞཁͱͳΔϦιʔ ε܈Λ࡞
γεςϜ֓ཁ Generator API Management Console Load Barancer Ingress Service Deployment
Namespace GitLab APIΛ௨ͯ͡ϓϩδΣΫτ ͷ࡞ʢςϯϓϨʔτ͔ΒͷΠϯ ϙʔτʣͱCI/CD༻ͷVariablesͷ ઃఆ Container Registryར༻Մ
γεςϜ֓ཁ Generator API Management Console Load Barancer Ingress Service Deployment
Namespace LoadBalancerʢk8sͷ֎ʣͷઃఆ Λมߋ͠ΫϥΠΞϯτ͔ΒͷΤϯυ ϙΠϯτΛఏڙ
• Kubernetes ্ͷNamespace֤छϦιʔε܈ • ΞϓϦέʔγϣϯʹର͢ΔΤϯυϙΠϯτ • GitLab ͷ Projectʢ֤छઃఆ͕ࢪ͞Εͨঢ়ଶʣ Management
Console ͔Β࡞ ޙΞϓϦΛ࡞ͯ͠Commit & Push͢Δ͚ͩ
Kubernetes Resouce Generator • KubernetesͷϦιʔε܈Λ࡞ΔͨΊʹಠࣗʹ࡞ͨ͠API • YAMLϚχϡϑΣετΛapply͍ͯ͠ΔΑ͏ͳΠϝʔδ • Kubernetes client
pythonΛ༻ • Officialʹఏڙ͞Ε͍ͯΔgopythonͷClient Library ɹɹhttps://github.com/kubernetes-client/python ɹɹhttps://github.com/kubernetes/client-go • Python FlaskͰREST APIԽ
Kubernetes Client Python ྫʣNamespaceͷ࡞
DeployͷྲྀΕ
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace Container Registry
ίʔυΛGitLabͷϓϩδΣΫ τʹରͯ͠Commit / Push
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace Container Registry
GitLab CI͕։࢝͞Εk8s্ͷrunner ʹରͯ͠Pipelineͷ࣮ߦΛ໋ྩ
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace workspace Container
Registry #01 Build Stage Kubernetes্ͰίϯςφϏϧυ ༻ͷίϯςφΛ࣮ߦ
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace workspace Container
Registry #01 Build Stage GitLabͷProjectΛclone͠ DockerfileΛݩʹΠϝʔδϏϧυ
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace workspace Container
Registry #01 Build Stage ϏϧυΠϝʔδΛGitLab Container RegistryʹPush
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace workspace Container
Registry #02 Deploy Stage Runner͔ΒDeploy༻ͷίϯςφ Λىಈɻ Kubernetes APIΛ௨ͯ͡ Deploymentʹରͯ͠Rolling updateΛ໋ྩ
γεςϜ֓ཁ Developer Load Barancer Ingress Service Deployment Namespace Container Registry
ϏϧυΠϝʔδ͔ΒRolling updateΛ࣮ߦ
GitLab & GitLab CI • GitLabɺGitLab Container RegistryΛར༻ • CI/CDδϣϒKubernetes
executorͰ࣮ߦ • .gitlab-ci.ymlͰύΠϓϥΠϯΛఆٛ͠ɺ࣮ߦ͍ͨ͠ॲཧͱɺͦͷॲཧΛ ࣮ߦ͢ΔϕʔεΠϝʔδΛબʢServerlessͳײ֮ʣ • εςʔδຖʹtagΛࢦఆ͢Δ͜ͱͰɺDevelop/Staging/Productionͱ ͍ͬͨܗͰ࣮ߦڥΛ͚ΒΕΔ Build to develop stage: build only: - /^develop.*/ image: gcr.io/kaniko-project/executor:debug script: - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination …(লུ) tags: - develop .gitlab-ci.ymlͷҰ෦Λൈਮ
Kubernetes ExecutorΛͬͨPipeline • #01 Build Stage • Builderͱͯ͠dind(docker in docker)
͔ kanikoͷબ͕Մ • kanikoGoogle͕։ൃ͢ΔϏϧμʔɻKubernetes্ͰΠϝʔδ Ϗϧυ͢Δ͜ͱΛఆ͠privilegedແ͠ͰϏϧυՄ ɹɹhttps://github.com/GoogleContainerTools/kaniko • #02 Deploy Stage • Kubernetes client pythonͰ࡞ͨ͠ಠࣗπʔϧΛ༻ • Rolling update ຊ൪ͰͷB/G DeploymentɺRollbackʹର Ԡ
FeatureϒϥϯνରԠ • FeatureϒϥϯνΛ࡞͢Δ ͱͦΕʹରԠͨ͠Endpointͱ Service/DeploymentΛࣗಈ తʹߏ • GitLab CIͱ࿈ಈ͠ϒϥϯν໊ ʹԠͨ͡Development͕ߋ
৽͞ΕΔ Ingress Service Deployment Service Deployment Service Deployment a.com b.com c.com develop branch feature/a branch feature/b branch
։ൃϑϩʔ develop staging release master feature/a ֤ϒϥϯνͰͷCommitMerge୯ҐͰCI/CDΛ࣮ߦ ӡ༻Gitૢ࡞Ͱ݁ ϓϧϦΫΤετɺϨϏϡʔɺϚʔδ ͷϓϩηεΛճ͢ࣄʹूத
tag v1.1.0
• Push Code, Not Container • ӡ༻ϓϧϦΫΤετͰ࣮ߦ͞ΕΔ Weaveworks : Alexis
Richardsonࢯ • kubectlͷίϚϯυϥΠϯπʔϧΘͳ͍ʢGitૢ࡞ͷΈʣ • GitͱγεςϜͷঢ়ଶ͕ඞ͍ͣ͠ɺGitΛਅͱ͢Δߟ͑ • γεςϜΛGitཧ͢Δ GitOps
·ͱΊ • Kubernetes্ͷϦιʔε܈Load Balancer / GitLab Project ͷ࡞ΛAPIΛ௨ͯࣗ͡ಈԽ • Management
ConsoleΛఏڙ͠KubernetesΛநԽ • GitLab CIͱ࿈ܞ͠CI/CDΛ࣮ݱ • ӡ༻Gitૢ࡞Ͱ݁ͤ͞ಛผͳૢ࡞ෆཁ ୭Ͱ؆୯ʹ͑ΔϓϥοτϑΥʔϜͱͯ͠KubernetesΛ׆༻
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ