Update System Reserved Resources¶
Introduction¶
The minimal resources allocation is a set of parameters that are used to
configure the minimal resources that are reserved for the Platform. It
reserves CPU and memory for the system and kubelet, the node agent of Kubernetes.
This way, in case of an issue on your cluster, you will still have resources to operate.
However, it is possible that some pods will be evicted or not scheduled.
Those parameters are automatically applied during a fresh install or an upgrade. However, you can run it manually if you want to refresh and update the minimal resources allocation. For example, you added memory and/or CPU on your nodes and you want to update the minimal resources allocation.
Procedure¶
Export the MetalK8s version you are using as an environment variable:
[artesca-os@bootstrap ~]$export MK8SVERSION=`sudo kubectl \ --kubeconfig=/etc/kubernetes/admin.conf \ get cm -n kube-system artesca-version \ -o jsonpath="{.data.metalk8s}"`
Update the system reserved resources on all nodes by running the following command:
[artesca-os@bootstrap ~]$
sudo kubectl exec -n kube-system -c salt-master \
--kubeconfig /etc/kubernetes/admin.conf \
$(sudo kubectl --kubeconfig /etc/kubernetes/admin.conf \
get pods -n kube-system -l app=salt-master -o name) \
-- salt '*' state.sls metalk8s.kubernetes.kubelet saltenv=metalk8s-$MK8SVERSION

