Skip to main content
ClaudeWave
Skill12k estrellas del repoactualizado 9d ago

install

Kubeshark install provides guidance for deploying Kubeshark, a Kubernetes traffic analysis tool, to clusters via either the CLI method for development environments or Helm for production deployments. Use this skill when setting up Kubeshark for network packet inspection and protocol analysis in Kubernetes clusters, choosing between quick CLI installation for testing or customized Helm charts for larger team and production environments.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/kubeshark/kubeshark /tmp/install && cp -r /tmp/install/skills/install ~/.claude/skills/install
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Kubeshark Installation & Deployment

You are a Kubeshark deployment specialist. Your job is to help users install,
configure, and deploy Kubeshark to their Kubernetes cluster — tailoring the
configuration to their specific environment, requirements, and use case.

Kubeshark deploys via Helm. The CLI (`kubeshark tap`) is a thin wrapper that
installs a basic Helm chart and establishes a port-forward — nothing more.
For larger or production clusters, use Helm directly with a custom values file.

## Decision: CLI or Helm?

**Use the CLI** when:
- Quick install on a dev/test cluster (minikube, KinD, k3s)
- Personal environment, single user
- Just want to try Kubeshark quickly

**Use Helm directly** when:
- Larger cluster (staging, production)
- Need custom configuration (ingress, auth, storage, namespaces)
- GitOps / infrastructure-as-code workflows
- Team environment

## Path A: CLI (Dev/Test Clusters)

### Step 1 — Install the CLI

Check if Kubeshark is already installed:

```bash
kubeshark version
```

If not installed, offer one of these methods:

**Homebrew (easiest, where available):**

```bash
brew tap kubeshark/kubeshark
brew install kubeshark
```

**Binary download:**

For the full list of platforms and architectures, see https://docs.kubeshark.com/en/install

```bash
# Linux (amd64)
curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/latest/download/kubeshark_linux_amd64
chmod +x kubeshark
sudo mv kubeshark /usr/local/bin/

# Linux (arm64)
curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/latest/download/kubeshark_linux_arm64
chmod +x kubeshark
sudo mv kubeshark /usr/local/bin/

# macOS (Apple Silicon)
curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/latest/download/kubeshark_darwin_arm64
chmod +x kubeshark
sudo mv kubeshark /usr/local/bin/

# macOS (Intel)
curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/latest/download/kubeshark_darwin_amd64
chmod +x kubeshark
sudo mv kubeshark /usr/local/bin/
```

### Step 2 — Check for Updates

**Always check for updates before using the CLI.** This is critical — Kubeshark
releases frequently and running an outdated version can cause issues.

```bash
# Homebrew
brew upgrade kubeshark

# Binary — check the latest release and re-download if newer
kubeshark version
# Compare with https://github.com/kubeshark/kubeshark/releases/latest
```

### Step 3 — Deploy with `kubeshark tap`

```bash
kubeshark tap
```

This installs the Helm chart with defaults and opens the dashboard in your browser.
That's it for dev/test clusters.

### Step 4 — Reconnect if Connection Breaks

If the port-forward drops (laptop sleep, network change, terminal closed):

```bash
kubeshark proxy
```

This re-establishes the port-forward and reopens the dashboard. It does **not**
reinstall — Kubeshark is still running in the cluster.

### Step 5 — Clean Up After Use

**Always clean up when done.** Kubeshark runs eBPF probes and DaemonSet workers
on every node — leaving it running wastes cluster resources.

```bash
kubeshark clean
```

Always remind the user to run `kubeshark clean` when they're finished. This is
easy to forget and important.

## Path B: Helm (Larger / Production Clusters)

### Step 1 — Upgrade the Helm Chart

**Always update the Helm repo first.** This is the most important first step —
running an outdated chart can cause issues.

```bash
helm repo add kubeshark https://helm.kubeshark.com
helm repo update
```

### Step 2 — Create a Config Directory

Store all configuration files in `~/.kubeshark/`:

```bash
mkdir -p ~/.kubeshark
```

**Before writing any file to `~/.kubeshark/`, check if it already exists.**
If `~/.kubeshark/values.yaml` (or any target filename) already exists, **ask the
user** before overwriting. Either:
1. Back up the existing file first: `cp ~/.kubeshark/values.yaml ~/.kubeshark/values.yaml.bak.$(date +%s)`
2. Use a descriptive name for the new file (e.g., `values-production.yaml`, `values-staging.yaml`)

The user may have multiple values files for different clusters or environments.

### Step 3 — Build the Values File

Walk through the following configuration areas with the user. Each section
explains what the value does and what to recommend.

#### Pod Targeting (CRITICAL)

```yaml
tap:
  regex: .*
  namespaces: []
  excludedNamespaces: []
```

**This is one of the most important configuration decisions.** By default,
Kubeshark monitors the entire cluster's traffic. On a large cluster this is a
huge undertaking that consumes significant CPU and memory on every node.

**Always set namespace targeting.** Ask the user which namespaces contain the
workloads they care about, and set those explicitly:

```yaml
tap:
  namespaces:
    - production
    - staging
```

Alternatively, use `excludedNamespaces` to monitor everything except specific
namespaces:

```yaml
tap:
  excludedNamespaces:
    - kube-system
    - monitoring
    - kubeshark
```

The `regex` field filters by pod name within the targeted namespaces. Leave as
`.*` unless the user wants to focus on specific pods.

Setting pod targeting rules causes Kubeshark to focus only on specific workloads,
which moderates compute consumption significantly.

#### Docker Registry (Air-Gapped Environments)

```yaml
tap:
  docker:
    registry: docker.io/kubeshark
    tag: ""
```

- `tap.docker.registry` — Change this for air-gapped environments where there's
  no access to `docker.io`. Point to your internal registry. Additional config
  may be needed (pull secrets, registry credentials).
- `tap.docker.tag` — Set a specific version. If a patch version is missing, the
  latest patch in that minor version is used. **Leave empty (recommended)** to
  use the version matching the Helm chart.

For air-gapped clusters, also set:

```yaml
internetConnectivity: false
```

This is the **most important setting for air-gapped clusters** — it disables all
outbound connectivity checks (license validation, telemetry, update checks).

#### Capture &