No production experience on Kubernetes so far, we are currently on a test environment, we want to make sure to have some experience on the stack before starting with the production ones. That being said, we haven't tried autoscaling yet, and it's not on the radar for now, we'll see how it goes in the future.
On the other hand, studying the subject even more, we found out that our nginx sidecar was useless, since the nginx ingress can be customized to handle the most common configurations (also with a fully custom template if needed, but we didn't explore that).
We have removed the sidecar and are now deploying this Ingress to serve Plone. This is a specific configuration that serves Plone at /api
because it's used for Volto, but it's still a good example.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-plone
namespace: my-namespace
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /VirtualHostBase/http/my.plone.it:80/Plone/VirtualHostRoot/_vh_api$1
spec:
rules:
- host: my.plone.it
http:
paths:
- backend:
serviceName: my-plone-svc
servicePort: 8080
path: /api($|/.*)
@djay Thanks for the pointer to the ZMI, I'm actually no expert of Zope/ZMI/VHM so I had no idea. Nevertheless, the Ingress solution above is probably better because it's actually just a couple of extra lines of code away.
Regarding Varnish, it's a topic we are currently exploring. I see there are multiple solutions that feel like they're a little overengineered for our case, which involve changing the whole ingress-controller to a varnish controller. We had no time to check on the community support on that and are currently trying with a simpler solution that uses plone.recipe.varnish
. This solution doesn't allow Varnish to be scaled afaik, but we don't really need to.
Here it is, born these days with no Readme still, with a lot of testing and configuration still needed, but apparently working. It should be fairly configurable with the env vars that can be found in the docker-initialize.py
file.
https://hub.docker.com/r/redturtletech/varnish-plone