Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture designed to provide users with flexible extensibility. dsh-k8s-manager is a plugin specifically designed for DSH, providing a Lens-style Kubernetes cluster management interface. This plugin addresses operational pain points when managing multiple K8s clusters in a browser environment. By reusing the local kubectl and kubeconfig, it enables a cluster management experience without remote dependencies.

Features

  • Multi-cluster management: Supports adding, switching, and deleting multiple kubeconfigs, and quickly switching contexts via the top dropdown.
  • Resource browsing: Supports browsing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, ReplicaSets, Services, Ingresses, Endpoints, ConfigMaps, Secrets, PVs, PVCs, StorageClasses, Nodes, Namespaces, and Events.
  • Namespace filtering: Filters resource lists by Namespace.
  • Details and logs: View the YAML details and real-time logs of any resource.
  • Interactive shell: Uses xterm.js and node-pty to enter any Pod for debugging.
  • Write operations: Supports Restart, Scale, and Edit & Apply (edit and apply YAML).
  • No remote dependencies: All operations are based on locally configured kubectl and do not consume remote API resources.

Installation and Enablement

Use the official installation command to add the plugin to the DSH Web configuration:

dsh plugin --profile web add github:MrYangyt/dsh-k8s

After installation, restart the DSH Web process to activate the plugin:

dsh web

Usage

  1. Open DSH and create a new session.
  2. In the view switcher, click the Kubernetes tab (alongside Chat / Trajectory).
  3. Click Add Config in the top toolbar.
  4. Enter the cluster name, paste the kubeconfig YAML content, and click Confirm.
  5. Switch between different clusters using the top dropdown.
  6. In the left-side resource tree, select a resource and click it to view details or perform actions.

Adding a Configuration

The plugin saves each cluster’s configuration to ~/.kube/configs/<name>.yaml and merges all configurations into the main configuration file ~/.kube/config. The context name in the YAML is automatically renamed to the cluster name you provide.

Pod Shell Debugging

Select a Pod, open the Shell tab, select a container, and click Connect. The plugin attempts to start an interactive terminal through node-pty. If a precompiled node-pty binary is not available on the current platform, the plugin automatically falls back to kubectl exec -i mode.

Manual Refresh

Resource lists are automatically refreshed by default. If you need to update them manually, click the Refresh button in the toolbar.

Notes

  • Confirmation: All write operations (Restart, Scale, Apply YAML) require confirmation before execution.
  • Risk warning: When applying YAML, the plugin explicitly warns: “Please ensure you are operating on test resources.”
  • Configuration handling: The plugin does not directly overwrite your existing ~/.kube/config. Instead, it uses it as a backup or merge source to keep the original configuration safe.
  • Prerequisites: kubectl must be installed and available in the system PATH. Full interactive shell functionality depends on node-pty. On Linux, make g++ python3 may be required; on macOS, Xcode Command Line Tools are required; on Windows, Visual Studio Build Tools are required.