• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    Shell
  • License
    Other
  • Created almost 5 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Krew plugin to restart Kubernetes Nodes sequentially and gracefully

kubectl-node-restart

kubectl-node-restart is a kubectl plugin that sequentially and gracefully performs a rolling restart of Nodes within a Kubernetes cluster

using kubectl-node-restart plugin

Installing

  • install krew using instructions here
  • run kubectl krew update
  • run kubectl krew install node-restart

installing kubectl-node-restart plugin

Usage

  • perform rolling restart of all nodes in a cluster
    kubectl node-restart [--context cluster] all
  • restart only specific nodes selected through labels
    kubectl node-restart --selector node-role.kubernetes.io/master
  • execute a command prior to reboot labels
    kubectl node-restart all --command "echo 'hello world'"
  • perform a dry-run
    kubectl node-restart all --dry-run
  • restart node(s) without first draining
    kubectl node-restart all --force
  • add a delay of 120seconds between node restarts
    kubectl node-restart all --sleep 120
  • Pull the Alpine image from a private registry
    kubectl node-restart all --registry myregistry.local/library/alpine:3.9