Deploying Anubis in front of my pastebin

Anubis is getting a lot of attention recently. Since I love trying out new interesting projects, here I am deploying it to protect my pastebin. Not that Pasticcio really needs it, but f*ck AI bots, so…

The pastebin is a K8s Deployment. I don’t have an Ingress. HAProxy is the SSL termination, and forwards to the NodePort of the Service.
Of course Anubis must go between them.
I have to decide how to deploy Anubis: as a system service or in Kubernetes?

I could not find an official Helm chart, but they already provide the Docker image.
I’ll put down a chart. It should be pretty easy.
Spoiler: the chart

Helm chart

helm create anubis

At the moment of writing 1.16 is the latest, so let’s put it in the values.

image:
  repository: ghcr.io/techarohq/anubis
  tag: "v1.16.0"

Then a section for the custom environment:

env:
  DIFFICULTY: 4
  SERVE_ROBOTS_TXT: "true"
  TARGET: "http://pasticcio:4000"

The probes required adding a header for the client (the probe) IP. The check won’t pass without it.

livenessProbe:
  httpGet:
    path: /
    port: 8923
    httpHeaders:
      - name: x-real-ip
        value: 127.0.0.1
readinessProbe:
  httpGet:
    path: /
    port: 8923
    httpHeaders:
      - name: x-real-ip
        value: 127.0.0.1

And this is basically it.
Deployed with: helm upgrade -n pasticcio --cleanup-on-fail --install -f custom-values.yaml anubis .

Edited the HAProxy config to forward to the Anubis NodePort. Done.