I'm using dnscrypt proxy with as filtering and some local DNS config, configured with dnscrypt server running on my VPS.
It is running on pi-zero (old $5 one without wireless), a bit slow (50ms query), but works fine, especially with caching
The indexing task can be done during static site generation and results shipped as resources, but the query part (search string parsing, ranking, snippet generation, etc) needs some code running locally (browser, js).
We've used Minimal Perfect Hash Function with bloom filter to reduce the mem of a service from ~27G to ~8G, as the data was static. Probably something like that can be used here too, to make indices small.
I had a similar problem, setup a small cluster and it worked fine until next upgrade and nightmare repeated on each upgrade. I realize spending most of my time on fixing k8s issues rather than doing any valuable work