This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Variables to keep track of the total available CPU and memory | |
total_available_cpu=0 | |
total_available_memory=0 | |
for node in $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}'); do | |
echo "Node: $node" | |
# Get the current usage |