From kube-dc
Use the kube-dc CLI for authentication, context switching, and namespace management. Covers login, use, ns, config, and kubectl integration.
npx claudepluginhub kube-dc/kube-dc-public --plugin kube-dcThis skill uses the workspace's default tool permissions.
The `kube-dc` CLI provides browser-based OAuth authentication and context management for Kube-DC clusters. It integrates as a kubectl exec credential plugin.
Manages Kubernetes cluster resources via kubectl across multiple clusters. Views pod/deployment statuses, logs/events; troubleshoots with exec/port-forward; modifies via scale/rollout.
Executes kubectl commands to manage Kubernetes clusters: query resources, deploy/update apps, debug pods/containers, view logs, monitor health. For K8s, deployments, pod diagnostics.
Manages Kubernetes operations: deployments, workloads, networking, storage, troubleshooting, kubectl mastery, and cluster stability for pods and services.
Share bugs, ideas, or general feedback.
The kube-dc CLI provides browser-based OAuth authentication and context management for Kube-DC clusters. It integrates as a kubectl exec credential plugin.
# Linux (amd64)
sudo curl -sL https://github.com/kube-dc/kube-dc-public/releases/latest/download/kube-dc_linux_amd64 -o /usr/local/bin/kube-dc && sudo chmod +x /usr/local/bin/kube-dc
# Linux (arm64)
sudo curl -sL https://github.com/kube-dc/kube-dc-public/releases/latest/download/kube-dc_linux_arm64 -o /usr/local/bin/kube-dc && sudo chmod +x /usr/local/bin/kube-dc
# macOS (Apple Silicon)
sudo curl -sL https://github.com/kube-dc/kube-dc-public/releases/latest/download/kube-dc_darwin_arm64 -o /usr/local/bin/kube-dc && sudo chmod +x /usr/local/bin/kube-dc
# macOS (Intel)
sudo curl -sL https://github.com/kube-dc/kube-dc-public/releases/latest/download/kube-dc_darwin_amd64 -o /usr/local/bin/kube-dc && sudo chmod +x /usr/local/bin/kube-dc
kube-dc login --domain kube-dc.cloud --org {org-name}
kube-dc login --domain stage.kube-dc.com --org {org-name}
kube-dc login --domain internal.example.com --org {org-name} --ca-cert /path/to/ca.crt
Opens browser for Keycloak OAuth login. Tokens cached for ~30 days with auto-refresh.
kube-dc use {org}/{project} # Switch to specific project
kube-dc use # Interactive selection
Context names follow pattern: kube-dc/{domain}/{org}/{project}
kube-dc ns # List available namespaces (from JWT claims)
kube-dc ns {namespace} # Switch to specific namespace
kube-dc config show # Current context, server, cached credentials
kube-dc config get-contexts # List all kube-dc contexts
kube-dc logout # Remove credentials for current server
kube-dc logout --all # Remove all cached credentials
Before creating resources, always check the current context:
# Quick check
kubectl config current-context
# Detailed info (server, namespace, token status)
kube-dc config show
# Available namespaces for current user
kube-dc ns
The namespace tells you the project: namespace {org}-{project} → org={org}, project={project}.
After kube-dc login, the CLI configures kubectl with an exec credential plugin:
users:
- name: kube-dc@{org}
user:
exec:
apiVersion: client.authentication.k8s.io/v1
command: kube-dc
args: ["credential", "--server", "https://kube-api.{domain}:6443"]
Every kubectl command automatically:
kubectx # Lists all contexts including kube-dc ones
kubectx kube-dc/shalb/demo # Switch to Kube-DC context
| Path | Purpose |
|---|---|
~/.kube/config | Kubeconfig (Kube-DC entries merged, never overwrites others) |
~/.kube-dc/config.yaml | CLI configuration |
~/.kube-dc/credentials/ | Cached OAuth tokens (0600 permissions) |
After CLI operations:
# 1. Check credentials are cached
kube-dc config show
# Expected: shows server, user, org, valid access/refresh tokens
# 2. Verify kubectl works
kubectl get ns
# Expected: lists namespaces you have access to
# 1. Verify active context
kubectl config current-context
# Expected: kube-dc/{domain}/{org}/{project}
# 2. Verify namespace
kubectl config view --minify -o jsonpath='{.contexts[0].context.namespace}'
# Expected: {org}-{project}
# 1. Verify namespace changed
kube-dc ns
# Expected: asterisk (*) next to the active namespace
Success: Config shows valid tokens, kubectl commands return data. Failure:
kube-dc login --domain {domain} --org {org}kube-dc login rather than trying to extract tokens manually