Menu

1 / 2

One missing name, a Kubernetes namespace full of restarts

DEV Community: jenkins·Vitaliy Dmitriev·about 20 hours ago
#DrhB0Bs7
#devtojenkins#devto#dev#deployment#name
Reading 0:00
15s threshold

One missing name, a Kubernetes namespace full of restarts

Compare these two commands:

kubectl delete deployment -n prod # error: resource(s) were provided, but no name was specified

kubectl rollout restart deployment -n prod # deployment.apps/api restarted # deployment.apps/billing restarted # deployment.apps/checkout restarted # ...

Enter fullscreen mode

Exit fullscreen mode

The first refuses to run. The second attempts to restart every Deployment in the namespace, without confirmation or an explicit --all . It's documented behavior .

That makes this a surprisingly dangerous bit of shell:

kubectl rollout restart deployment $SERVICE -n prod

Enter fullscreen mode

Exit fullscreen mode

If SERVICE is empty, the command gets a much bigger audience than intended.

Each Deployment still follows its own update strategy. But with rolling updates, those rollouts can overlap across the namespace. Caches warm up, connections reconnect, and replacement pods compete for capacity together.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.