feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
23
scripts/diagnose_wrk07.py
Normal file
23
scripts/diagnose_wrk07.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.11', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=8)
|
||||
|
||||
print("=== NODES ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get nodes')
|
||||
print(out.read().decode())
|
||||
|
||||
print("=== PODS ON SNINFR2LNXWRK07 ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get pods -A -o wide | grep sninfr2lnxwrk07')
|
||||
print(out.read().decode())
|
||||
|
||||
print("=== ALL PODS NOT RUNNING / NOT COMPLETED ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get pods -A | grep -v Running | grep -v Completed')
|
||||
print(out.read().decode())
|
||||
|
||||
ssh.close()
|
||||
|
||||
Reference in New Issue
Block a user