feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
12
scripts/check_k3s_channels.py
Normal file
12
scripts/check_k3s_channels.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import urllib.request
|
||||
import json
|
||||
|
||||
url = "https://update.k3s.io/v1-release/channels"
|
||||
try:
|
||||
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0', 'Accept': 'application/json'})
|
||||
with urllib.request.urlopen(req, timeout=10) as resp:
|
||||
data = json.loads(resp.read().decode())
|
||||
for item in data.get('data', []):
|
||||
print(f"{item.get('id')}: {item.get('latest')}")
|
||||
except Exception as e:
|
||||
print("Error:", e)
|
||||
Reference in New Issue
Block a user