You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(k8s): Update OpenShell server to accept kubeconfig, support out-of-cluster access #1017
The current implementation on the OpenShell server's kubernetes driver assumes in-cluster access only. Adding support for out-of-cluster access would enable development loops of the Gateway when scheduling sandboxes on Kubernetes.
This feature is already present in the codebase. The Kubernetes driver initializes its client as follows (crates/openshell-driver-kubernetes/src/driver.rs:121–126):
let base_config = match kube::Config::incluster(){Ok(c) => c,Err(_) => kube::Config::infer().await.map_err(kube::Error::InferConfig)?,};
kube::Config::incluster() succeeds when running inside a Kubernetes pod (service account mounted). When it fails — including when the Gateway runs locally — kube::Config::infer() is called, which reads the standard KUBECONFIG environment variable and falls back to ~/.kube/config. This is the idiomatic out-of-cluster pattern for Kubernetes clients in Rust.
No code changes are needed. The local development workflow using KUBECONFIG pointing at a k3d cluster is described in #1016.
Activity
TaylorMutch commentedon Apr 28, 2026
Research finding: already implemented
This feature is already present in the codebase. The Kubernetes driver initializes its client as follows (
crates/openshell-driver-kubernetes/src/driver.rs:121–126):kube::Config::incluster()succeeds when running inside a Kubernetes pod (service account mounted). When it fails — including when the Gateway runs locally —kube::Config::infer()is called, which reads the standardKUBECONFIGenvironment variable and falls back to~/.kube/config. This is the idiomatic out-of-cluster pattern for Kubernetes clients in Rust.No code changes are needed. The local development workflow using
KUBECONFIGpointing at a k3d cluster is described in #1016.Closing as already resolved.