feat: add diagnostic scripts for gateway and DNS investigation

This commit is contained in:
2026-11-05 11:17:12 -05:00
parent 88191155d2
commit 17ca433d0c
6 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import paramiko
import sys
sys.stdout.reconfigure(encoding='utf-8')
key_path = r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet"
def check(host, ns, name):
print(f"\n=================== {name} ({host}) ===================")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect(host, username="root", key_filename=key_path, timeout=10)
print("\n--- Pods in ns " + ns + " ---")
stdin, stdout, stderr = c.exec_command(f"k3s kubectl -n {ns} get pods -o wide")
print(stdout.read().decode('utf-8'))
print("\n--- Pihole Pod describe/logs ---")
stdin, stdout, stderr = c.exec_command(f"k3s kubectl -n {ns} describe deploy/pihole | grep -E 'Image:|Environment|Mounts|Volumes'")
print(stdout.read().decode('utf-8'))
print("\n--- Technitium Pod describe/logs ---")
stdin, stdout, stderr = c.exec_command(f"k3s kubectl -n {ns} describe deploy/technitium-dns | grep -E 'Image:|Environment|Mounts|Volumes'")
print(stdout.read().decode('utf-8'))
c.close()
check("140.44.4.11", "infra", "Aerodrome")
check("140.44.4.41", "infrastructure", "Spaceport")