So, we are thinking about switching our production server to Kubernetes. Right now, it's not really professional as it's only one single nginx instance. 99% of the time our server needs to handle about 30 requests a minute, which it easily manages to do. On specific times, that we exactly know of in before, there can be 2000 Users on the same second expecting a service. That is obviously way too much for it and last time it often returned a 502. Kubernetes Autoscaling seems like a good approach for that. The only problem is that we need the extra containers at that specific time, not 30 seconds after.
So is there a way to "manually" scale? Like telling to Kubernetes to prepare 4 containers at exactly 8 PM MESZ e.g.?
There are a number of way to autoscale Pods in Kubernetes.
You can use an Horizontal Pod Autoscaler to scale up Pods reactively, based on metrics. You can also use custom metrics.
You can also manually set the number of replicas:
in the Deployment. This can be done declaratively by changing the manifest, or imperatively by using kubectl:
kubectl scale deployment my-app --replicas=5
You can also use a Kubernetes CronJob with a kubectl-image that does the command above to scale up number of replicas at a specific time.
When using Knative Serving, you can use the Knative Service Autoscaler to scale up based on the number of requests.