Install, by provider
Install Revetment on DigitalOcean Kubernetes.
Tested on a live cluster
We ran every command on this page, in order, on a throwaway DOKS cluster and deleted the cluster the same day.
- Tested on
- 17 November 2026
- Chart
- 0.1.0-722813e98f02
- Envoy Gateway
- v1.8.3
- Kubernetes
- 1.36.6-do.0
- Took
- 15 minutes
- Cost
- $0.27
Status: verified. Tested on 2026-11-17 with DOKS 1.36.6-do.0 (2 × s-2vcpu-4gb, nyc3), Envoy Gateway v1.8.3, Gateway API CRDs v1.5.1, and the Revetment chart oci://registry.revetment.io/charts/revetment version 0.1.0-722813e98f02. The raw terminal output is in transcripts/doks.log.
The guide was run twice. The first run hit the problems listed under “Gotchas” below. The second run used the commands exactly as written here, on a fresh cluster.
What you end up with
- Envoy Gateway runs the proxies. Each proxy uses Revetment’s data-plane image, which is upstream Envoy plus the Revetment module and the OWASP Core Rule Set.
- The Revetment chart runs a control plane (API and UI) and a controller that turns each
RevetmentPolicyinto an Envoy GatewayEnvoyExtensionPolicy. - An echo backend sits behind a
Gatewayand anHTTPRoute, with aRevetmentPolicyattached to the route. You check that it records attacks in shadow mode, then blocks them once you approve blocking.
Time and cost
| Step | Wall clock |
|---|---|
| Create the cluster | 8 min |
| Gateway API CRD fix + Envoy Gateway | 45 s |
| Revetment chart | 30–60 s |
| EnvoyProxy, demo app, load balancer | 45 s (the DigitalOcean LB answered as soon as the Gateway was Programmed) |
| Shadow test, sign-in, promotion, blocking test | 90 s |
| Teardown | 20 s, plus a minute for DigitalOcean to release the LB and volume |
Hands-on time once the cluster existed was about 7 minutes. Two s-2vcpu-4gb nodes cost $0.036 an hour each, the load balancer $0.018 an hour, and the 1 GiB volume rounds to zero. The DOKS control plane is free when it is not HA. Half an hour of testing costs about $0.05. Our two runs came to about $0.27, because one cluster sat idle for three hours.
Prerequisites
doctl, authenticated (doctl account getworks).kubectl. We used 1.35, which is within one minor version of the cluster.helm3.11 or newer. No registry login is needed: the chart and every image are public atregistry.revetment.io.curl,jq,openssl,python3with PyYAML (for the one-CRD extraction in step 2).
Use a kubeconfig file just for this cluster. If your default kubectl context points at a cluster you care about, this keeps every command below away from it.
export KUBECONFIG="$PWD/kube-revetment-doks"
1. Create the cluster
doctl kubernetes cluster create revetment-guide-doks \
--region nyc3 --version 1.36.6-do.0 \
--node-pool "name=pool-guide;size=s-2vcpu-4gb;count=2" \
--update-kubeconfig=false --wait
doctl kubernetes cluster kubeconfig show revetment-guide-doks > "$KUBECONFIG"
chmod 600 "$KUBECONFIG"
kubectl config current-context # must print do-nyc3-revetment-guide-doks
kubectl get nodes
--update-kubeconfig=false leaves ~/.kube/config alone. Check the context before every step that changes the cluster.
2. Upgrade the TLSRoute CRD, then install Envoy Gateway
DOKS installs the Gateway API CRDs at bundle v1.2.1 before you touch the cluster (Cilium ships them). Its tlsroutes CRD serves only v1alpha2, and Envoy Gateway 1.8.3 watches TLSRoute at v1, so Envoy Gateway crash-loops on startup:
failed to create gatewayapi controller: error watching resources:
no matches for kind "TLSRoute" in version "gateway.networking.k8s.io/v1"
The fix is to upgrade that one CRD to the v1.5.1 bundle (the bundle Envoy Gateway 1.8.3’s own chart carries) before installing Envoy Gateway:
curl -fsSL -o gateway-api-v1.5.1-experimental.yaml \
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.1/experimental-install.yaml
echo "64ec76609a6ac885e0405dea79ca509c229fa019d342f0857aa8b6bdc8b8ba92 gateway-api-v1.5.1-experimental.yaml" \
| shasum -a 256 -c -
python3 -c 'import sys, yaml
for d in yaml.safe_load_all(open(sys.argv[1])):
if d and d["metadata"]["name"] == "tlsroutes.gateway.networking.k8s.io":
print("---"); print(yaml.safe_dump(d))' \
gateway-api-v1.5.1-experimental.yaml > tlsroutes-v1.5.1.yaml
kubectl apply --server-side --force-conflicts -f tlsroutes-v1.5.1.yaml
kubectl get crd tlsroutes.gateway.networking.k8s.io -o jsonpath='{.spec.versions[*].name}{"\n"}'
Expected: v1 v1alpha2 v1alpha3. --force-conflicts is needed because DigitalOcean’s field manager owns the CRD.
Do not apply the whole experimental bundle on top of DOKS’s CRDs. We tried that in the first run. The bundle installs the upstream safe-upgrades ValidatingAdmissionPolicy, and that policy rejects five of the CRDs with Installing experimental CRDs on top of standard channel CRDs is prohibited by default, which leaves you with a mix of versions.
Now install Envoy Gateway:
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v1.8.3 \
-n envoy-gateway-system --create-namespace --wait --timeout 5m
kubectl -n envoy-gateway-system get pods
Expected: envoy-gateway-… 1/1 Running. The helm chart creates any Gateway API CRDs that are missing at v1.5.1 and leaves the existing ones as they are.
3. Install Revetment
The proxies send their events to the control plane over HTTP, so both sides need a shared token. You create it yourself (the chart never generates a credential) in both namespaces:
umask 077
openssl rand -hex 32 | tr -d '\n' > ingest-token
kubectl create namespace revetment-system
kubectl -n revetment-system create secret generic revetment-ingest --from-file=token=ingest-token
kubectl -n envoy-gateway-system create secret generic revetment-ingest --from-file=token=ingest-token
rm -f ingest-token
The tr -d '\n' matters: a trailing newline would end up inside an HTTP header.
Save the values as revetment-values.yaml:
dataPlane:
enabled: false # Envoy Gateway owns the proxy pods
eventDelivery:
mode: network # proxies POST events to the control plane; no shared volume
network:
existingSecret: revetment-ingest
controlPlane:
eventSource:
type: emptyDir
persistence:
enabled: true
storageClassName: do-block-storage
edgeLimits:
enabled: false # its default targets a Gateway this guide does not create
eventDelivery.mode: network is what makes a two-node cluster work. The default (sharedVolume) expects the proxy and the control plane to share a directory on one node. persistence keeps the control plane’s SQLite database on a block volume, so a restart doesn’t lose events or the admin account.
helm install revetment oci://registry.revetment.io/charts/revetment \
--version 0.1.0-722813e98f02 \
-n revetment-system -f revetment-values.yaml --wait --timeout 5m
kubectl -n revetment-system get deploy,pvc
Expected:
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/revetment-control-plane 1/1 1 1 27s
deployment.apps/revetment-controller 1/1 1 1 27s
NAME STATUS ... STORAGECLASS
persistentvolumeclaim/revetment-control-plane-data Bound ... do-block-storage
4. Point Envoy Gateway at the Revetment data plane
Save this as envoyproxy.yaml. It does four things:
- swaps the proxy image for Revetment’s data-plane image;
- allowlists the module, so an
EnvoyExtensionPolicyis allowed to load it; - gives the proxy a local buffer for events;
- tells the proxy where to ship those events.
The GatewayClass at the bottom applies all of this to every Gateway of class revetment.
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: revetment-proxy
namespace: envoy-gateway-system
spec:
dynamicModules:
- name: revetment-envoy-module # must be exactly this name
source:
type: Local
local:
path: /etc/revetment/librevetment_envoy_module.so
doNotClose: true
loadGlobally: false
provider:
type: Kubernetes
kubernetes:
envoyDeployment:
container:
image: registry.revetment.io/data-plane:0.1.0@sha256:e17df8a82f680ea3e00f4c6263f975c986be89aaf012d6b4e5b1200d9c7930f1
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 1024Mi
volumeMounts:
- name: revetment-events
mountPath: /data/revetment-logs
subPath: revetment-logs
env:
- name: REVETMENT_EVENT_SHIP_URL
value: http://revetment-control-plane.revetment-system.svc.cluster.local:8080/api/ingest/events
- name: REVETMENT_EVENT_SHIP_TOKEN
valueFrom:
secretKeyRef:
name: revetment-ingest
key: token
- name: REVETMENT_EVENT_SHIP_SOURCE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: REVETMENT_EVENT_SHIP_POLL_SECONDS
value: "2"
pod:
volumes:
- name: revetment-events
emptyDir: {}
---
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: revetment
spec:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: revetment-proxy
namespace: envoy-gateway-system
The image digest is the one chart 0.1.0-722813e98f02 pins in dataPlane.image. If you install a different chart version, take the digest from its values.yaml.
5. Deploy a demo backend behind a Gateway
Save as demo.yaml:
apiVersion: v1
kind: Namespace
metadata:
name: demo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo
namespace: demo
spec:
replicas: 1
selector:
matchLabels: {app: echo}
template:
metadata:
labels: {app: echo}
spec:
containers:
- name: echo
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20231214-v1.0.0-140-gf544a46e
ports:
- containerPort: 3000
env:
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath: metadata.name}}
- name: NAMESPACE
valueFrom: {fieldRef: {fieldPath: metadata.namespace}}
resources:
requests: {cpu: 10m, memory: 16Mi}
---
apiVersion: v1
kind: Service
metadata:
name: echo
namespace: demo
spec:
selector: {app: echo}
ports:
- port: 8080
targetPort: 3000
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: demo
namespace: demo
spec:
gatewayClassName: revetment
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: echo
namespace: demo
spec:
parentRefs:
- name: demo
rules:
- backendRefs:
- name: echo
port: 8080
kubectl apply -f envoyproxy.yaml -f demo.yaml
kubectl -n demo wait --for=condition=Programmed gateway/demo --timeout=300s
kubectl -n demo get gateway demo
GW=$(kubectl -n demo get gateway demo -o jsonpath='{.status.addresses[0].value}')
curl -s -o /dev/null -w "sqli before any policy: %{http_code}\n" "http://$GW/?id=1%27%20OR%20%271%27%3D%271"
Expected: the Gateway shows PROGRAMMED True with a public IP (a DigitalOcean load balancer), and the SQL injection request returns 200 because nothing is inspecting traffic yet.
6. Attach a policy in shadow mode
Save as policy.yaml:
apiVersion: revetment.io/v1alpha1
kind: RevetmentPolicy
metadata:
name: echo
namespace: demo
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: echo
mode: shadow
paranoiaLevel: 1
kubectl apply -f policy.yaml
kubectl -n demo wait --for=jsonpath='{.status.conditions[?(@.type=="Accepted")].status}'=True \
revetmentpolicy/echo --timeout=120s
kubectl -n demo get revetmentpolicy echo -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.message}{"\n"}{end}'
Expected:
Accepted=True attached to route echo (0 exception(s), 0 source rule(s), mode Shadow, stage 100%)
The route itself is not edited. The controller writes a separate EnvoyExtensionPolicy called echo-revetment that points at it.
Send a mix of traffic:
for i in 1 2 3; do
curl -s -o /dev/null -w "benign: %{http_code}\n" "http://$GW/?q=hello"
curl -s -o /dev/null -w "sqli: %{http_code}\n" "http://$GW/?id=1%27%20OR%20%271%27%3D%271"
curl -s -o /dev/null -w "xss: %{http_code}\n" "http://$GW/?q=%3Cscript%3Ealert(1)%3C%2Fscript%3E"
done
Every line is 200, because shadow mode only records. The next step reads back what was recorded.
7. Sign in to the control plane
The console has no password. You sign in with an emailed link or a passkey, and email needs Amazon SES configured (controlPlane.signIn.ses in the chart). For an evaluation cluster without SES, use the chart’s break-glass setting. It prints a one-time sign-in link for the bootstrap admin (admin@localhost) to the control-plane log, valid for 15 minutes. Save as break-glass.yaml:
controlPlane:
extraEnv:
- name: REVETMENT_CONTROL_PLANE_BREAK_GLASS_LINK
value: admin@localhost
helm upgrade revetment oci://registry.revetment.io/charts/revetment --version 0.1.0-722813e98f02 \
-n revetment-system -f revetment-values.yaml -f break-glass.yaml --wait --timeout 5m
umask 077
kubectl -n revetment-system logs deploy/revetment-control-plane \
| grep -o 'token=[0-9a-f]*' | tail -1 | cut -d= -f2 | tr -d '\n' > signin-token
kubectl -n revetment-system port-forward svc/revetment-control-plane 18080:8080 >/dev/null 2>&1 &
CP=http://127.0.0.1:18080
printf '{"token":"%s"}' "$(cat signin-token)" > verify.json
curl -s -o /dev/null -w "verify: %{http_code}\n" -c cookies \
-X POST $CP/api/auth/verify -H 'content-type: application/json' --data-binary @verify.json
rm -f verify.json signin-token
Expected: verify: 200. The token goes to a file and never to your screen. The log line holding it is a live credential for 15 minutes, so treat the pod log as sensitive until then.
If you would rather use the browser: open http://127.0.0.1:18080/auth/verify?token=… with the token from the log while the port-forward runs. We used the API so that every step could be copied.
Now read the shadow events:
curl -s -b cookies "$CP/api/events?limit=50" \
| jq -r '.events[] | [.id, .mode, .verdict, .rule_id, .matched_variable, .upstream_status] | @tsv'
Real output from the verified run:
6 shadow would_block 941390 ARGS_GET:q 200
5 shadow would_block 942100 ARGS_GET:id 200
4 shadow would_block 941390 ARGS_GET:q 200
3 shadow would_block 942100 ARGS_GET:id 200
2 shadow would_block 941390 ARGS_GET:q 200
1 shadow would_block 942100 ARGS_GET:id 200
942100 is CRS’s libinjection SQL injection rule and 941390 its JavaScript-method XSS rule. Every event has verdict: would_block and the backend still answered 200, which is what shadow mode should do. The benign requests produced no events. A full event also carries the matched text, the client address, the anomaly score and a suggested scoped exception.
8. Switch to blocking
Setting mode: blocking on the policy is a request. Revetment holds the route in shadow until someone approves it on the console, after seeing how many requests it would have blocked:
kubectl -n demo patch revetmentpolicy echo --type merge -p '{"spec":{"mode":"blocking"}}'
kubectl -n demo get revetmentpolicy echo -o jsonpath='{range .status.conditions[*]}{.type}={.status} reason={.reason}{"\n"}{end}'
Expected:
Accepted=False reason=BlockingNotApproved
Approve it by promoting the route through 1%, 10% and 100% of clients. That is the only order the console accepts, and each step must echo back the blast-radius estimate it was shown. The console UI does this under Triage, in the “Promote a route to blocking” section. The API equivalent:
for pct in 1 10 100; do
ack=$(curl -s -b cookies $CP/api/routes/echo/blast-radius \
| jq -c '{would_block_requests,distinct_clients,computed_at_unix_ms,computed_through_event_id}')
curl -s -o /dev/null -w "promote to $pct%%: %{http_code}\n" -b cookies \
-X POST $CP/api/routes/echo/promotion -H 'content-type: application/json' \
-d "{\"stage_percent\":$pct,\"auto_rollback_threshold\":1.0,\"acknowledged_blast_radius\":$ack}"
kubectl -n demo wait --for=jsonpath='{.spec.dynamicModule[0].config.rollout.stagePercent}'=$pct \
envoyextensionpolicy/echo-revetment --timeout=120s
done
Expected: three 201s, each followed by condition met once the controller has applied the stage. The controller polls the control plane every 15 seconds.
auto_rollback_threshold: 1.0 turns off automatic rollback for this test. The test traffic is mostly attacks, and the product default (0.05) would roll the stage back on its own. On a real route, keep the default.
Check the policy and send the same traffic again:
kubectl -n demo wait --for=jsonpath='{.status.conditions[?(@.type=="Accepted")].status}'=True \
revetmentpolicy/echo --timeout=120s
kubectl -n demo get revetmentpolicy echo
for i in 1 2 3; do
curl -s -o /dev/null -w "benign: %{http_code}\n" "http://$GW/?q=hello"
curl -s -o /dev/null -w "sqli: %{http_code}\n" "http://$GW/?id=1%27%20OR%20%271%27%3D%271"
curl -s -o /dev/null -w "xss: %{http_code}\n" "http://$GW/?q=%3Cscript%3Ealert(1)%3C%2Fscript%3E"
done
Real output:
NAME MODE ROUTE AGE
echo blocking echo 4m49s
benign: 200
sqli: 403
xss: 403
benign: 200
sqli: 403
xss: 403
benign: 200
sqli: 403
xss: 403
The policy now reads Accepted=True … mode Blocking, stage 100%. In the first run, the events API listed the blocked requests with mode: blocking, verdict: block.
Finally, remove the break-glass variable so later restarts don’t mint more links:
helm upgrade revetment oci://registry.revetment.io/charts/revetment --version 0.1.0-722813e98f02 \
-n revetment-system -f revetment-values.yaml --wait --timeout 5m
kill %1; rm -f cookies
Blocking carries on through that restart (sqli: 403 straight afterwards in our run). Your console session does not. Sessions are tied to the Helm revision, so sign in again if you need the API.
Teardown
Delete the in-cluster objects first, so DigitalOcean releases the load balancer and the volume while the cluster can still tell it to:
kubectl config current-context # must print do-nyc3-revetment-guide-doks
kubectl delete -f demo.yaml --wait=true --timeout=180s # removes the load balancer
helm uninstall revetment -n revetment-system --wait
kubectl -n revetment-system delete pvc revetment-control-plane-data # the chart keeps it on uninstall
doctl kubernetes cluster list-associated-resources revetment-guide-doks
doctl kubernetes cluster delete revetment-guide-doks --dangerous --force
Then check that nothing billable is left, and delete any volume whose name matches a PVC from this cluster:
doctl kubernetes cluster list
doctl compute load-balancer list
doctl compute volume list
Gotchas
- The TLSRoute CRD (step 2). On a fresh DOKS cluster Envoy Gateway 1.8.3 crash-loops until
tlsroutesservesv1. Upgrade only that CRD. The full experimental bundle is partly refused by its ownsafe-upgradespolicy. - Cilium’s Gateway API controller is on. New DOKS clusters run with
enable-gateway-api: trueand aciliumGatewayClass. It did not interfere, because our Gateway uses classrevetment. Don’t putgatewayClassName: ciliumon a Gateway you want Revetment on. --dangerousdid not delete the volume. In the first run,doctl kubernetes cluster delete --dangerousremoved the load balancer, but the 1 GiB volume behind the control plane’s PVC was still there afterwards. We deleted it by hand. In the second run we deleted the PVC first. The volume was still releasing when the cluster was deleted, and DigitalOcean removed it a few minutes later. Checkdoctl compute volume listeither way.- Helm keeps the PVC. The chart marks
revetment-control-plane-datawithhelm.sh/resource-policy: keep, sohelm uninstallleaves the claim and its volume behind. That is deliberate: a reinstall picks the data back up. - A transient API error during
helm install. In the second run, the DOKS API server dropped a connection mid-install (unexpected EOF), and the release was leftpending-install.helm uninstall revetment -n revetment-systemfollowed by the samehelm installfixed it. TheRevetmentPolicywe had already applied was picked up as soon as the controller started. - Port 8080 may already be in use on your machine.
kubectl port-forwardthen fails in the background without a message, andcurlreaches whatever else is on that port. That is why this guide forwards to18080. - Node size. In the repository’s pilot, a proxy carrying the module sat near 820 MiB cold, and one grew past 2 GiB under repeated test runs before it was evicted (
docs/runbooks/pilot-cluster.md,docs/KNOWN-GAPS.md§29). The 1024 Mi limit above bounds it.s-2vcpu-4gbwas enough for this test but not for a soak. - Blocking needs a sign-in. Without SES configured, break-glass is the only way to sign in. Plan for SES, or for passkeys enrolled after the first sign-in, before you rely on the console.
Other providers