I'd like to keep the number of cores in my GKE cluster below 3. This becomes much more feasible if the CPU limits of the K8s replication controllers and pods are reduced from 100m to at most 50m. Otherwise, the K8s pods alone take 70% of one core.
I decided against increasing the CPU power of a node. This would be conceptually wrong in my opinion because the CPU limit is defined to be measured in cores. Instead, I did the following:
- replacing limitranges/limits with a version with "50m" as default CPU limit (not necessary, but in my opinion cleaner)
- patching all replication controller in the kube-system namespace to use 50m for all containers
- deleting their pods
- replacing all non-rc pods in the kube-system namespace with versions that use 50m for all containers
This is a lot of work and probably fragile. Any further changes in upcoming versions of K8s, or changes in the GKE configuration, may break it.
So, is there a better way?