13.2.2.4 Kubernetes Delivery Target
A focused guide to Kubernetes Delivery Target, connecting core concepts with practical Docker and container operations.
A Kubernetes delivery target deploys an application's container image into a Kubernetes cluster, the most feature-rich and widely adopted orchestration target, providing sophisticated scheduling, self-healing, scaling, and rolling update capabilities well beyond what Swarm or single-host approaches offer.
Deploying an Image to Kubernetes
A Deployment manifest references the image and desired replica count; applying it brings the application up across the cluster.
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 3
template:
spec:
containers:
- name: myapp
image: registry.example.com/myapp:1.0
kubectl apply -f deployment.yaml
This brings up three replicas of the application, with Kubernetes handling their scheduling across the cluster's available nodes.
Updating a Running Deployment
Updating the image reference and reapplying triggers Kubernetes' own rolling update mechanism by default.
kubectl set image deployment/myapp myapp=registry.example.com/myapp:2.0
kubectl rollout status deployment/myapp
This gradually replaces running pods with the updated version, while monitoring confirms the rollout completes successfully.
Why Kubernetes Provides More Sophisticated Capability Than Swarm
Kubernetes offers considerably more sophisticated scheduling, scaling (including automatic, metric-based scaling), and self-healing capability than Swarm, at the cost of meaningfully greater configuration complexity and operational learning curve.
kubectl autoscale deployment myapp --min=2 --max=10 --cpu-percent=70
Why a Kubernetes Delivery Target Matters
For an application that has grown to need sophisticated orchestration — automatic scaling, advanced scheduling, robust self-healing — Kubernetes provides considerably more capability than simpler delivery targets, justifying its additional complexity for genuinely complex, large-scale deployments.