10 lines
289 B
Python
10 lines
289 B
Python
import paramiko
|
|
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect('140.44.4.41', username='root', password='dietpi', timeout=10)
|
|
_, o, _ = c.exec_command("kubectl get pods -A | grep -iE 'metrics|prom'")
|
|
print(o.read().decode().strip())
|
|
c.close()
|
|
|