โ Kubernetes Administrator (CKA) Exam Practice learning pathKubernetes Administrator (CKA) Exam Practice ยท Module 5 of 10
Services and networking
Exposing and connecting pods.
๐ Key ideas
- Services give stable virtual IPs and DNS names to sets of pods selected by labels.
- Types: ClusterIP (internal), NodePort (port on each node, default range 30000 to 32767), LoadBalancer (cloud LB) and ExternalName.
- CoreDNS resolves names like web.default.svc.cluster.local.
- Ingress routes HTTP/HTTPS by host and path through an ingress controller; the Gateway API is the newer approach.
- NetworkPolicies restrict pod traffic; they need a CNI plugin that supports them.
๐ก Real-life example: Like a company switchboard number (Service) that connects to whichever staff member (pod) is available.
ClusterIPInternal-only service IP
NodePortExposes service on a port of every node
IngressHTTP routing into the cluster
NetworkPolicyRules restricting pod traffic