k8s-networking — Claude Code skill for Kubernetes networking
k8s-networking is a Claude Code skill for managing Kubernetes services, Ingress, endpoints, and network policies. It helps configure routing and investigate connectivity problems.
MIT-0 1 installs ★ 976 updated 2026-10-22
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a claude-codeWhat k8s-networking does
The skill uses kubectl-mcp-server tools to inspect networking resources and apply manifests for services, Ingress, and network policies. For connectivity issues, it guides the agent to check endpoints and service selectors against pod labels, review isolation rules, and test DNS from inside a pod.
The security toolset is required. Start kubectl-mcp-server with --toolsets default,security or set MCP_TOOLSETS=default,security; without it, network policy analysis is unavailable. The skill can apply manifests through kubectl_apply, so review proposed resource changes before they reach the cluster.
What it helps with
- find services with no endpoints
- compare service selectors with pod labels
- inspect Ingress routing rules
- review network policies that restrict traffic
- test DNS lookup from inside a pod
Example prompts for the agent
- Check the endpoints and pod-label selector for
my-servicein namespacedefault. - Show me the routing rules for Ingress
my-ingress. - Review network policies in
defaultand diagnose why a pod cannot resolvemy-service.
How to install k8s-networking
1Skills CLI (Vercel)
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a claude-code2Manually: put the files in place
~/.claude/skills/k8s-networking/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/k8s-networking/
1Skills CLI (Vercel)
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a codex2Manually: put the files in place
.agents/skills/k8s-networking/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a cursor2Manually: put the files in place
.cursor/skills/k8s-networking/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rohitg00/kubectl-mcp-server kubernetes-skills/claude/k8s-networking2Manually: put the files in place
.github/skills/k8s-networking/SKILL.md1Skills CLI (Vercel)
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a gemini-cli2Platform CLI
gemini skills install https://github.com/rohitg00/kubectl-mcp-server --path kubernetes-skills/claude/k8s-networkingManually: put the files in place
.devin/skills/k8s-networking/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about k8s-networking
How do I install k8s-networking in Claude Code?
Run npx skills add rohitg00/kubectl-mcp-server --skill k8s-networking -a claude-code. The skill file is placed at ~/.claude/skills/k8s-networking/SKILL.md.
What does k8s-networking do?
It helps inspect and manage Kubernetes services, Ingress resources, endpoints, and network policies. It also provides a workflow for investigating DNS and connectivity issues.
What is needed to analyze network policies?
Enable the security toolset when starting kubectl-mcp-server, using --toolsets default,security or MCP_TOOLSETS=default,security.
Source text
SKILL.md · MIT-0
---
name: k8s-networking
description: Kubernetes networking management for services, ingresses, endpoints, and network policies. Use when configuring connectivity, load balancing, or network isolation.
license: MIT-0
metadata:
author: rohitg00
version: "2.0.0"
tools: 5
category: networking
---
# Kubernetes Networking
Manage Kubernetes networking resources using kubectl-mcp-server's networking tools.
> Requires the `security` toolset: start kubectl-mcp-server with `--toolsets default,security` (or `MCP_TOOLSETS=default,security`).
## When to Apply
Use this skill when:
- User mentions: "service", "ingress", "endpoint", "network policy", "load balancer"
- Operations: exposing applications, configuring routing, network isolation
- Keywords: "connectivity", "DNS", "traffic", "port", "firewall"
## Priority Rules
| Priority | Rule | Impact | Tools |
|----------|------|--------|-------|
| 1 | Check endpoints before troubleshooting services | CRITICAL | `kubectl_get` |
| 2 | Verify service selector matches pod labels | HIGH | `kubectl_get`, `kubectl_get` |
| 3 | Review network policies for isolation | HIGH | `analyze_network_policies` |
| 4 | Test DNS resolution from within pods | MEDIUM | `exec_in_pod` |
## Quick Reference
| Task | Tool | Example |
|------|------|---------|
| List services | `kubectl_get` | `kubectl_get(resource_type="services", namespace)` |
| Check backends | `kubectl_get` | `kubectl_get(resource_type="endpoints", namespace)` |
| List ingresses | `kubectl_get` | `kubectl_get(resource_type="ingress", namespace)` |
| Network policies | `analyze_network_policies` | `analyze_network_policies(namespace)` |
## Services
```python
kubectl_get(resource_type="services", namespace="default")
kubectl_describe(resource_type="service", name="my-service", namespace="default")
kubectl_apply(manifest="""
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: default
spec:
selector:
app: my-app
ports:
- port: 80
targetPort: 8080
""")
kubectl_apply(manifest="""
apiVersion: v1
kind: Service
metadata:
name: my-lb
namespace: default
spec:
type: LoadBalancer
selector:
app: my-app
ports:
- port: 443
targetPort: 8443
""")
```
## Endpoints
```python
kubectl_get(resource_type="endpoints", namespace="default")
```
## Ingress
```python
kubectl_get(resource_type="ingress", namespace="default")
kubectl_describe(resource_type="ingress", name="my-ingress", namespace="default")
kubectl_apply(manifest="""
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
namespace: default
spec:
rules:
- host: app.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80
""")
```
## Network Policies
```python
analyze_network_policies(namespace="default")
kubectl_describe(resource_type="networkpolicy", name="deny-all", namespace="default")
kubectl_apply(manifest="""
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-all
namespace: default
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
""")
kubectl_apply(manifest="""
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-web
namespace: default
spec:
podSelector:
matchLabels:
app: web
ingress:
- from:
- podSelector:
matchLabels:
app: frontend
ports:
- port: 80
""")
```
## Troubleshooting Connectivity
```python
kubectl_get(resource_type="endpoints", namespace="default")
analyze_network_policies(namespace="default")
exec_in_pod(
pod_name="debug-pod",
namespace="default",
command="nslookup my-service.default.svc.cluster.local"
)
```
## Related Skills
- [k8s-service-mesh](../k8s-service-mesh/SKILL.md) - Istio traffic management
- [k8s-cilium](../k8s-cilium/SKILL.md) - Cilium network policies
© rohitg00 · MIT-0 · rohitg00/kubectl-mcp-server