一键导入
mcp-setup
// Install and configure the CLI plugins for Forklift/MTV, Prometheus metrics, and Kubernetes debug queries. Use when CLI tools (oc mtv, oc metrics, oc debug-queries) are not available, or when the user wants to set up the tools.
// Install and configure the CLI plugins for Forklift/MTV, Prometheus metrics, and Kubernetes debug queries. Use when CLI tools (oc mtv, oc metrics, oc debug-queries) are not available, or when the user wants to set up the tools.
Generate bash e2e verification scripts for MTV/Forklift bugs and features through a guided workflow (gather context, write test plan, get approval, generate script). Use when the user asks to create a test, write a test script, verify a bug fix, build an e2e test, generate a verification script, or mentions an MTV/Forklift Jira ticket (MTV-<number>) together with testing.
Check Ceph storage health on OpenShift OCS/ODF clusters. Use when PVCs are stuck in Pending, storage provisioning fails, Ceph is degraded, OSDs are full, or cluster storage needs diagnosis.
General OpenShift (OCP) cluster health check. Use when the cluster is unhealthy, nodes are NotReady, operators are degraded, pods are crashing, etcd is slow, networking issues occur, or a general cluster diagnosis is needed.
Use the oc mtv CLI to manage VM migrations. Use this skill when the user wants to migrate VMs from vSphere, oVirt, OpenStack, OVA, EC2, or HyperV to OpenShift/KubeVirt.
Use oc virt (or kubectl virt) to manage KubeVirt virtual machines. Use this skill when the user wants to create, start, stop, or manage VMs on OpenShift/Kubernetes.
Observe cluster metrics via Prometheus/Thanos. Use when the user wants to check cluster metrics, monitor network traffic, storage I/O, pod resource usage, VM migration throughput, or discover available Prometheus metrics. Covers metric discovery, storage (Ceph/ODF), network traffic by namespace/pod, pod statistics, and Forklift/MTV migration monitoring.
| name | mcp-setup |
| description | Install and configure the CLI plugins for Forklift/MTV, Prometheus metrics, and Kubernetes debug queries. Use when CLI tools (oc mtv, oc metrics, oc debug-queries) are not available, or when the user wants to set up the tools. |
This skill helps you install the oc plugins required by the other skills in this collection.
First, check if the plugins are already installed:
oc mtv --help 2>/dev/null && echo "MTV_OK" || echo "MTV_MISSING"
oc metrics --help 2>/dev/null && echo "METRICS_OK" || echo "METRICS_MISSING"
oc debug-queries --help 2>/dev/null && echo "DEBUG_OK" || echo "DEBUG_MISSING"
Based on the results above, tell the user only what is missing and provide the relevant install instructions. If everything is already installed, confirm it and move on.
GitHub: yaacov/kubectl-mtv
curl -sSL https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/install.sh | bash
Verify: oc mtv --help
GitHub: yaacov/kubectl-metrics
curl -sSL https://raw.githubusercontent.com/yaacov/kubectl-metrics/main/install.sh | bash
Verify: oc metrics --help
GitHub: yaacov/kubectl-debug-queries
curl -sSL https://raw.githubusercontent.com/yaacov/kubectl-debug-queries/main/install.sh | bash
Verify: oc debug-queries --help
All three install to ~/.local/bin by default. If it is not in the user's PATH:
# bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
# zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
| CLI Plugin | Commands | What It Does |
|---|---|---|
| kubectl-mtv | oc mtv | Manage MTV/Forklift migrations: providers, plans, inventory, health |
| kubectl-metrics | oc metrics | Query Prometheus/Thanos metrics, discover metrics, instant and range queries |
| kubectl-debug-queries | oc debug-queries | List/get Kubernetes resources, pod logs, events with TSL filtering |
Note: kubectl mtv, kubectl metrics, and kubectl debug-queries also work as aliases.
If you are using an AI agent that supports MCP (Model Context Protocol), these plugins can also run as MCP servers. This is optional — the skills work with the CLI directly.
claude mcp add kubectl-metrics -- oc metrics mcp-server
claude mcp add kubectl-mtv -- oc mtv mcp-server
claude mcp add kubectl-debug-queries -- oc debug-queries mcp-server
Settings -> MCP -> Add Server for each:
| Name | Command | Args |
|---|---|---|
| kubectl-metrics | oc | metrics mcp-server |
| kubectl-mtv | oc | mtv mcp-server |
| kubectl-debug-queries | oc | debug-queries mcp-server |
Edit claude_desktop_config.json and add to the mcpServers section:
{
"mcpServers": {
"kubectl-metrics": {
"command": "oc",
"args": ["metrics", "mcp-server"]
},
"kubectl-mtv": {
"command": "oc",
"args": ["mtv", "mcp-server"]
},
"kubectl-debug-queries": {
"command": "oc",
"args": ["debug-queries", "mcp-server"]
}
}
}
For remote or server-based agents, run each MCP server in SSE mode:
oc metrics mcp-server --sse --port 8080
oc mtv mcp-server --sse --port 8081
oc debug-queries mcp-server --sse --port 8082
Run MCP servers as containers instead of installing the plugins locally. Requires Docker or Podman and a valid cluster token:
# kubectl-mtv
docker run --rm -p 8080:8080 \
-e MCP_KUBE_SERVER=https://api.cluster.example.com:6443 \
-e MCP_KUBE_TOKEN=sha256~xxxx \
quay.io/yaacov/kubectl-mtv-mcp-server:latest
# kubectl-metrics
docker run --rm -p 8081:8080 \
-e MCP_KUBE_SERVER=https://api.cluster.example.com:6443 \
-e MCP_KUBE_TOKEN=sha256~xxxx \
quay.io/yaacov/kubectl-metrics-mcp-server:latest
# kubectl-debug-queries
docker run --rm -p 8082:8080 \
-e MCP_KUBE_SERVER=https://api.cluster.example.com:6443 \
-e MCP_KUBE_TOKEN=sha256~xxxx \
quay.io/yaacov/kubectl-debug-queries-mcp-server:latest
Then configure your agent to connect via SSE at http://localhost:8080/sse,
http://localhost:8081/sse, and http://localhost:8082/sse.
Deploy the MCP servers directly on the cluster:
# kubectl-mtv
oc apply -f https://raw.githubusercontent.com/yaacov/kubectl-mtv/main/deploy/mcp-server.yaml
# kubectl-debug-queries
oc apply -f https://raw.githubusercontent.com/yaacov/kubectl-debug-queries/main/deploy/mcp-server.yaml