Troubleshooting
Common issues and how to resolve them
Common issues and how to diagnose them.
Installation problems
CRDs not registered
kubectl get crd | grep kubewafExpect at least: secrules, secactions, rulesets, wafs, wafinstances.
Operator pod CrashLooping
kubectl logs -n kubewaf-system -l app.kubernetes.io/name=kubewaf -fCommon causes:
- Missing RBAC (rare after correct Helm install)
- Failed wasm download (
--wasm-source-urlunreachable) — pod may still start but wasm serve returns 503 - Port conflicts on 18001 / 5005 / 18002
Multi-replica not electing leader
kubectl get lease -n kubewaf-systemEnsure --leader-elect=true and RBAC for coordination.k8s.io/leases.
Rule not enforced
-
Check WAF status:
kubectl describe waf <name> -n <ns>Look for
ReferencesResolvedandReady. -
Confirm ECDS identity:
kubectl get waf <name> -n <ns> -o jsonpath='{.status.ecdsResourceName}{"\n"}{.status.slotKind}{"\n"}' -
Provider-specific:
Provider Check Envoy Gateway EG ConfigMap extensionManager; operator Service:5005Istio kubectl get envoyfilter -n <ns>containsconfig_discoveryCilium kubectl get cec -n <ns>; Cilium Envoy Wasm support -
Wasm modules reachable:
# WAF engine curl -sI http://kubewaf-ecds.kubewaf-system.svc:18002/wasm/modsecurity-proxy-wasm.wasm # Challenge / PoW (if enabled) curl -sI http://kubewaf-ecds.kubewaf-system.svc:18002/wasm/challenge-proxy-wasm.wasmExpect
200,X-Checksum-Sha256, andX-Wasm-Module. -
Engine / challenge status:
kubectl get waf <name> -n <ns> -o jsonpath='{.status.engine}{" challenge="}{.status.challengeEnabled}{" secret="}{.status.challengeSecretName}{"\n"}' -
Raise WAF engine verbosity:
spec: logLevel: 7Then inspect Envoy proxy logs.
ReferencesResolved = False
- Missing SecRule / RuleSet
allowedRulesnamespace policy- Reference cycle
- Wrong
group/versionon RuleRef
Message is on the condition.
Ready = False with ECDS errors
- modsecurity-proxy-wasm not loaded on the operator (
/wasm/modsecurity-proxy-wasm.wasmor source URL) - Challenge enabled but challenge wasm missing, or managed Secret not created (
kubectl get secret <waf>-challenge-hmac) - Invalid HTTP URL / sha256 mismatch
- ECDS snapshot reject — check operator logs for
ECDS upsert
403 on every request
Usually CRS init / thresholds:
- Enable
crsEnable: true, or - Set
spec.crs.inboundAnomalyThresholdand paranoia explicitly
High latency / CPU
CRS at high paranoia is expensive.
- Lower
crs.paranoiaLevel - Use exclusions (
removeById,updateTargetById) - Split heavy RuleSets only onto sensitive routes
Multi-replica flapping / intermittent bypass
- All pods must run dataplane sync (built-in); verify every pod logs ECDS upserts
- Service must select all operator pods
- PDB / rolling update should keep at least one Ready pod
Envoy Gateway Extension Server errors
- Hostname/port must match operator Service
- NetworkPolicy allowing EG → operator:5005
policyResourcesmust includewaf.kubewaf.io/WAF- EG logs:
extension/ hook errors
Istio EnvoyFilter present but no effect
workloadSelectormust match ingress pods (istio: ingressgatewayetc.)context: GATEWAYvs sidecar contexts- Confirm Envoy has a second xDS stream to
kubewaf_ecds(not only istiod)
Cilium CEC present but no blocking
Expected on builds without Wasm. Treat CEC as the attachment artifact; consider ExtProc roadmap or run WAF on Envoy Gateway/Istio for full enforcement.
Collecting support info
kubectl get waf,ruleset,secrule -A -o yaml # redact secrets
kubectl logs -n kubewaf-system -l app.kubernetes.io/name=kubewaf --tail=200
kubectl get envoyfilter,ciliumenvoyconfig -A
# Envoy Gateway:
kubectl -n envoy-gateway-system logs deploy/envoy-gateway --tail=100