feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
33
scripts/uncordon_and_inspect_errors.py
Normal file
33
scripts/uncordon_and_inspect_errors.py
Normal file
@@ -0,0 +1,33 @@
|
||||
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("=== UNCORDONING WRK07 ===")
|
||||
_, out, _ = ssh.exec_command('kubectl uncordon sninfr2lnxwrk07')
|
||||
print(out.read().decode())
|
||||
|
||||
print("=== CHECKING WRK07 STATUS ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get node sninfr2lnxwrk07')
|
||||
print(out.read().decode())
|
||||
|
||||
print("=== INSPECTING LONGHORN-MANAGER-SQTL9 ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get pod -n longhorn-system longhorn-manager-sqtl9 -o wide')
|
||||
print(out.read().decode())
|
||||
_, out, _ = ssh.exec_command('kubectl logs -n longhorn-system longhorn-manager-sqtl9 -c longhorn-manager --tail=25')
|
||||
print("Logs:\n", out.read().decode())
|
||||
|
||||
print("=== INSPECTING HELM-INSTALL-TRAEFIK CRASH ===")
|
||||
_, out, _ = ssh.exec_command('kubectl logs -n kube-system helm-install-traefik-96s4n --tail=25')
|
||||
print(out.read().decode())
|
||||
|
||||
print("=== INSPECTING UNKNOWN PODS IN INFRA ===")
|
||||
_, out, _ = ssh.exec_command('kubectl get pods -n infra -o wide | grep Unknown')
|
||||
print(out.read().decode())
|
||||
|
||||
ssh.close()
|
||||
|
||||
Reference in New Issue
Block a user