Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mousavian/kubectl-rotate-pods
kubectl plugin to easily restart all pods of a deployment
https://github.com/mousavian/kubectl-rotate-pods
kubectl kubectl-plugin kubectl-plugins kubernetes
Last synced: 7 days ago
JSON representation
kubectl plugin to easily restart all pods of a deployment
- Host: GitHub
- URL: https://github.com/mousavian/kubectl-rotate-pods
- Owner: mousavian
- License: mit
- Created: 2019-09-02T15:36:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T22:59:05.000Z (almost 5 years ago)
- Last Synced: 2024-08-02T06:14:09.756Z (3 months ago)
- Topics: kubectl, kubectl-plugin, kubectl-plugins, kubernetes
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kubectl-plugins - kubectl-rotate-pods
README
### :warning: Notice:
This was only an experiment with kubectl plugins.
kubectl itself has `rollout restart` subcommand [[1](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-restart-em-)] in version >1.15 which can be used as follow:```
kubectl rollout restart deployment/nginx
```# kubectl-rotate-pods
Helps you to forcefully restart pods of a deployment in a rolling update manner (depends on your deployment config) for whatever reason you may need. For instance when a ConfigMap or a Secret your pods depend on gets updated or to perform in-memory cache invalidation.
### Installation
```bash
curl -sLo kubectl-rotate_pods https://github.com/mousavian/kubectl-rotate-pods/raw/v1.0.0/src/kubectl-rotate_pods && \
chmod +x kubectl-rotate_pods && mv -i kubectl-rotate_pods /usr/local/bin# Verify
kubectl rotate-pods --version
```### Usage
```bash
# simple
kubectl rotate-pods -d terrible-deployment# advanced
kubectl rotate-pods \
--deployment terrible-deployment \
--namespace backend \
--context ctx-prod \
--reason "for fun"
```