mcpField
A
aks-network-capture

aks-network-capture

github.com/microsoftCloud & DevOps1.6k93 installsUpdated today
Repository

About aks-network-capture

A skill for planning and carrying out authorized packet captures on AKS nodes or pods, aimed at operators investigating specific network behavior. It enforces host capability checks, target binding, approvals, and bounded evidence handling.

Key features

  1. 01Host capability and authorization checks
  2. 02Capture AKS nodes or pods
  3. 03Generate traffic when approved
  4. 04Retrieve capture runs and Azure evidence
  5. 05Handle failed or stale capture setup

Use cases

  1. 01Collect packet evidence for an AKS investigation
  2. 02Prepare a target-bound capture plan when execution is unavailable
  3. 03Review supplied, redacted capture evidence

MCP support

Azure MCP provides AKS cluster and node-pool metadata only; it does not execute Kubernetes commands or perform packet capture.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/microsoft/azure-skills --skill aks-network-capture

After installing, type/aks-network-capturein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
capture-authorization.md
scripts/
collect-azure-network-info.ps1
collect-azure-network-info.sh
create-capture.ps1
create-capture.sh
generate-test-traffic.ps1
generate-test-traffic.sh
retrieve-captures.ps1
retrieve-captures.sh
run-capture.sh
setup-capture-configmap.ps1
setup-capture-configmap.sh

Details

From the project README

AKS Network Capture

Quick Reference

UseRequiresSafety
AKS pcap evidencekubectl; az for Azure evidenceBounded, pinned, least privilege

When to Use This Skill

Use for explicit packet capture after read-only checks, not generic connectivity failures.

MCP Tools

Azure MCP's AKS area provides cluster and node-pool metadata, not Kubernetes command execution or packet capture.

Host Capability Gate

Before executing the workflow, confirm that the host permits the required Bash or PowerShell execution, kubectl access to the bound cluster, az for Azure evidence, access to the bundled scripts, and an approved artifact destination. A governed Azure CLI tool alone does not establish that shell, Kubernetes commands, or artifact operations are supported.

If a required capability is unavailable or prohibited, state that capture execution is unavailable in this host. Analyze supplied, appropriately redacted evidence or give the operator a target-bound collection/capture plan; do not claim to have run it. Never route kubectl through Azure MCP, add an unapproved execution path, or bypass host policy. Host support does not replace the mutation and sensitive-data approvals below.

Run bundled scripts from the skill root only after this gate is satisfied.

Workflow/Steps

  1. Check host capabilities, then complete authorization and target binding. Capture intent is not mutation consent. Stop for separate approval before any debug-container fallback.
  2. Install Bash / PowerShell.
  3. Capture nodes or pods with Bash / PowerShell.
  4. Generate traffic if approved with Bash / PowerShell.
  5. Retrieve the exact run with Bash / PowerShell.
  6. Gather Azure evidence with Bash / PowerShell.

The ConfigMap runs run-capture.sh inside its pinned Linux image.

Error Handling

ErrorAction
Invalid inputCorrect it before retrying.
Missing/stale ConfigMapRun setup again.
Capture/retrieval failureInspect Job logs; missing evidence is not success.

Comments

Markdown supported