|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * virt/post_installation_configuration/virt-configuring-higher-vm-workload-density.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="virt-removing-wasp-agent_{context}"] |
| 7 | += Removing the wasp-agent component |
| 8 | + |
| 9 | +If you no longer need memory overcommitment, you can remove the `wasp-agent` component and associated resources from your cluster. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You are logged in to the cluster with the `cluster-admin` role. |
| 14 | +* You have installed the {oc-first}. |
| 15 | +
|
| 16 | +.Procedure |
| 17 | + |
| 18 | +. Remove the `wasp-agent` DaemonSet: |
| 19 | ++ |
| 20 | +[source,terminal] |
| 21 | +---- |
| 22 | +$ oc delete daemonset wasp-agent -n wasp |
| 23 | +---- |
| 24 | + |
| 25 | +. If deployed, remove the alerting rules: |
| 26 | ++ |
| 27 | +[source,terminal] |
| 28 | +---- |
| 29 | +$ oc delete prometheusrule wasp-rules -n wasp |
| 30 | +---- |
| 31 | + |
| 32 | +. Optionally, delete the `wasp` namespace if no other resources depend on it: |
| 33 | ++ |
| 34 | +[source,terminal] |
| 35 | +---- |
| 36 | +$ oc delete namespace wasp |
| 37 | +---- |
| 38 | + |
| 39 | +. Revert the memory overcommitment configuration: |
| 40 | ++ |
| 41 | +[source,terminal] |
| 42 | +---- |
| 43 | +$ oc -n openshift-cnv patch HyperConverged/kubevirt-hyperconverged \ |
| 44 | + --type='json' \ |
| 45 | + -p='[{"op": "remove", "path": "/spec/higherWorkloadDensity"}]' |
| 46 | +---- |
| 47 | + |
| 48 | +. Delete the `MachineConfig` that provisions swap memory: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ oc delete machineconfig 90-worker-swap |
| 53 | +---- |
| 54 | + |
| 55 | +. Delete the associated `KubeletConfig`: |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +$ oc delete kubeletconfig custom-config |
| 60 | +---- |
| 61 | + |
| 62 | +. Wait for the worker nodes to reconcile: |
| 63 | ++ |
| 64 | +[source,terminal] |
| 65 | +---- |
| 66 | +$ oc wait mcp worker --for condition=Updated=True --timeout=-1s |
| 67 | +---- |
| 68 | + |
| 69 | +.Verification |
| 70 | + |
| 71 | +* Confirm that the `wasp-agent` DaemonSet is removed: |
| 72 | ++ |
| 73 | +[source,terminal] |
| 74 | +---- |
| 75 | +$ oc get daemonset -n wasp |
| 76 | +---- |
| 77 | ++ |
| 78 | +No `wasp-agent` should be listed. |
| 79 | +
|
| 80 | +* Confirm that swap is no longer enabled on a node: |
| 81 | ++ |
| 82 | +[source,terminal] |
| 83 | +---- |
| 84 | +$ oc debug node/<selected_node> -- free -m |
| 85 | +---- |
| 86 | ++ |
| 87 | +Ensure that the `Swap:` row shows `0` or that no swap space shows as provisioned. |
0 commit comments