SlideShare a Scribd company logo
Babel Coder
1. CONTAINER ORCHESTRATION
https://kubernetes.io/docs/concepts/architecture/
Babel Coder
1. CONTAINER ORCHESTRATION
Babel Coder
2. PODS
$ kubectl run site --image=babelcoder/intro-to-devops-ui:1.0
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
site 1/1 Running 0 2m1s
$ kubectl port-forward site 5151:80
Forwarding from 127.0.0.1:5151 -> 80
Forwarding from [::1]:5151 -> 80
Babel Coder
2. PODS
$ kubectl port-forward site 5151:80
Forwarding from 127.0.0.1:5151 -> 80
Forwarding from [::1]:5151 -> 80
kubectl
5151 kube API
server
Pod
44
3
80
localhos
t
Kubernetes Cluster
Babel Coder
2. PODS
$ kubectl delete pod site
pod "site" deleted
Babel Coder
/usr/share/nginx/htm
l
index.htm
l
3. MULTI-CONTAINER DESIGN PATTERNS
site
init
Init Containers
api
ambassado
r
Ambassador
Pattern
localhost:637
9
redis
pod
redis
redis:637
9
Babel Coder
3. MULTI-CONTAINER DESIGN PATTERNS
site
lo
g
Sidecar
Pattern
api redis
pod
Volume
log
transformer
Volume
site
Adapter
Pattern
Babel Coder
4. DEPLOYMENTS
Deployment ReplicaSet Pods
Manage
s
Manage
s
Babel Coder
4. DEPLOYMENTS
ReplicaSet
Deployment
app=site app=site
app=site
app=api
$ kubectl apply -f deployment.yaml
deployment.yaml
Babel Coder
Target Pod
Target Pod Target Pod Source Pod
Cluster IP
5. SERVICES - CLUSTER IP
Kubernetes Cluster
Node Node
Internal
Communication
(api
)
(db
)
(db
)
(db
)
service.yaml
Babel Coder
5. SERVICES - CLUSTER IP
Kubernetes Cluster
Target Pod
Target Pod Target Pod Source Pod
Cluster IP
Node Node
Internal
Communication
(api
)
(db
)
(db
)
(db
)
$ $ kubectl apply -f service.yaml
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
db ClusterIP 10.102.134.43 <none> 6379/TCP 3s
$ kubectl describe svc db
TargetPort: 6379/TCP
Endpoints: 10.1.0.26:6379,10.1.0.30:6379,10.1.0.32:6379
$ kubectl run busybox --rm --restart Never -it --
image=busybox
/ # telnet db 6379
Connected to db
Babel Coder
Target Pod
Target Pod Target Pod
Cluster IP
Node Port - 32074 Node Port - 32074
5. SERVICES - NODEPORT
Kubernetes Cluster
(api
)
(api
)
(api
)
service.yaml
Babel Coder
5. SERVICES - NODEPORT
Kubernetes Cluster
Target Pod
Target Pod Target Pod
Cluster IP
Node Port - 32074 Node Port - 32074
(api)
(api)
(api)
$ kubectl apply -f service.yaml
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
api NodePort 10.100.61.121 <none> 5152:32074/TCP 14m
$ kubectl describe svc api
Port: <unset> 5152/TCP
TargetPort: 3000/TCP
NodePort: <unset> 32074/TCP
Endpoints: 10.1.0.27:3000,10.1.0.28:3000,10.1.0.34:3000
$ curl localhost:32074
Babel Coder
Target Pod
Target Pod Target Pod
Cluster IP
Node Port - 32074 Node Port - 32074
5. SERVICES - LOADBALANCER
Load Balancer
Kubernetes Cluster
(api
)
(api
)
(api
)
service.yaml
Babel Coder
Target Pod
Target Pod Target Pod
Cluster IP
Node Port - 30575 Node Port - 30575
5. SERVICES - LOADBALANCER
Load Balancer
Kubernetes Cluster
(api
)
(api
)
(api
)
$ kubectl apply -f service.yaml
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
site LoadBalancer 10.96.239.241 localhost 5151:30575/TCP 34m
$ kubectl describe svc api
Port: <unset> 5151/TCP
TargetPort: 80/TCP
NodePort: <unset> 30575/TCP
Endpoints: 10.1.0.29:80,10.1.0.31:80,10.1.0.33:80
Session Affinity: None
External Traffic Policy: Cluster
$ curl localhost:5151
Babel Coder
6. CONFIGMAP
docker-compose.yml
Babel Coder
6. CONFIGMAP
docker-compose.yml config-map.yaml
Babel Coder
6. CONFIGMAP
config-map.yaml
deployment.yaml
Babel Coder

More Related Content

PDF
Kubernetes From Scratch .pdf
PDF
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
PDF
Kubernetes networking & Security
PPTX
Kubernetes for Beginners: An Introductory Guide
PDF
Deep dive into Kubernetes Networking
PPTX
Docker Kubernetes Istio
PPTX
Introduction to Kubernetes
PDF
Kubernetes 101
Kubernetes From Scratch .pdf
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
Kubernetes networking & Security
Kubernetes for Beginners: An Introductory Guide
Deep dive into Kubernetes Networking
Docker Kubernetes Istio
Introduction to Kubernetes
Kubernetes 101

What's hot (20)

PDF
Docker Networking Deep Dive
PDF
Cloudera Impala 1.0
PDF
Android Binder IPC for Linux
PDF
Kubernetes internals (Kubernetes 해부하기)
PPTX
Introduction to Koltin for Android Part I
PDF
Ansible Tutorial.pdf
PPTX
Introduction to Ansible
PDF
Google Cloud Networking Deep Dive
PDF
Storing 16 Bytes at Scale
PDF
SeaweedFS introduction
PDF
Kubernetes extensibility: CRDs & Operators
PDF
Best practices for Terraform with Vault
PPTX
Traditional Firewall vs. Next Generation Firewall
PPTX
Kubernetes
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
PPTX
Kubernetes & Google Kubernetes Engine (GKE)
PDF
DRP (Stretch Cluster) for HDP - Future of Data : Paris
PPT
F5 link controller
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
PPTX
AWS solution Architect Associate study material
Docker Networking Deep Dive
Cloudera Impala 1.0
Android Binder IPC for Linux
Kubernetes internals (Kubernetes 해부하기)
Introduction to Koltin for Android Part I
Ansible Tutorial.pdf
Introduction to Ansible
Google Cloud Networking Deep Dive
Storing 16 Bytes at Scale
SeaweedFS introduction
Kubernetes extensibility: CRDs & Operators
Best practices for Terraform with Vault
Traditional Firewall vs. Next Generation Firewall
Kubernetes
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Kubernetes & Google Kubernetes Engine (GKE)
DRP (Stretch Cluster) for HDP - Future of Data : Paris
F5 link controller
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
AWS solution Architect Associate study material
Ad

Similar to 5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf (20)

PDF
Kubernetes Networking
PDF
Docker, Kubernetes, and Google Cloud
PDF
Ports, pods and proxies
PPTX
Introduction to Kubernetes
PDF
Deep dive in container service discovery
PDF
Networking in Kubernetes
PDF
Kubernetes
PDF
Multinode kubernetes-cluster
PDF
[Hands-on] Kubernetes | Nov 18, 2017
PDF
Kubernetes - Sailing a Sea of Containers
PPTX
Deploying your web application with AWS ElasticBeanstalk
PDF
Learning kubernetes
PPTX
Running Docker in Development & Production (DevSum 2015)
PDF
DevOpSec_KubernetesOperatorUsingJava.pdf
PDF
Shakr - Container CI/CD with Google Cloud Platform
PPTX
Architecting .NET Applications for Docker and Container Based Deployments
PPTX
Running Docker in Development & Production (#ndcoslo 2015)
PDF
Kubernetes Basics for Connections Admins
PDF
Social Connections 14 - Kubernetes Basics for Connections Admins
PPTX
Nynog-K8s-networking-101.pptx
Kubernetes Networking
Docker, Kubernetes, and Google Cloud
Ports, pods and proxies
Introduction to Kubernetes
Deep dive in container service discovery
Networking in Kubernetes
Kubernetes
Multinode kubernetes-cluster
[Hands-on] Kubernetes | Nov 18, 2017
Kubernetes - Sailing a Sea of Containers
Deploying your web application with AWS ElasticBeanstalk
Learning kubernetes
Running Docker in Development & Production (DevSum 2015)
DevOpSec_KubernetesOperatorUsingJava.pdf
Shakr - Container CI/CD with Google Cloud Platform
Architecting .NET Applications for Docker and Container Based Deployments
Running Docker in Development & Production (#ndcoslo 2015)
Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections Admins
Nynog-K8s-networking-101.pptx
Ad

More from NuttavutThongjor1 (20)

PDF
Modern DevOps Day 5.pdfModern DevOps Day 5.pdf
PDF
Modern DevOps Day 4.pdfModern DevOps Day 4.pdf
PDF
Modern DevOps Day 3.pdfModern DevOps Day 3.pdf
PDF
Modern DevOps Day 2.pdfModern DevOps Day 2.pdf
PDF
Modern DevOps Day 1.pdfModern DevOps Day 1.pdfModern DevOps Day 1.pdf
PDF
misc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdf
PDF
Nest.js Microservices (1).pdf Nest.js Microservices (1).pdfNest.js Microservi...
PDF
Nest.js Microservices.pdfNest.js Microservices.pdfNest.js Microservices.pdfNe...
PDF
GraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdf
PDF
Nest.js RESTful API development.pdf Nest.js RESTful API development.pdf
PDF
Nest.js RESTful API development.pdfNest.js RESTful API development.pdf
PDF
Recap JavaScript and TypeScript.pdf Recap JavaScript and TypeScript.pdf
PDF
Next.js web development.pdfNext.js web development.pdfNext.js web development...
PDF
Next.js web development.pdfNext.js web development.pdfNext.js web development...
PDF
Fullstack Nest.js and Next.js.pdfFullstack Nest.js and Next.js.pdfFullstack N...
PDF
Recap JavaScript and TypeScript.pdf Recap JavaScript and TypeScript.pdf
PDF
Intro to Modern DevOps.pdfIntro to Modern DevOps.pdfIntro to Modern DevOps.pdf
PDF
10 วัฒนธรรมองค์กรของ DevOps.pdf10 วัฒนธรรมองค์กรของ DevOps.pdf
PDF
9 logging and monitoring.pdf 9 logging and monitoring.pdf
PDF
8 iac.pdf 8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf
Modern DevOps Day 5.pdfModern DevOps Day 5.pdf
Modern DevOps Day 4.pdfModern DevOps Day 4.pdf
Modern DevOps Day 3.pdfModern DevOps Day 3.pdf
Modern DevOps Day 2.pdfModern DevOps Day 2.pdf
Modern DevOps Day 1.pdfModern DevOps Day 1.pdfModern DevOps Day 1.pdf
misc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdfmisc.pdf
Nest.js Microservices (1).pdf Nest.js Microservices (1).pdfNest.js Microservi...
Nest.js Microservices.pdfNest.js Microservices.pdfNest.js Microservices.pdfNe...
GraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdfGraphQL.pdf
Nest.js RESTful API development.pdf Nest.js RESTful API development.pdf
Nest.js RESTful API development.pdfNest.js RESTful API development.pdf
Recap JavaScript and TypeScript.pdf Recap JavaScript and TypeScript.pdf
Next.js web development.pdfNext.js web development.pdfNext.js web development...
Next.js web development.pdfNext.js web development.pdfNext.js web development...
Fullstack Nest.js and Next.js.pdfFullstack Nest.js and Next.js.pdfFullstack N...
Recap JavaScript and TypeScript.pdf Recap JavaScript and TypeScript.pdf
Intro to Modern DevOps.pdfIntro to Modern DevOps.pdfIntro to Modern DevOps.pdf
10 วัฒนธรรมองค์กรของ DevOps.pdf10 วัฒนธรรมองค์กรของ DevOps.pdf
9 logging and monitoring.pdf 9 logging and monitoring.pdf
8 iac.pdf 8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf8 iac.pdf

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
master seminar digital applications in india
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Types and Its function , kingdom of life
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Complications of Minimal Access Surgery at WLH
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
What if we spent less time fighting change, and more time building what’s rig...
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Practical Manual AGRO-233 Principles and Practices of Natural Farming
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
01-Introduction-to-Information-Management.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Cell Structure & Organelles in detailed.
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
master seminar digital applications in india
Module 4: Burden of Disease Tutorial Slides S2 2025
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Types and Its function , kingdom of life
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Microbial disease of the cardiovascular and lymphatic systems
A systematic review of self-coping strategies used by university students to ...
Complications of Minimal Access Surgery at WLH
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf

5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf

  • 4. 2. PODS $ kubectl run site --image=babelcoder/intro-to-devops-ui:1.0 $ kubectl get pod NAME READY STATUS RESTARTS AGE site 1/1 Running 0 2m1s $ kubectl port-forward site 5151:80 Forwarding from 127.0.0.1:5151 -> 80 Forwarding from [::1]:5151 -> 80 Babel Coder
  • 5. 2. PODS $ kubectl port-forward site 5151:80 Forwarding from 127.0.0.1:5151 -> 80 Forwarding from [::1]:5151 -> 80 kubectl 5151 kube API server Pod 44 3 80 localhos t Kubernetes Cluster Babel Coder
  • 6. 2. PODS $ kubectl delete pod site pod "site" deleted Babel Coder
  • 7. /usr/share/nginx/htm l index.htm l 3. MULTI-CONTAINER DESIGN PATTERNS site init Init Containers api ambassado r Ambassador Pattern localhost:637 9 redis pod redis redis:637 9 Babel Coder
  • 8. 3. MULTI-CONTAINER DESIGN PATTERNS site lo g Sidecar Pattern api redis pod Volume log transformer Volume site Adapter Pattern Babel Coder
  • 9. 4. DEPLOYMENTS Deployment ReplicaSet Pods Manage s Manage s Babel Coder
  • 10. 4. DEPLOYMENTS ReplicaSet Deployment app=site app=site app=site app=api $ kubectl apply -f deployment.yaml deployment.yaml Babel Coder
  • 11. Target Pod Target Pod Target Pod Source Pod Cluster IP 5. SERVICES - CLUSTER IP Kubernetes Cluster Node Node Internal Communication (api ) (db ) (db ) (db ) service.yaml Babel Coder
  • 12. 5. SERVICES - CLUSTER IP Kubernetes Cluster Target Pod Target Pod Target Pod Source Pod Cluster IP Node Node Internal Communication (api ) (db ) (db ) (db ) $ $ kubectl apply -f service.yaml $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE db ClusterIP 10.102.134.43 <none> 6379/TCP 3s $ kubectl describe svc db TargetPort: 6379/TCP Endpoints: 10.1.0.26:6379,10.1.0.30:6379,10.1.0.32:6379 $ kubectl run busybox --rm --restart Never -it -- image=busybox / # telnet db 6379 Connected to db Babel Coder
  • 13. Target Pod Target Pod Target Pod Cluster IP Node Port - 32074 Node Port - 32074 5. SERVICES - NODEPORT Kubernetes Cluster (api ) (api ) (api ) service.yaml Babel Coder
  • 14. 5. SERVICES - NODEPORT Kubernetes Cluster Target Pod Target Pod Target Pod Cluster IP Node Port - 32074 Node Port - 32074 (api) (api) (api) $ kubectl apply -f service.yaml $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE api NodePort 10.100.61.121 <none> 5152:32074/TCP 14m $ kubectl describe svc api Port: <unset> 5152/TCP TargetPort: 3000/TCP NodePort: <unset> 32074/TCP Endpoints: 10.1.0.27:3000,10.1.0.28:3000,10.1.0.34:3000 $ curl localhost:32074 Babel Coder
  • 15. Target Pod Target Pod Target Pod Cluster IP Node Port - 32074 Node Port - 32074 5. SERVICES - LOADBALANCER Load Balancer Kubernetes Cluster (api ) (api ) (api ) service.yaml Babel Coder
  • 16. Target Pod Target Pod Target Pod Cluster IP Node Port - 30575 Node Port - 30575 5. SERVICES - LOADBALANCER Load Balancer Kubernetes Cluster (api ) (api ) (api ) $ kubectl apply -f service.yaml $ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE site LoadBalancer 10.96.239.241 localhost 5151:30575/TCP 34m $ kubectl describe svc api Port: <unset> 5151/TCP TargetPort: 80/TCP NodePort: <unset> 30575/TCP Endpoints: 10.1.0.29:80,10.1.0.31:80,10.1.0.33:80 Session Affinity: None External Traffic Policy: Cluster $ curl localhost:5151 Babel Coder