# Calico

> Kubernetes networking and security with Calico: network policies, IPAM, and node status via calicoctl. Use when working with calicoctl, devops or when the user mentions calicoctl, devops.

- Skill: `opknock/calico` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/calico`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/calico/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/calico

---


Kubernetes networking and security with Calico: network policies, IPAM, and node status via calicoctl.

## Agentic Workflow: Read -> Reason -> Act (calico)

You are **calico** (devops/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — devops context for `calico`
- Domain: Kubernetes networking and security with Calico: network policies, IPAM, and node status via calicoctl.
- **calicoctl**: Manage Calico network policies, IP pools, and node health — `calicoctl node status`
- Check `knowledge` and `prerequisites: calicoctl`

### 2. Reason — think for `calico`
- For `calicoctl`: Manage Calico network policies, IP pools, and node health — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `calico` tools
- Tools: `Glob`, `Grep`, `Read`, `Calicoctl` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `calico:3cbb87ae`

# Calico

Kubernetes CNI with policy enforcement: secure network policies, IP pool
management, and cluster health.

## When to Use

- Enforcing namespace/tenant isolation
- Controlling egress to the internet
- Diagnosing pod connectivity issues

## Real Commands

```bash
# Cluster state
sudo calicoctl node status
sudo calicoctl get nodes

# Policies
sudo calicoctl apply -f policy.yaml
sudo calicoctl get networkpolicy -o yaml
sudo calicoctl get networkpolicy --namespace=default -o wide
sudo calicoctl delete networkpolicy deny-all --namespace=default

# IPAM
sudo calicoctl ipam show
sudo calicoctl get ippool -o wide

# BGP
sudo calicoctl get bgppeer -o yaml
```

## Policy Example (policy.yaml)

```yaml
apiVersion: projectcalico.org/v3
kind: NetworkPolicy
metadata:
  name: app-only-ingress
  namespace: payments
spec:
  selector: app == 'api'
  ingress:
    - action: Allow
      protocol: TCP
      source:
        namespaceSelector: projectcalico.org/name == 'web'
      destination:
        ports: [8080]
```

## Best Practices

- Start with default-deny per namespace, then allow what's needed
- Use namespace selectors, not hardcoded IPs
- Test policy changes on staging namespaces first
- Check `calicoctl node status` when pods can't reach each other
- Watch IP pool exhaustion with ipam show

## Example Response

For connectivity failure: checks node status, IPAM, and policy selectors, then
applies the correct policy and verifies traffic.

## Capabilities

### calicoctl
Manage Calico network policies, IP pools, and node health

**Parameters:**
- `namespace` (string): Namespace scope for policies
- `output` (string): Output format: yaml, json, wide
- `filename` (string): Policy manifest file for apply/delete (-f)

**Commands:**
- `calicoctl node status`
- `calicoctl get nodes`
- `calicoctl apply -f policy.yaml`
- `calicoctl get networkpolicy -o yaml`
- `calicoctl ipam show`

**Examples:**
- calicoctl get ippool -o wide
- calicoctl delete networkpolicy deny-all --namespace=default
- calicoctl get bgppeer -o yaml

## References
- [Calico docs](https://docs.tigera.io/calico/)
- [Calico network policy guide](https://docs.tigera.io/calico/latest/network-policy/)

