/service-mesh-gateway-skills:cilium-ebpf-cni-and-mesh-configurationfrom service-mesh-gateway-skills
Configures Cilium as an eBPF-based Kubernetes CNI including kube-proxy replacement, CiliumNetworkPolicy for L3/L4/L7 network policy, and sidecar-less service mesh. Useful when installing Cilium, replacing kube-proxy, writing network policies, or troubleshooting connectivity.
Ships in service-mesh-gateway-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.
Cilium sits at a different layer than the other meshes in this domain:
it's first a CNI plugin — the thing actually wiring up pod
networking — built on eBPF programs attached to the kernel's networking
hooks instead of iptables rules, which is what lets it also replace
kube-proxy's Service load-balancing and implement L3/L4/L7 network
policy without per-pod sidecar proxies for most of that functionality.
Its newer service-mesh capability builds on the same eBPF datapath (plus
Envoy for L7 cases that need it) rather than injecting a sidecar into
every pod, which is the core trade-off to understand versus
sidecar-based meshes: less per-pod overhead and simpler operations for
policy and L4 routing, at the cost of a feature set that's less mature
for complex L7 traffic management than Istio or a sidecar-based mesh.
This skill covers installing Cilium, enabling kube-proxy replacement,
writing CiliumNetworkPolicy, and using its mesh capability where
warranted. Validating policy and observability configuration before
production is a separate, deeper topic — see
cilium-configuration-validation.
Service
implementation for lower per-packet overhead at scale.CiliumNetworkPolicy for L3/L4 (IP/port) or L7 (HTTP
method/path, DNS, Kafka topic) traffic restriction.cilium CLI (separate from kubectl) for install, status, and
connectivity testing: cilium install, cilium status, cilium connectivity test.Service behavior.Install Cilium via the CLI, which handles CRD installation and validates cluster compatibility before applying:
cilium install --version <cilium-version>
cilium status --wait
Avoid pinning to latest implicitly — pick a specific version
deliberately so upgrades are a reviewed, intentional step.
Enable kube-proxy replacement explicitly, and confirm it's actually active rather than assuming the install flag alone guarantees it:
cilium install --set kubeProxyReplacement=true
cilium status --verbose | grep -i "KubeProxyReplacement"
If kube-proxy is already running in the cluster, plan its removal (typically a DaemonSet deletion) as part of the same migration window — leaving both active is unsupported.
Run the built-in connectivity test after any install or upgrade, before trusting the cluster is healthy:
cilium connectivity test
This exercises pod-to-pod, pod-to-service, and (if enabled) policy
enforcement paths across nodes, and is far more thorough than
eyeballing cilium status.
Write CiliumNetworkPolicy starting from default-deny per
namespace, then add explicit allows, mirroring standard
Kubernetes NetworkPolicy semantics but with L7-aware matching:
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: payments-api-ingress
namespace: payments
spec:
endpointSelector:
matchLabels: { app: payments-api }
ingress:
- fromEndpoints:
- matchLabels: { app: checkout-service }
toPorts:
- ports:
- port: "8080"
protocol: TCP
rules:
http:
- method: "GET"
path: "/charges/.*"
- method: "POST"
path: "/charges"
The rules.http block is Cilium enforcing an L7 policy (method +
path) directly in the eBPF/Envoy datapath — no sidecar required for
the L3/L4 portion; the L7 portion transparently routes through a
per-node (not per-pod) Envoy proxy Cilium manages.
Restrict egress, including DNS-aware policy, since plain IP-based egress rules are brittle against services with rotating IPs (most cloud APIs):
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: payments-api-egress
namespace: payments
spec:
endpointSelector:
matchLabels: { app: payments-api }
egress:
- toFQDNs:
- matchName: "api.stripe.com"
toPorts:
- ports: [{ port: "443", protocol: TCP }]
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports: [{ port: "53", protocol: UDP }]
rules: { dns: [{ matchPattern: "*" }] }
toFQDNs resolves and pins allowed egress to a DNS name rather than a
brittle static IP/CIDR.
Enable Hubble for flow-level observability before relying on network policy in production — you want visibility into what's being allowed/dropped before tightening further:
cilium hubble enable
cilium hubble port-forward &
hubble observe --namespace payments
hubble observe --verdict DROPPED
Consider Cilium's mesh capability only where the sidecar-less trade-off genuinely fits — L4 policy, kube-proxy replacement, and basic L7 HTTP policy are Cilium's strongest ground; if the need is deep L7 traffic shaping (complex retries, fault injection, rich traffic mirroring) across many protocols, compare against a sidecar-based mesh's more mature feature set (see service-mesh-istio for the ambient-mode comparison point, and linkerd-service-mesh-configuration for a lighter sidecar-based alternative) before committing.
Validate before production rollout, not just at initial install — see cilium-configuration-validation for the specific commands.
cilium connectivity test after every upgrade, not just the initial
install — eBPF datapath changes between versions can have subtle
effects that a quick cilium status glance won't catch.CiliumNetworkPolicy, then add
explicit allows scoped by label selector, mirroring the same
discipline used for standard Kubernetes NetworkPolicy — Cilium's L7
awareness doesn't change the underlying default-deny-first principle.toFQDNs over static IP/CIDR egress rules for any external
dependency whose IPs aren't fixed (which is most SaaS/cloud APIs) —
CIDR-based egress rules silently stop working when the provider
rotates IPs.Symptom: After enabling kubeProxyReplacement=true, some Services
become unreachable while others still work.
Fix: kube-proxy is likely still running alongside Cilium's
replacement, producing inconsistent/overlapping Service handling.
Confirm kube-proxy's DaemonSet is fully removed and cilium status --verbose reports KubeProxyReplacement: True/Strict before treating
the migration as complete.
Symptom: A CiliumNetworkPolicy egress rule using a static CIDR
for an external API stops working weeks after deployment, with no
policy change made.
Fix: The external provider rotated its IP range, which a
CIDR-based rule doesn't track. Switch to toFQDNs for any external
dependency identified by DNS name rather than a small set of fixed
IPs, and confirm the cluster's DNS egress is itself allowed (Cilium's
FQDN policy needs to observe the DNS lookup to learn the resolved IP).
Symptom: An L7 HTTP policy (rules.http with method/path
matching) is applied but traffic that should be blocked still gets
through.
Fix: L7 policy enforcement requires Cilium's per-node Envoy proxy
to actually be engaged for that traffic — confirm the policy's
toPorts.ports protocol/port matches the real traffic and check
cilium status for the L7 proxy's health; an L7 rule attached to a
port that doesn't match real traffic silently falls through to
whatever the L3/L4 rule alone would allow.
Symptom: Connectivity looks broken cluster-wide immediately after
a Cilium version upgrade.
Fix: Run cilium connectivity test immediately post-upgrade as
standard practice, and keep a rollback plan (previous Helm values/CLI
install command) ready — eBPF program changes between minor versions
have occasionally shifted default behavior; don't assume an upgrade is
purely additive.
Symptom: To resolve a connectivity failure during an incident,
someone applies a permissive CiliumNetworkPolicy allowing all
ingress/egress for the affected workload "to rule out policy as the
cause," and it's left in place after the incident closes.
Fix: This silently removes network policy protection for that
workload going forward. Treat a broad allow-all policy change as a
time-boxed diagnostic step only, confirm the actual root cause via
hubble observe --verdict DROPPED instead of guessing, and restore
the original scoped policy (or a corrected version of it) once the
real cause is found.
Scenario: Install Cilium with kube-proxy replacement, default-deny
payments namespace ingress/egress, allow only checkout-service to
call payments-api on specific routes, and allow egress to a specific
external payment processor by hostname.
cilium install --version <cilium-version> --set kubeProxyReplacement=true
cilium status --wait
cilium connectivity test
cilium hubble enable
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: payments-api-default-deny
namespace: payments
spec:
endpointSelector: {}
ingress: []
egress: []
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: payments-api-ingress
namespace: payments
spec:
endpointSelector:
matchLabels: { app: payments-api }
ingress:
- fromEndpoints:
- matchLabels: { app: checkout-service }
toPorts:
- ports: [{ port: "8080", protocol: TCP }]
rules:
http:
- method: "POST"
path: "/charges"
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: payments-api-egress
namespace: payments
spec:
endpointSelector:
matchLabels: { app: payments-api }
egress:
- toFQDNs:
- matchName: "api.stripe.com"
toPorts: [{ ports: [{ port: "443", protocol: TCP }] }]
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s-app: kube-dns
toPorts:
- ports: [{ port: "53", protocol: UDP }]
rules: { dns: [{ matchPattern: "*" }] }
kubectl apply -f payments-policies.yaml
hubble observe --namespace payments --verdict DROPPED
hubble observe confirms only checkout-service → payments-api:8080 POST /charges and payments-api → api.stripe.com:443 flows are
forwarded, with everything else in the namespace showing a DROPPED
verdict — giving concrete evidence the default-deny policy is enforcing
as intended before it's considered production-ready.
cilium-configuration-validation
covers the fuller pre-production validation pass.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cilium, ebpf, kubernetes-cni, service-mesh, network-policy, kube-proxy-replacement
11 skills in this plugin
/api-gateway-rate-limiting-and-quota-managementDesigns rate-limiting and quota strategy that applies across gateway tools — token bucket vs. sliding/fixed window algorithm choice, per-client vs. global vs. tiered limit scoping, burst allowance design, and distributed counter consistency — as the vendor-neutral layer underneath tool-specific plugins like Kong's `rate-limiting` or Apigee's `Quota`/`SpikeArrest`. Use when a user asks to "design a rate-limiting strategy," "choose between token bucket and sliding window," "set per-client vs. global API limits," "size a burst allowance," "why is my distributed rate limit inconsistent across nodes," or "protect a backend from one noisy client without punishing everyone else."
/apigee-api-management-and-governanceGoverns the full API lifecycle in Google Apigee (or comparable enterprise API-management platforms) — API proxy design, policy attachment (OAuth2/API key verification, quota, spike arrest, transformation), developer portal publishing, product-based monetization, and semantic versioning/deprecation of published APIs at organizational scale. Use when a user asks to "design an Apigee API proxy," "set up an API product for monetization," "version an API without breaking existing consumers," "add a spike arrest or quota policy in Apigee," "publish an API to a developer portal," or "govern API lifecycle across many teams."
/cilium-configuration-validationValidates CiliumNetworkPolicy, CiliumClusterwideNetworkPolicy, and Hubble observability configuration before a production rollout — syntax-checking policy files offline, confirming which endpoints and identities a policy actually selects, and using Hubble flow data to prove a policy enforces what it's meant to instead of trusting the YAML. Use when a user asks to "validate a CiliumNetworkPolicy before applying it," "check if this policy will actually match my pods," "confirm kube-proxy replacement is healthy before a rollout," "test an egress FQDN policy before merging," or "why is Hubble showing drops I didn't expect."
/consul-configuration-validationValidates Consul service definitions, config entries, and intentions (mesh-level authorization) before applying them to a production datacenter — syntax-checking agent config, dry-running catalog changes, and confirming intentions produce the intended allow/deny decisions. Use when a user asks to "validate a Consul service definition," "check my Consul config before applying," "test an intention before it goes live," "why did my Consul config entry not take effect," or "lint Consul HCL/JSON in CI."
/consul-service-mesh-and-discovery-configurationConfigures HashiCorp Consul as a combined service mesh and service discovery layer, especially across multi-cloud or hybrid (VM + Kubernetes, multi-datacenter) environments where a Kubernetes-only mesh doesn't reach. Covers Consul Connect sidecar injection, intentions, config entries (service-splitter, service-resolver, service-router), and cluster peering / WAN federation for cross-datacenter service discovery. Use when a user asks to "set up Consul service mesh," "federate Consul across datacenters," "register a VM service with Consul alongside Kubernetes services," "configure Consul Connect sidecars," or "do service discovery across cloud providers."
/grpc-service-troubleshootingDiagnoses gRPC-specific failure modes — DEADLINE_EXCEEDED, connection and keepalive/GOAWAY issues, HTTP/2 multiplexing problems behind L4/L7 load balancers, and protobuf/proto-compatibility breakage across client/server versions — distinct from generic HTTP ingress troubleshooting. Use when a user asks to "why is my gRPC call hanging or returning DEADLINE_EXCEEDED," "gRPC keepalive pings disconnecting my clients," "gRPC load balancing isn't spreading traffic across pods," "a proto field changed and now some clients fail," or "gRPC streaming call drops after N minutes."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin service-mesh-gateway-skillsOther plugins' skills for the same job