Skip to content

Instantly share code, notes, and snippets.

@satiridev
Created November 16, 2022 06:39
Show Gist options
  • Save satiridev/623151836c60d3b1548f58b567b50034 to your computer and use it in GitHub Desktop.
Save satiridev/623151836c60d3b1548f58b567b50034 to your computer and use it in GitHub Desktop.
#!/bin/bash
# tested in .zshrc
#
# kubectl scale deploy name-of-deployment --replicas=0
# kubectl scale deploy name-of-deployment --replicas=1
alias kscale="kubectl scale deploy "
function krestart(){
for i in {0..1};
do kscale $1 --replicas=$i;
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment