Skip to content

Instantly share code, notes, and snippets.

@saiyam1814
Last active January 18, 2020 12:23
Show Gist options
  • Select an option

  • Save saiyam1814/923d94c60aeeefa6e175d54c2ae1fe18 to your computer and use it in GitHub Desktop.

Select an option

Save saiyam1814/923d94c60aeeefa6e175d54c2ae1fe18 to your computer and use it in GitHub Desktop.
change the kubelet max pods for all nodes
kubectl get nodes --no-headers=true -owide | awk '{print $6}' | xargs
arr=(iplist from above command)
for a in "${arr[@]}"; do echo $a; ssh -o StrictHostKeyChecking=no -t app@$a "sudo /etc/kubernetes; sudo sed -i -e 's/max-pods=14/max-pods=24/g' kubelet.env ; sudo service kubelet restart"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment