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
はてなインターンシップ2024 コンテナオーケストレーション講義資料
Search
Hatena
October 31, 2024
0
830
はてなインターンシップ2024 コンテナオーケストレーション講義資料
https://hatena.co.jp/recruit/intern/2024
Hatena
October 31, 2024
Tweet
Share
More Decks by Hatena
See All by Hatena
はてなインターンシップ2024 HTTP, Web, API 講義資料
hatena
0
1.1k
はてなインターンシップ2024 RDBMS ブートキャンプ講義資料
hatena
0
920
はてなインターンシップ2024 フロントエンドブートキャンプ講義資料
hatena
0
840
はてなインターンシップ2024 コンテナ講義資料
hatena
0
940
はてなインターンシップ2024 インフラ講義資料
hatena
0
850
はてなインターンシップ2024 AI 講義資料
hatena
0
840
はてなインターンシップ2024 ブログライティング講義資料
hatena
4
3.1k
はてなリモートインターンシップ2023 Web, HTTP 講義資料
hatena
1
500
はてなリモートインターンシップ2023 Web API 講義資料
hatena
1
300
Featured
See All Featured
Music & Morning Musume
bryan
46
6.3k
Building Applications with DynamoDB
mza
93
6.2k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Practical Orchestrator
shlominoach
186
10k
Scaling GitHub
holman
459
140k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
350
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Making the Leap to Tech Lead
cromwellryan
133
9k
Transcript
ίϯςφΦʔέετϨʔγϣϯ IBUFOBJOUFSO
ࣗݾհ id:masayosu SRE IBUFOBJOUFSO
͜ͷߨٛͰֶΜͰ΄͍͜͠ͱ Kubernetes Kubernetes IBUFOBJOUFSO
ίϯςφΦʔέετϨʔγϣϯͱ IBUFOBJOUFSO
ίϯςφ Docker: Build/Ship/Run 1 1 1 IBUFOBJOUFSO
ίϯςφΦʔέετϨʔγϣϯͱ 邾丗סؤ٤طػ畘杼յ鐧יⳂ־ג״סص٭ٜ ˝ ؤ٤طػ⺱㚖ֿ鵟⟓ך׀ֹמ ˝ 舅Ⳃמؤ٤طػ畘杼ؤتع峎 ˝ 냕ַ⺎榫䓪禴䧏 IBUFOBJOUFSO
ίϯςφΦʔέετϨʔγϣϯπʔϧ͕࣋ͭ ओͳػೳ / / IBUFOBJOUFSO
ίϯςφஔͷεέδϡʔϦϯά ˝ ؤ٤طػס㲔车丗䧗㲊յאס丗דׄؤ٤طػ玮י ˝ بتطّס靷蕔ײיյלסُب٤מؤ٤طػ玮י־舅 Ⳃך鹟䥃 IBUFOBJOUFSO
ෛՙࢄ/αʔϏεσΟεΧόϦʔ IP IBUFOBJOUFSO
ηϧϑώʔϦϯά ˝ ُب٤מ꤃㲹ֿ氦榟ג㕙⺬ ˝ 塜䅻םُب٤מؤ٤طػ鿥糋泡 ˝ ؤ٤طػמ꤃㲹ֿ氦榟ג㕙⺬ ˝ 䑒釐ם⮆דׄؤ٤طػ玮י泡 ˝
ؤ٤طػ꤃㲹吾湳ג״סىٜتزؘشؠ IBUFOBJOUFSO
ΦʔτεέʔϦϯά ׆סتآ٭ٛ٤ءյ靷蕔敯媲מ䑴י舅Ⳃך车ֹ CPU IBUFOBJOUFSO
Kubernetesͱ IBUFOBJOUFSO
Kubernetesͱ kubernetes, k s Google OSS AWS EKS, Google Cloud
GKE, Azure AKS IBUFOBJOUFSO
KubernetesͰԿ͕Ͱ͖Δͷ͔ʁ ؤ٤طػ؛٭آتعٝ٭ب٘٤ص٭ٜכי䧏ח׀嚀耆┉鵟⪵נ⤓ֻיַ / / Kubernetes IBUFOBJOUFSO
એݴతͳߏཧ Kubernetes (Manifest) 3 3 2 1 㵚拨氳םסעյ杯敯־ס䄐⮆⽜♐כי鋗鳭亠䌋 IBUFOBJOUFSO
Kubernetesͷߏ IBUFOBJOUFSO
Cluster Pod IBUFOBJOUFSO
Node Pod( ) or kubelet API IBUFOBJOUFSO
Pod Pod 1 IBUFOBJOUFSO
αΠυΧʔύλʔϯ pod ( ) Proxy, , IBUFOBJOUFSO
KubernetesͷϦιʔε IBUFOBJOUFSO
ϦιʔεͷΧςΰϦ Workloads Service Con g Storage Cluster Metadata Namespace IBUFOBJOUFSO
WorkloadsΧςΰϦ ؤ٤طػס㲔车מ꞊ٛخ٭ت Pod Pod IP Replicaset Pod Pod ( )
Pod IBUFOBJOUFSO
WorkloadsΧςΰϦ Deployment Replicaset IBUFOBJOUFSO
WorkloadsΧςΰϦ ♓┖յ☪㍑ס鐐갭ךע⮵榫ם Job CronJob job IBUFOBJOUFSO
ServiceΧςΰϦ Pod Service L Ingress L IBUFOBJOUFSO
kubernetesΫϥελͷ௨৴ Pod localhost Pod Pod IP pod IP IP Pod
IP Pod IP Pod pod IBUFOBJOUFSO
Service ϩʔυόϥϯα Pod ( ) 1 pod 2 pod pod
IP ClusterIP ( ) NodePort ( ) LoadBalancer( ) etc IBUFOBJOUFSO
Service αʔϏεσΟεΧόϦ Pod DNS DNS [SERVICE].[NAMESPACE]. [RESOURCE_TYPE].cluster.local DNS A (
) account.hatena- intern.svc.cluster.local IBUFOBJOUFSO
Ingress Ingress L (AWS ALB, Google Cloud GCLB, Nginx) Ingress
HTTPS IBUFOBJOUFSO
Ϧιʔεཧ IBUFOBJOUFSO
Manifest YAML kubectl apply -f <manifest> k s (yaml) IBUFOBJOUFSO
Manifestͷαϯϓϧ(Deployment) apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app:
nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 IBUFOBJOUFSO
Manifestͷαϯϓϧ(Service) apiVersion: v1 kind: Service metadata: name: nginx-service spec: selector:
app: nginx ports: - protocol: TCP port: 80 targetPort: 80 IBUFOBJOUFSO
Ϧιʔε੍ݶ Pod CPU Pod spec: containers: - name: nginx image:
nginx:1.14.2 ports: - containerPort: 80 resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" IBUFOBJOUFSO
ϔϧενΣοΫ Pod Liveness Probe Pod Readiness Probe Pod Service IBUFOBJOUFSO
Մ༻ੑͱ֦ுੑ IBUFOBJOUFSO
Մ༻ੑ Replicaset Manifest Node Pod Node IBUFOBJOUFSO
ෛՙʹର͢Δ֦ுੑ Horizontal Pod Autoscaler (HPA) CPU Pod Vertical Pod Autoscaler
(VPA) CPU, IBUFOBJOUFSO
՝Ͱར༻͢Δπʔϧհ IBUFOBJOUFSO
Minikube Kubernetes https://minikube.sigs.k s.io/docs/start/ Kubernetes kind IBUFOBJOUFSO
Kustomize https://github.com/kubernetes-sigs/kustomize k s Dev, Stg, Prd Manifest kustomization.yaml secret
con g IBUFOBJOUFSO
Skaffold https://ska old.dev/ k s skaffold.yaml docker IBUFOBJOUFSO
·ͱΊ IBUFOBJOUFSO
Kubernetesͷྑ͍ͱ͜Ζ Pod, Node Cloud Native Computing Fondation(CNCF) https://landscape.cncf.io/ CI/CD GitOps
CI/CD Node Pod Spot IBUFOBJOUFSO
Kubernetesͷ͍͠ͱ͜Ζ 4 Blue/Green Node IBUFOBJOUFSO