Kubernetes Sidecar Deployment
The most secure way to deploy Bauxite is as a Sidecar container within your
application Pod. This ensures that the “Straitjacket” is wrapped directly
around your app, intercepting all LLM traffic over localhost.
Architecture
In this pattern, your application container talks to localhost:9090 instead of the public OpenAI/Anthropic endpoints. Bauxite handles the PII
redaction and routing before the request leaves the Pod’s network boundary.
Manifest Example
Below is a standard Kubernetes Deployment manifest. Pay close attention to the securityContext and resources—these are what enforce the 20MB Straitjacket.
apiVersion: apps/v1
kind: Deployment
metadata:
name: rag-application
spec:
replicas: 3
template:
spec:
containers:
# 1. Your Application Container
- name: app
image: your-repo/rag-app:latest
env:
- name: OPENAI_BASE_URL
value: "[http://127.0.0.1:9090/v1](http://127.0.0.1:9090/v1)"
# 2. The Bauxite Straitjacket Sidecar
- name: bauxite-intercept
image: bauxite/intercept:latest
ports:
- containerPort: 9090
env:
- name: BAUXITE_ZERO_TRUST
value: "true"
- name: GOMEMLIMIT
value: "18MiB" # Hard cap for the Go Runtime
resources:
limits:
memory: "20Mi/B"
cpu: "100m"
requests:
memory: "15MiB"
cpu: "10m"
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
allowPrivilegeEscalation: false Hardening the Sidecar
To satisfy strict security audits, we recommend the following configurations:
Resource Constraints By setting a memory limit of 20MiB, Kubernetes will OOMKilled (Out-of-Memory Kill) the sidecar if it ever attempts to bloat. This is your physical guarantee that data is not being accumulated.
Read-Only Filesystem Bauxite does not require write access to the filesystem. Setting readOnlyRootFilesystem: true prevents any potential vulnerability from being used to cache or log data to the pod’s ephemeral storage.
Localhost Binding Ensure Bauxite is configured to listen on 127.0.0.1. This prevents other pods in the cluster from bypassing their own security layers and using your pod’s intercept.
Verification
Once deployed, you can verify the sidecar is functioning by checking the logs of the Bauxite container:
kubectl logs <pod-name> -c bauxite-intercept You should see the initialization message:
INFO: Bauxite Intercept started. Mode: Zero-Trust. Memory Limit: 18MiB.