Loading makefile_parts/kube-cluster.mk +13 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,16 @@ recycle-node: ## Replace node with a new instance aws autoscaling terminate-instance-in-auto-scaling-group \ --instance-id $$instance_id --no-should-decrement-desired-capacity ; \ done .PHONY: reboot-node reboot-node: NODES = $$(kubectl get node -o json | jq -r '.items[].metadata.name') reboot-node: ## Replace node with a new instance kubectl get nodes @for i in ${NODES}; do \ echo "" ; \ echo "Reboot $$i?" ; \ confirm 2> /dev/null || continue ; \ instance_id=`kubectl get node $$i -o json | jq -r '.spec.externalID'` ; \ aws ec2 reboot-instances \ --instance-id $$instance_id ; \ done Loading
makefile_parts/kube-cluster.mk +13 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,16 @@ recycle-node: ## Replace node with a new instance aws autoscaling terminate-instance-in-auto-scaling-group \ --instance-id $$instance_id --no-should-decrement-desired-capacity ; \ done .PHONY: reboot-node reboot-node: NODES = $$(kubectl get node -o json | jq -r '.items[].metadata.name') reboot-node: ## Replace node with a new instance kubectl get nodes @for i in ${NODES}; do \ echo "" ; \ echo "Reboot $$i?" ; \ confirm 2> /dev/null || continue ; \ instance_id=`kubectl get node $$i -o json | jq -r '.spec.externalID'` ; \ aws ec2 reboot-instances \ --instance-id $$instance_id ; \ done