15 lines
523 B
Python
15 lines
523 B
Python
import paramiko
|
|
|
|
def check_cattle(ip, cluster):
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
ssh.connect(ip, username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
|
print(f"\n[{cluster}] Checking cattle-system pods...")
|
|
_, out, _ = ssh.exec_command("kubectl get pods -n cattle-system -o wide")
|
|
print(out.read().decode().strip())
|
|
ssh.close()
|
|
|
|
check_cattle('140.44.4.11', 'AERODROME')
|
|
check_cattle('140.44.4.41', 'SPACEPORT')
|
|
|