Deploy the attached apparmor daemonset to disable AppArmor on the isolated nodepool: NOTE: This is for Ubuntu nodes only. For airgapped environments, point containers.image to an appropriate location for the pause image accordingly.
Connect into the affected VKS cluster context
Ensure that the isolated nodepool in the previous step has the label "apparmor-teardown-once=true" See the below for an example. Replace the name of the nodepool and replica count accordingly:
Review and update the attached apparmor daemonset YAML Make sure to edit the YAML so that the daemonset pods only run on the nodes where AppArmor should be disabled:
Check if the spec.tolerations need to be changed.
Add node.affinity as necessary.
Apply the updated apparmor daemonset YAML from the previous step.
kubectl apply -f apparmor-daemonset.yaml
This YAML will create the following objects:
Namespace: kube-apparmor-teardown
Daemonset: apparmor-teardown-once
Pods: apparmor-teardown-once
Confirm that the daemonset's apparmor-teardown-once pods reach Running state on all intended nodes:
kubectl get pods -n kube-apparmor-teardown -o wide
If there are any issues deploying the apparmor-teardown-once pods, describe the daemonset and its replicasets or pods accordingly.