feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
22
scripts/check_other_apps.py
Normal file
22
scripts/check_other_apps.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import paramiko
|
||||
|
||||
def query_cluster(ip, name):
|
||||
print(f"\n=================== CLUSTER {name} ({ip}) ===================")
|
||||
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)
|
||||
|
||||
def run(cmd):
|
||||
print(f"=== {cmd} ===")
|
||||
_, out, err = ssh.exec_command(cmd)
|
||||
res = out.read().decode().strip()
|
||||
if res:
|
||||
print(res)
|
||||
|
||||
run("kubectl get ns")
|
||||
run("kubectl get deploy,sts -A | grep -E 'awx|authentik|zabbix|coder'")
|
||||
ssh.close()
|
||||
|
||||
query_cluster('140.44.4.11', 'AERODROME')
|
||||
query_cluster('140.44.4.41', 'SPACEPORT')
|
||||
|
||||
Reference in New Issue
Block a user