feat: add homelab deployment configs, documentation, and automation scripts
This commit is contained in:
16
scripts/check_unhealthy_pods.py
Normal file
16
scripts/check_unhealthy_pods.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import paramiko
|
||||
|
||||
def check(ip, name):
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect(ip, username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
print(f"=== {name} ({ip}) Non-running Pods ===")
|
||||
_, o, _ = c.exec_command("kubectl get pods -A --no-headers | grep -v -E 'Running|Completed'")
|
||||
res = o.read().decode().strip()
|
||||
print(res if res else "All pods are Running/Completed!")
|
||||
c.close()
|
||||
|
||||
check('140.44.4.11', 'Aerodrome')
|
||||
print()
|
||||
check('140.44.4.41', 'Spaceport')
|
||||
|
||||
Reference in New Issue
Block a user