KubeVirt Components
Resource limits
To ensure stable node resource allocation, SUSE Virtualization enforces default resource limits for KubeVirt components.
| Component | Resource Type | CPU Limit | Memory Limit |
|---|---|---|---|
|
Deployment |
400m |
1100Mi |
|
Deployment |
800m |
1300Mi |
|
DaemonSet |
700m |
1600Mi |
Adjusting the resource limits for these components may be necessary as you scale your cluster. For example, insufficient memory can cause virt-handler pods to crash, leading to virtual machine migration failures.
Modifying resource limits
To ensure your changes persist across upgrades, modify the SUSE Virtualization ManagedChart resource directly rather than the KubeVirt resource. Changes to ManagedChart are automatically applied to KubeVirt.
You can retrieve the current default component configuration by running the following command on each node:
helm get values harvester -n harvester-system --all | yq '.kubevirt.spec.customizeComponents.patches'
Copy the output and modify the values as necessary.
- patch: '{"webhooks":[{"name":"kubevirt-validator.kubevirt.io","failurePolicy":"Ignore"},{"name":"kubevirt-update-validator.kubevirt.io","failurePolicy":"Ignore"}]}'
resourceName: virt-operator-validator
resourceType: ValidatingWebhookConfiguration
type: strategic
- patch: '{"spec":{"template":{"spec":{"containers":[{"name":"virt-api", "resources":{"limits":{"cpu":"400m","memory":"1100Mi"}}}]}}}}'
resourceName: virt-api
resourceType: Deployment
type: strategic
- patch: '{"spec":{"template":{"spec":{"containers":[{"name":"virt-controller", "resources":{"limits":{"cpu":"800m","memory":"1300Mi"}}}]}}}}'
resourceName: virt-controller
resourceType: Deployment
type: strategic
- patch: '{"spec":{"template":{"spec":{"containers":[{"name":"virt-handler", "resources":{"limits":{"cpu":"700m","memory":"1600Mi"}}}]}}}}'
resourceName: virt-handler
resourceType: DaemonSet
type: strategic
|
When patching |
The following example increases the CPU and memory limits for virt-handler:
kubectl patch managedchart harvester -n fleet-local --type=merge --patch '
spec:
values:
kubevirt:
spec:
customizeComponents:
patches:
- resourceName: virt-operator-validator
resourceType: ValidatingWebhookConfiguration
type: strategic
patch: |
{"webhooks":[{"name":"kubevirt-validator.kubevirt.io","failurePolicy":"Ignore"},{"name":"kubevirt-update-validator.kubevirt.io","failurePolicy":"Ignore"}]}
- resourceName: virt-api
resourceType: Deployment
type: strategic
patch: |
{"spec":{"template":{"spec":{"containers":[{"name":"virt-api","resources":{"limits":{"cpu":"400m","memory":"1100Mi"}}}]}}}}
- resourceName: virt-controller
resourceType: Deployment
type: strategic
patch: |
{"spec":{"template":{"spec":{"containers":[{"name":"virt-controller","resources":{"limits":{"cpu":"800m","memory":"1300Mi"}}}]}}}}
- resourceName: virt-handler
resourceType: DaemonSet
type: strategic
patch: |
{"spec":{"template":{"spec":{"containers":[{"name":"virt-handler","resources":{"limits":{"cpu":"4","memory":"3200Mi"}}}]}}}}
|
Default resource limits may change in future releases. Once you customize |