Upgrade failed because of security software

Upgrade is failing because of microsoft defender?

Root Cause

Most likely a Microsoft Defender running on the machine blocks the containerd image pull.

Resolution

  1. Run the below command to check if Microsoft defender/mdatp is running:
    Ps -f 
  2. Add the following exception in Defender:
    sudo mdatp exclusion folder add --path "/var/lib/rancher/k3s/agent/containerd/tmpmounts/*"
  3. Run the following command to check if all the pods are in running state:
    Kubectl get pods -A
  4. We can just delete the pod which is in imagepull backoff state:
    kubectl -n uipath delete pod subsitute_pod_name  
  5. Then monitor if the pod comes back up and ends up in running state.
  6. Re-run the upgrade operation.