What are the resource requirements of Replicated + Kubernetes?


#1

My application needs a certain amount of memory and CPU performance to function well. I know Replicated needs some resources as well. What is the resource overhead of Replicated and its embedded Kubernetes distribution? For example, if my app alone needs at least 12GB of memory and 3 cores, what size server should I have my customers provision?


#2

There are three resources that are most commonly defined when setting up servers: Storage, Cores and Memory. We’ll cover each individually.

Storage:

Replicated + Kubernetes requires approximately 16GB to complete an airgapped installation. Later, when installing applications, two to three times the application container images of free space is recommended to allow for decompression and importation into the image registry. Finally, any PVCs created by your application will be replicated by Rook, with the number of copies scaling with the number of nodes. By default, a single node will store one copy, two nodes will store two copies, and three or more nodes will store three copies of all PVCs. Replication settings can be configured within the Replicated dashboard. More details can be found here. And as at 85% disk usage Kubernetes begins to evict pods, allocating more disk space than you need may be a good plan.

CPU:

Replicated + Kubernetes will generally use less than half a core (500m) during steady state operation, but can use significantly more during operations such as app installation, updates, snapshots and support bundle generation. If your application uses all of its allotted CPU, all the time, it may be wise to include an additional core for Replicated and Kubernetes.

Memory

Replicated + Kubernetes will use approximately 2GB of ram during normal use. If your application creates significant numbers of containers or otherwise heavily exercises the k8s APIs, it would be wise to allocate more.


#3

This sounds about right. I think one other thing worth keeping an eye on is Disk IO – in general, Kubernetes requires a reasonably high disk IO, and certain cloud provider defaults might not get you there. For example, on GCP, you’ll generally need a boot disk of 200GB or larger to get to a reasonable disk IO tier.

With gcloud, you can create a 4-core Ubuntu 18.04 server with an increased boot disk size with:

gcloud compute instances create example-1 --boot-disk-size=200GB --image-project ubuntu-os-cloud --image-family ubuntu-1804-lts --machine-type=n1-standard-4

You should of course modify the image-family and machine-type as needed.