Install, by provider
Install Revetment on Google Kubernetes Engine.
Tested on a live cluster
We ran every command on this page, in order, on a throwaway GKE 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.4-gke.2377000
- Took
- 21 minutes
- Cost
- $0.09
Status: verified. Tested on 2026-11-17 with GKE 1.36.4-gke.2377000 (zonal Standard cluster in us-central1-a, 2 × e2-standard-2), Envoy Gateway v1.8.3, Gateway API CRDs v1.5.1 (installed by the Envoy Gateway chart), and the Revetment chart oci://registry.revetment.io/charts/revetment version 0.1.0-722813e98f02. The raw terminal output is in transcripts/gke.log.
This guide ran once, start to finish, in a new project made for the test. Before that run, a first attempt stopped at billing; see “Gotchas”.
What you end up with
- A dedicated Google Cloud project with a two-node zonal GKE Standard cluster.
- 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
Gateway(a GCP network load balancer) and 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 |
|---|---|
| Project, billing link, enable the GKE API | 80 s |
| Create the cluster | 7 min |
| Envoy Gateway | 55 s |
| Revetment chart | 39 s |
| EnvoyProxy, demo app, load balancer | 103 s from kubectl apply until the load balancer answered |
| Shadow test, sign-in, promotion, blocking test | 2.5 min |
| Teardown, including deleting the project | 6 min (5 of them deleting the cluster) |
The whole run took about 21 minutes. Prices in us-central1: each e2-standard-2 node is about $0.067 an hour, the zonal cluster’s management fee $0.10 an hour (GKE’s free tier credits one zonal cluster per billing account, which may cover it), the load balancer’s forwarding rule $0.025 an hour, and the 2 × 30 GB boot disks plus the 1 GiB volume about $0.01 an hour. This run cost about $0.09.
Prerequisites
gcloud, signed in, with permission to create projects and link them to a billing account.gke-gcloud-auth-plugin, which kubectl needs to talk to GKE:gcloud components install gke-gcloud-auth-plugin. A Homebrew install of the SDK puts the plugin in the SDK’s ownbindirectory, which is not onPATH. Add it withexport PATH="$(dirname "$(readlink -f "$(which gcloud)")"):$PATH".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.
Use a kubeconfig file just for this cluster, and pass --project on every gcloud command. That leaves your default kubectl context and gcloud’s default project unchanged.
export KUBECONFIG="$PWD/kube-revetment-gke"
P=revetment-guide-test-$(openssl rand -hex 3)
BILLING_ACCOUNT=<your billing account ID> # gcloud billing accounts list
1. Create the project and the cluster
gcloud projects create $P --name="revetment guide test" --labels=project=revetment-guide-test
gcloud billing projects link $P --billing-account=$BILLING_ACCOUNT
gcloud services enable container.googleapis.com --project=$P
gcloud container clusters create revetment-guide-gke --project=$P --zone=us-central1-a \
--num-nodes=2 --machine-type=e2-standard-2 --disk-size=30 \
--labels=project=revetment-guide-test
gcloud container clusters get-credentials revetment-guide-gke --project=$P --zone=us-central1-a
chmod 600 "$KUBECONFIG"
kubectl config current-context # must print gke_<project>_us-central1-a_revetment-guide-gke
kubectl get nodes
get-credentials writes into the file $KUBECONFIG names, not into ~/.kube/config. Check the context before every step that changes the cluster.
2. Install Envoy Gateway
A new GKE Standard cluster has no Gateway API CRDs (kubectl get gatewayclass answers the server doesn't have a resource type "gatewayclass"). Envoy Gateway’s chart installs its own, v1.5.1 experimental, and nothing needs fixing first. Don’t turn on GKE’s own Gateway API (--gateway-api=standard) for this cluster. We did not test that combination.
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.
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: standard-rwo
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 persistent disk, 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 ... standard-rwo
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}')
until [ "$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 http://$GW/)" = 200 ]; do sleep 5; done
curl -s -o /dev/null -w "sqli before any policy: %{http_code}\n" "http://$GW/?id=1%27%20OR%20%271%27%3D%271"
The Gateway got its address within about a minute, and the load balancer answered about 30 seconds after that. The until loop waits for it. Expected: the Gateway shows PROGRAMMED True with a public IP (a GCP network 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 our 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 98s
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%. The events API now lists the new requests as blocking / 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 GKE removes the load balancer and the persistent disk while the cluster can still do it. Then delete the cluster, unlink billing and delete the project.
kubectl config current-context # must print gke_<project>_us-central1-a_revetment-guide-gke
kubectl delete -f demo.yaml --wait=true --timeout=300s # 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
kubectl get pv # wait until this lists nothing
gcloud container clusters delete revetment-guide-gke --project=$P --zone=us-central1-a --quiet
gcloud billing projects unlink $P
gcloud projects delete $P --quiet
Before the project goes, you can confirm nothing is left in it:
gcloud compute forwarding-rules list --project=$P
gcloud compute target-pools list --project=$P
gcloud compute addresses list --project=$P
gcloud compute disks list --project=$P
gcloud compute instances list --project=$P
In our run all five printed nothing once the cluster was gone. Afterwards gcloud projects describe $P shows DELETE_REQUESTED, the state Google keeps a deleted project in for 30 days. Nothing in it is billed. For about half a minute after the delete, gcloud projects list still showed the project as ACTIVE. That is listing lag, not a failed delete.
Gotchas
- Billing quota. Our first attempt linked the project to a different billing account, which refused it with
Cloud billing quota exceeded: that account already had as many projects as Google allows. Without billing,gcloud services enable container.googleapis.comfails withUREQ_PROJECT_BILLING_NOT_FOUND. We deleted that project (never billed) and used another billing account. If you hit this, unlink a project you no longer need, or ask Google for a higher quota at https://support.google.com/code/contact/billing_quota_increase. - The auth plugin. Without
gke-gcloud-auth-pluginonPATH,kubectlcannot authenticate to the cluster. With a Homebrew SDK, installing the component is not enough; see Prerequisites. - No Gateway API out of the box. GKE Standard ships without Gateway API CRDs unless you enable GKE’s own Gateway controller. Envoy Gateway’s chart installs v1.5.1 itself. This is unlike DOKS, where preinstalled v1.2.1 CRDs crash Envoy Gateway.
- Storage.
standard-rwois the default class and binds when the pod is scheduled. It worked first time, unlike EKS, which needs a driver and credentials first. - The load balancer answers a little after
Programmed. Theuntilloop in step 5 waits for it, so a first failedcurlis expected. - The port-forward dies on restart. The control plane restarts on every
helm upgradein step 7 and step 8, and a runningkubectl port-forwardto it exits. Start a new one if you need the API afterwards. In our run the script’s cleanup reportedkill: No such processfor this reason. - 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 in step 4 bounds it.e2-standard-2(8 GB) has plenty of room for this test. - 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.
- 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.
Other providers