k8s #1
@@ -113,6 +113,32 @@ def create_portforwards():
|
|||||||
|
|
||||||
print("✅ Kubeconfig подготовлен")
|
print("✅ Kubeconfig подготовлен")
|
||||||
|
|
||||||
|
# Ingress HTTP (80)
|
||||||
|
if addon_ports.get('ingress_http'):
|
||||||
|
port = addon_ports['ingress_http']
|
||||||
|
print(f" - Ingress HTTP: localhost:{port} -> ingress-nginx-controller:80")
|
||||||
|
subprocess.Popen([
|
||||||
|
"kubectl",
|
||||||
|
f"--kubeconfig={kubeconfig_file}",
|
||||||
|
"port-forward",
|
||||||
|
"-n", "ingress-nginx",
|
||||||
|
"svc/ingress-nginx-controller",
|
||||||
|
f"{port}:80"
|
||||||
|
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
|
||||||
|
# Ingress HTTPS (443)
|
||||||
|
if addon_ports.get('ingress_https'):
|
||||||
|
port = addon_ports['ingress_https']
|
||||||
|
print(f" - Ingress HTTPS: localhost:{port} -> ingress-nginx-controller:443")
|
||||||
|
subprocess.Popen([
|
||||||
|
"kubectl",
|
||||||
|
f"--kubeconfig={kubeconfig_file}",
|
||||||
|
"port-forward",
|
||||||
|
"-n", "ingress-nginx",
|
||||||
|
"svc/ingress-nginx-controller",
|
||||||
|
f"{port}:443"
|
||||||
|
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
|
||||||
# Prometheus
|
# Prometheus
|
||||||
if addon_ports.get('prometheus'):
|
if addon_ports.get('prometheus'):
|
||||||
port = addon_ports['prometheus']
|
port = addon_ports['prometheus']
|
||||||
|
|||||||
Reference in New Issue
Block a user