This document discusses Kubernetes services and provides examples of how they work. It begins by explaining that Kubernetes services define a logical set of pods and a policy by which to access them. It then demonstrates creating Nginx and MongoDB pods and deploying ClusterIP and NodePort services to access the Nginx pods. The ClusterIP service provides an internal IP for pod to pod communication while the NodePort maps an external port to the ClusterIP for external access. The document aims to explain how Kubernetes services work at a basic level.
4. • , Kubernetes :
• Part#1 - Kubernetes
• Part#2 - Kubernetes Service Deployment Pod
• Part#3 - Kubernetes I Ingress
5. • kubectl D SDK
• T b O
tT
Provision r RBAC Quota
PSP NetworkPolicy
• e
f s
DNS g
• Kubernetes h t K
API i t
n
• t
O Tt
• Kubernetes u
CI CD Workflow
FaaS OTS ChatOps
• Kubernetes CRI CNI
CVI Cloud Provider
t
6. Agenda
1. The basic knowledge of Kubernetes
Service concept
2. Demo how Kubernetes Service works
3. Summary
6
19. • Kubernetes Service w S
1. Service v T
Mongo pods
Kubernetes service v
TMongo pod IP
2. Service H FQDN
T o
App FQDN
Mongo pod App e
FQDN l T
Mongo pod Service
20. • Kubernetes Service T
kubernetes e H S ( re-try
)
1. Mongo H e( Pod )
2. Kubernetes Service e Service
Mongo H
3. S S (2) kubernetes
service FQDN
21. -
• P b e i
n g IP
• Kubernetes Service Types pb s :
• ClusterIP (r )
• NodePort
• LoadBalancer
• ExternalName
• c b ClusterIP NodePort
l hb
22. • ClusterIP I / c
FQDN S
• CT c kubernetes e i
c FQDN P
kubernetes dns : IP
23. • NodePort P ClusterIP
/ Nc
• : T d NodePort
i (S e kubernetes
24. • kubernetes service FQDN
H
• e H ?
• o NodePort
lH v Port H
• LoadBalancer T
H S , cloud provider
LoadBalancer ,
41. • Kubernetes Service, Service Service
• ClusterIP NodePort
• ClusterIP/NodePort S
service Kubernetes
42. • 82 ? ? ?K9 7 1K 5? NC ? P
• IK C H D ? ? ?K K? NC ? C
• H /H?K 6 ? 2 ? ? ?K ? H DC 7H D
• IK ? C H - H: ( H H?K ?
D ? ? ?K ? H DC H D I ?) @ @@ @
• 2 ? ? ?K .H ?I 5? NC ?K
• IK D ? ? ?K CH H K H ?I K K? NC ?K
? H DC K? NC ?