Deploying with Kubernetes: A Practical Guide
A hands-on walkthrough of deploying a containerized service to Kubernetes, from Dockerfile to rollout.
N
Nimbus Team
2 min read
Getting a service running reliably on Kubernetes comes down to a handful of building blocks: a container image, a Deployment, and a Service to expose it. This walkthrough covers the essentials.
Before you start
You’ll need
kubectl configured against a cluster (Minikube, kind, or a
managed cluster all work fine for this walkthrough).1. Build and tag the image
| |
2. Define the Deployment
| |
3. Roll it out
bash
dev@k8s-master:~/api$
kubectl apply -f deployment.yaml
deployment.apps/api created
kubectl rollout status deployment/api
deployment “api” successfully rolled out
Watch your readiness probes
A missing or too-strict readiness probe is the most common cause of a rollout
that “succeeds” but serves traffic to pods that aren’t actually ready.
Architecture
Request flow
graph LR
A[Client] --> B[Ingress]
B --> C[Service]
C --> D[Pod 1]
C --> E[Pod 2]
C --> F[Pod 3]
That’s the core loop: build, define, apply, verify. From here you’d typically
add a HorizontalPodAutoscaler and wire this into CI so every merge to main
triggers a new rollout automatically.
N
Nimbus Team
Last updated January 15, 2023
Edit this page