Automation · Kubernetes Automation
Services
Cheat sheet · https://pcornel.dk/topic.php?topic=5796
Answer
Kubernetes Services give pods a stable virtual IP and DNS name and load-balance between them, as ClusterIP, NodePort or LoadBalancer, often combined with Ingress for HTTP routing.
Remember
- Services give stable IPs and DNS names.
- Selectors must match pod labels.
- Endpoints show which pods receive traffic.
First checks
kubectl get svc,endpointslices -n <ns>— services and endpointskubectl describe svc <n>— selectors- Service type (ClusterIP/LoadBalancer) — exposure
Verify in this order
Service selector → ready pods → endpoints
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5796