/kubernetes-platform-skills:cni-networking-calico-flannelfrom kubernetes-platform-skills
Guides choosing and installing a Kubernetes CNI plugin — Calico vs. Flannel — covering NetworkPolicy enforcement, BGP vs. VXLAN data paths, and IPAM tradeoffs. Use when selecting, debugging, or migrating CNI plugins.
Ships in kubernetes-platform-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The CNI plugin is what actually gives every pod an IP and moves packets
between nodes — everything above it (Services, Ingress, NetworkPolicy,
a service mesh's sidecar interception) depends on it working correctly.
Flannel and Calico are the two most common choices for self-managed
clusters, and they solve different problems: Flannel is a simple overlay
network with no built-in policy enforcement, while Calico adds
NetworkPolicy enforcement and, optionally, a non-overlay BGP data
path. Picking the wrong one for the requirement (e.g. Flannel when
NetworkPolicy isolation is actually needed) produces a cluster where
security policy is silently a no-op. This skill covers choosing between
them and installing/troubleshooting each.
NetworkPolicy resource is applied but pods can still reach each
other across the denied path — diagnosing whether the CNI even
enforces NetworkPolicy.kubeadm init
leaves nodes NotReady until a CNI is applied) or an explicit,
planned migration window if replacing an existing CNI on a live
cluster.Decide based on actual requirements, not familiarity:
NetworkPolicy enforcement is not required (or is handled by a
separate policy engine) and operational simplicity is the priority
— it has fewer moving parts and a smaller learning curve.NetworkPolicy enforcement is required
(namespace isolation, default-deny postures, egress control), when
a non-overlay BGP data path is wanted for performance or
network-visibility reasons, or when advanced policy (Calico's own
GlobalNetworkPolicy, tiered policy, host endpoint protection)
is needed beyond what native Kubernetes NetworkPolicy supports.NetworkPolicy enforcement is a stated security
requirement — it typically requires pairing with a separate
policy engine (e.g. Calico running in policy-only mode alongside
Flannel's dataplane, a supported combination via Canal) rather than
assuming plain Flannel enforces anything.Install Flannel (VXLAN backend, the common default):
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
Confirm the pod CIDR passed to kubeadm init --pod-network-cidr=...
matches Flannel's expected default (10.244.0.0/16) or override
Flannel's net-conf.json ConfigMap to match your chosen CIDR —
mismatches here leave nodes stuck NotReady.
Install Calico via the Tigera Operator (recommended over raw manifests for lifecycle management):
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/tigera-operator.yaml
# custom-resources.yaml
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
calicoNetwork:
ipPools:
- cidr: 192.168.0.0/16
encapsulation: VXLANCrossSubnet # overlay only across subnets, native routing within
kubectl create -f custom-resources.yaml
watch kubectl get tigerastatus
Choose Calico's data path deliberately:
VXLAN/IPIP (overlay): works across any L3 network without
requiring BGP peering with physical routers; simplest to deploy on
cloud VPCs or networks you don't control the routing on.VXLANCrossSubnet/IPIPCrossSubnet hybrid: encapsulates only when
crossing an L3 subnet boundary, giving native routing performance
within a subnet and overlay compatibility across subnets — a
reasonable default when unsure.Enforce NetworkPolicy once Calico (or Canal) is installed:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-all-ingress
namespace: payments
spec:
podSelector: {}
policyTypes: ["Ingress"]
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-frontend
namespace: payments
spec:
podSelector: { matchLabels: { app: payments-api } }
policyTypes: ["Ingress"]
ingress:
- from:
- podSelector: { matchLabels: { app: frontend } }
ports:
- { protocol: TCP, port: 8080 }
Apply default-deny before allow-rules in a namespace being locked down, and verify with a connectivity test from both an allowed and a denied source before considering the policy complete.
For BGP mode, verify peering status:
calicoctl node status
calicoctl get bgppeer
A node showing peers in a non-Established state has broken pod
routing to/from that node even though the node itself is Ready.
Validate cross-node pod connectivity directly when debugging, independent of any application-level assumption:
kubectl run net-test --image=busybox:1.36 --rm -it --restart=Never -- \
wget -qO- --timeout=2 <target-pod-ip>:<port>
Combine with kubectl get pods -o wide to confirm which nodes the
source/destination land on — same-node connectivity working while
cross-node fails points squarely at the CNI's inter-node data path
(VXLAN interface, BGP route, or a firewall blocking the
encapsulation protocol/port between nodes).
/24 per node
block only fits 254 pods; undershoot this and nodes silently stop
being able to schedule new pods once the block is exhausted, well
before hitting the node's actual pod-count limit.NetworkPolicy enforcement,
confirm the CNI actually implements the full NetworkPolicy API
(Calico does; plain Flannel does not) rather than assuming any CNI
plugin enforces policy resources it accepts without erroring.calico-node, flanneld) monitored
like any other critical system DaemonSet — a crash-looping CNI pod on
one node silently breaks networking for every pod scheduled there
afterward, often without an obvious top-level cluster alert.NetworkPolicy changes with both a positive (should connect) and
negative (should be blocked) case — a policy that "does nothing" due
to a selector typo looks identical to a correctly-applied allow-all
policy until you test the deny path explicitly.Symptom: NetworkPolicy resources apply without error, but
traffic that should be denied still gets through.
Fix: Confirm the CNI actually enforces NetworkPolicy — plain
Flannel accepts the resource via the Kubernetes API (any CNI can, since
the API server doesn't require a specific CNI to store the object) but
does not enforce it without a paired policy engine. Check
kubectl get pods -n kube-system for a policy-enforcing component
(calico-node, kube-router) actually running; if absent, the
NetworkPolicy is a no-op regardless of how correct it looks.
Symptom: New nodes join the cluster and stay NotReady
indefinitely with a CNI-related error in kubectl describe node.
Fix: Usually a pod CIDR mismatch between what kubeadm/the
cluster bootstrap configured and what the CNI's ConfigMap/IPPool
expects, or the CNI DaemonSet pod failing to schedule on that node
(check taints/tolerations). Confirm --pod-network-cidr (kubeadm) or
the cluster provisioner's pod CIDR setting matches the CNI's
configured pool exactly.
Symptom: Pods on the same node can reach each other, but
cross-node pod-to-pod traffic times out.
Fix: The overlay's encapsulation traffic (VXLAN UDP/4789 for
Flannel/Calico VXLAN mode, IP protocol 4 for IPIP) is being blocked
by a host firewall, security group, or NACL between nodes — this is
an infrastructure-firewall problem, not a Kubernetes-level
misconfiguration, and is invisible to kubectl since the API server
reports the node Ready regardless.
Symptom: After switching Calico from overlay to native BGP mode (or vice versa) on an existing cluster, some pods lose connectivity intermittently for an extended period. Fix: Changing the data-path mode requires every node to converge on the new mode; a rolling, mixed-mode state where some nodes still expect encapsulated traffic and others expect native routing produces intermittent failures until all nodes finish converging. Treat this as a planned, monitored migration with a rollback plan, not a live config flip on a single-digit-minute change window.
Symptom: BGP-mode Calico shows nodes Ready in Kubernetes but
calicoctl node status shows peers stuck in Active/Connect
(never Established).
Fix: BGP session isn't forming — check that nothing between nodes
blocks TCP/179, and that any router-reflector or peering
configuration (for non-full-mesh topologies) matches on both sides.
Kubernetes-level node readiness does not reflect BGP peering health at
all.
Scenario: Bring up a new self-managed 3-node kubeadm cluster with
Calico in VXLANCrossSubnet mode, then lock down a namespace to
default-deny with an explicit allow rule.
kubeadm init --pod-network-cidr=192.168.0.0/16
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/tigera-operator.yaml
# custom-resources.yaml
apiVersion: operator.tigera.io/v1
kind: Installation
metadata: { name: default }
spec:
calicoNetwork:
ipPools:
- cidr: 192.168.0.0/16
encapsulation: VXLANCrossSubnet
natOutgoing: Enabled
kubectl create -f custom-resources.yaml
watch kubectl get tigerastatus
kubectl get nodes # confirm all nodes reach Ready
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: default-deny, namespace: payments }
spec: { podSelector: {}, policyTypes: ["Ingress"] }
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: allow-frontend, namespace: payments }
spec:
podSelector: { matchLabels: { app: payments-api } }
policyTypes: ["Ingress"]
ingress:
- from: [{ podSelector: { matchLabels: { app: frontend } } }]
ports: [{ protocol: TCP, port: 8080 }]
kubectl apply -f netpol.yaml
# negative test: should time out
kubectl run probe --image=busybox:1.36 --rm -it --restart=Never -n payments -- \
wget -qO- --timeout=2 payments-api:8080
# positive test from an allowed pod: should succeed
kubectl exec -n payments deploy/frontend -- wget -qO- --timeout=2 payments-api:8080
The first probe (unlabeled pod) times out, confirming default-deny is
active; the second (from a frontend-labeled pod) succeeds, confirming
the allow rule and Calico's policy enforcement are both working as
intended.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
35 skills in this plugin
/cert-manager-tls-automationGuides installing and configuring cert-manager for automated TLS certificate issuance and renewal — Issuers vs. ClusterIssuers, ACME/ Let's Encrypt HTTP-01 and DNS-01 challenges, private-CA issuance, and integration with Ingress-nginx and Istio gateways. Use when a user asks to "automate TLS certificates on Kubernetes," "set up cert-manager with Let's Encrypt," "fix a stuck Certificate that won't become Ready," "use DNS-01 for a wildcard cert," "rotate mTLS certs automatically," or "issue certs from an internal CA."
/complete-kubernetes-deployment-on-aks-from-scratchSequences a complete, end-to-end AKS deployment from a bare Azure subscription to a production-ready cluster serving a first workload — Azure landing zone prerequisites, AKS cluster and node pool provisioning, Azure CNI (with the Calico/Cilium alternative noted), ingress (Application Gateway Ingress Controller vs. ingress-nginx), cert-manager with Azure DNS, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on AKS from scratch," "set up a new AKS environment end to end," "build a production AKS cluster from a fresh Azure subscription," or "give me the full sequence to go from nothing to a working AKS cluster."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin kubernetes-platform-skillsOther plugins' skills for the same job