Skip to content

Commit 3eab1d8

Browse files
authored
(docs): Add instructions on using Anubis with envoy-gateway (#1460)
Signed-off-by: fhoekstra <32362869+fhoekstra@users.noreply.github.com>
1 parent c7b31d0 commit 3eab1d8

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

docs/docs/admin/environments/kubernetes.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,52 @@ Then point your Ingress to the Anubis port:
130130
# diff-add
131131
name: anubis
132132
```
133+
134+
## Envoy Gateway
135+
136+
If you are using envoy-gateway, the `X-Real-Ip` header is not set by default, but Anubis does require it. You can resolve this by adding the header, either on the specific `HTTPRoute` where Anubis is listening, or on the `ClientTrafficPolicy` to apply it to any number of Gateways:
137+
138+
HTTPRoute:
139+
```yaml
140+
apiVersion: gateway.networking.k8s.io/v1
141+
kind: HTTPRoute
142+
metadata:
143+
name: app-route
144+
spec:
145+
hostnames: ["app.domain.tld"]
146+
parentRefs:
147+
- name: envoy-external
148+
namespace: network
149+
sectionName: https
150+
rules:
151+
- backendRefs:
152+
- identifier: *app
153+
port: anubis
154+
filters:
155+
- type: RequestHeaderModifier
156+
requestHeaderModifier:
157+
set:
158+
- name: X-Real-Ip
159+
value: "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"
160+
```
161+
162+
Applying to any number of Gateways:
163+
```yaml
164+
apiVersion: gateway.envoyproxy.io/v1alpha1
165+
kind: ClientTrafficPolicy
166+
metadata:
167+
name: envoy
168+
spec:
169+
headers:
170+
earlyRequestHeaders:
171+
set:
172+
- name: X-Real-Ip
173+
value: "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%"
174+
clientIPDetection:
175+
xForwardedFor:
176+
trustedCIDRs:
177+
- 10.96.0.0/16 # Cluster pod CIDR
178+
targetSelectors: # These will apply to all Gateways
179+
- group: gateway.networking.k8s.io
180+
kind: Gateway
181+
```

0 commit comments

Comments
 (0)