6 min readcode.live
Kubernetes YAML: What a Deployment, Service, and Ingress Each Actually Do
Three resource types cover most of what you need to expose an app on Kubernetes. Here's how they fit together.
Three layers, three jobs
A Deployment manages a set of identical pod replicas and handles rolling updates. A Service gives those pods a stable internal address, since pod IPs change every time they're rescheduled. An Ingress routes external HTTP(S) traffic to the right Service based on hostname or path — none of the three does another's job.
Where people get stuck
- Service selectors must match Deployment pod labels exactly — a typo means zero endpoints, silently
- Readiness probes control when a pod receives traffic; liveness probes control when it gets restarted — mixing them up causes flapping
- resources.requests vs resources.limits: requests affect scheduling, limits affect throttling/OOM kills
- An Ingress needs an Ingress Controller actually running in the cluster — the resource alone does nothing
Try it on code.live
code.live's Kubernetes YAML Generator scaffolds a Deployment, Service, and Ingress together with matching labels/selectors, so you skip the copy-paste-typo step that breaks routing.
Key takeaways
- Apply one concrete change from this post before collecting more reading.
- Prefer browser-side tools when the work involves secrets, tokens, or PII.
- Document the why next to the how so the next reviewer inherits context.
FAQ
- Who is this guide on kubernetes for?
- Working developers who need a practical take on kubernetes yaml: what a deployment, service, and ingress each actually do — not a marketing overview. Skim the sections, apply one tip, then come back when you hit an edge case.
- Do I need an account to use the related tools?
- No. code.live tools run in your browser with no signup. Nothing you paste is uploaded to a server for the client-side utilities linked from this post.
- How often is this article updated?
- This post was published August 24, 2026. Fundamentals stay stable; check linked tool pages and official docs when version-specific behavior matters.