A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Flux159/mcp-server-kubernetes/issues/148 below:

Implement Environment Variable Kubeconfig Support · Issue #148 · Flux159/mcp-server-kubernetes · GitHub

The mcp-server-kubernetes currently loads kubeconfig from either an in-cluster service account or the default ~/.kube/config file. This limits its usability in environments where file creation is restricted or impractical, such as serverless platforms, containers, and CI/CD pipelines.

This issue proposes adding support for configuring Kubernetes access via environment variables to enable file-less deployment scenarios.

Implement environment variable support for kubeconfig in mcp-server-kubernetes, maintaining backward compatibility with existing methods.

🛠️ Proposed Changes

Modify the KubernetesManager constructor in frontend/vendor/mcp-server-kubernetes/src/utils/kubernetes-manager.ts to load kubeconfig information in the following priority:

  1. In-cluster service account (existing)
  2. KUBECONFIG_DATA: Full kubeconfig as a YAML string.
  3. KUBECONFIG_JSON: Full kubeconfig as a JSON string.
  4. K8S_SERVER + K8S_TOKEN: Minimal configuration with individual variables (K8S_SKIP_TLS_VERIFY optional).
  5. Default file (~/.kube/config) (existing fallback)
Benefits

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4