Perform In-Place Updates on a Kubernetes Deployment
Scenario
You are working with a Kubernetes Deployment running in the prod namespace.
An existing Deployment named nginx-deployment is already running with two containers:
| Container | Image |
|---|---|
nginx | public.ecr.aws/nginx/nginx:stable-alpine |
sidecar | busybox:latest |
Tasks
- Update the nginx container image to:
public.ecr.aws/nginx/nginx:alpine
- Update the sidecar container image to:
busybox:musl
- Rename the containers:
nginx→nginx-prodsidecar→sidecar-prod
- Update the Deployment to use the Recreate update strategy.
- Scale the Deployment to 3 replicas.
Ensure the Deployment reaches a healthy state after applying the changes.
🧪 Test Cases
Level up your Server Side game — Join 20,000 engineers who receive insightful learning materials straight to their inbox