DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

How to Restart All Pods in a Kubernetes Namespace

4 years ago qvault.io
How to Restart All Pods in a Kubernetes Namespace

Summary: This is a summary of an article originally published by the source. Read the full original article here →

Unlock Your Coding FutureWhere I work we use a repo-per-namespace setup and so it is often the case that I want to restart all the pods and deployments in a single Kubernetes namespace. Maybe I want to see the startup logs, maybe I want to take down production for a few seconds, don’t question my motivations. Anyhow, what does matter is that bouncing all the deployments one-by-one is really obnoxious and I don’t like typing.

I made a little open-source repo with installation instructions if you want to add it to your $PATH.

In essence, this line gets all the deployments in the target namespaces and saves them into a deploys variable.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com