kubeWAF is under active development — feedback and stars on GitHub are very welcome!
kubeWAFkubeWAF
kubeWAFmodsecurity-proxy-wasmpow-proxy-wasm

Cilium

Protect traffic with kubeWAF and Cilium

Use kubeWAF with Cilium L7 / Gateway API. The operator creates a CiliumEnvoyConfig (CEC) that documents ECDS connectivity and attaches to a Kubernetes Service.

Envoy feature set

Cilium ships a minimal Envoy. Wasm and ECDS availability depend on your Cilium version and build options. kubeWAF always creates the CEC slot; full request blocking requires a Cilium data plane that can load the filter.

How it works

Prerequisites

  • Cilium with Envoy / L7 proxy (and ideally Gateway API if you use Gateways)
  • CRD ciliumenvoyconfigs.cilium.io
  • kubeWAF operator with ECDS + wasm
  • A Service to attach the CEC to (usually your app or gateway Service)

Example

apiVersion: waf.kubewaf.io/v1beta1
kind: WAF
metadata:
  name: shop-waf
  namespace: shop
spec:
  provider:
    type: Cilium
    cilium:
      serviceName: shop-frontend
      serviceNamespace: shop
  parentRefs:
    targetRef:
      group: gateway.networking.k8s.io
      kind: Gateway
      name: demo-gateway
  ruleRefs:
  - kind: RuleSet
    name: shop-rules
  crsEnable: false
  logLevel: 3

Resulting object

CiliumEnvoyConfig/kubewaf-shop-waf  (namespace shop)

Status:

FieldExpected
status.providerCilium
status.slotKindCiliumEnvoyConfig
status.slotNamekubewaf-shop-waf
kubectl get cec -n shop
kubectl get ciliumenvoyconfig kubewaf-shop-waf -n shop -o yaml

Capabilities matrix (practical)

CapabilityTypical status
CEC created by kubeWAFAlways
ECDS clusters in CECAlways
Wasm filter enforcementDepends on Cilium Envoy build
Gateway API GatewayClass ciliumOptional; install Gateway API + enable Cilium Gateway

Debugging

  1. CEC not created — RBAC for cilium.io/ciliumenvoyconfigs; operator logs
  2. Service not proxied — wrong cilium.serviceName / namespace
  3. No blocking — verify Cilium Envoy supports Wasm; check agent logs
  4. Experimental traffic e2eE2E_CILIUM_TRAFFIC=true in e2e suite

Future directions

  • ExtProc-based path for clusters without Wasm
  • Tighter Gateway API attachment once Cilium exposes a stable filter policy API

On this page