Skip to content

Commit 9e340ea

Browse files
committed
fix(vm): restore kube-apiserver port forwarding for host-side kubectl
The previous commit (070bcca) dropped port 6443 from the gvproxy port_map, breaking all host-side kubectl commands including the readiness check and stale pod recovery. k3s runs the API server with host networking so VM:6443 is directly reachable — restore the 6443:6443 mapping alongside the 30051:30051 NodePort mapping.
1 parent e012e09 commit 9e340ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/openshell-vm/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ impl VmConfig {
161161
],
162162
workdir: "/".to_string(),
163163
port_map: vec![
164+
// kube-apiserver — k3s runs the API server with host
165+
// networking so it listens on VM:6443 directly. The
166+
// host-side readiness check (`wait_for_gateway_service`)
167+
// and `recover_stale_pods` both use kubectl against
168+
// 127.0.0.1:6443 via the copied kubeconfig.
169+
"6443:6443".to_string(),
164170
// Navigator server — with bridge CNI the pod listens on
165171
// 8080 inside its own network namespace (10.42.0.x), not
166172
// on the VM's root namespace. The NodePort service

0 commit comments

Comments
 (0)