3.9. Troubleshooting the cluster upgrader
If you encounter problems when using the legacy installation method for the secured cluster and enabling the automated updates, you can try troubleshooting the problem. The following errors can be found in the clusters view when the upgrader fails.
3.9.1. Upgrader is missing permissions 复制链接链接已复制到粘贴板!
Symptom
The following error is displayed in the cluster page:
Upgrader failed to execute PreflightStage of the roll-forward workflow: executing stage "Run preflight checks": preflight check "Kubernetes authorization" reported errors. This usually means that access is denied. Have you configured this Secured Cluster for automatically receiving upgrades?"
Procedure
- Ensure that the bundle for the secured cluster was generated with future upgrades enabled before clicking Download YAML file and keys.
- If possible, remove that secured cluster and generate a new bundle making sure that future upgrades are enabled.
If you cannot re-create the cluster, you can take these actions:
-
Ensure that the service account
sensor-upgraderexists in the same namespace as Sensor. -
Ensure that a ClusterRoleBinding exists (default name:
<namespace>:upgrade-sensors) that grants thecluster-adminClusterRole to thesensor-upgraderservice account.
-
Ensure that the service account
3.9.2. Upgrader cannot start due to missing image 复制链接链接已复制到粘贴板!
Symptom
The following error is displayed in the cluster page:
"Upgrade initialization error: The upgrader pods have trouble pulling the new image: Error pulling image: (...) (<image_reference:tag>: not found)"
Procedure
-
Ensure that the Secured Cluster can access the registry and pull the image
<image_reference:tag>. - Ensure that the image pull secrets are configured correctly in the secured cluster.
3.9.3. Upgrader cannot start due to an unknown reason 复制链接链接已复制到粘贴板!
Symptom
The following error is displayed in the cluster page:
"Upgrade initialization error: Pod terminated: (Error)"
Procedure
- Ensure that the upgrader has enough permissions for accessing the cluster objects. For more information, see "Upgrader is missing permissions".
- Check the upgrader logs for more insights.
3.9.3.1. Obtaining upgrader logs 复制链接链接已复制到粘贴板!
The logs can be accessed by running the following command:
$ kubectl -n <namespace> logs deploy/sensor-upgrader
where:
<namespace>- Specifies the namespace in which Sensor is running.
Usually, the upgrader deployment is only running in the cluster for a short time while doing the upgrades. It is removed later, so accessing its logs using the orchestrator CLI can require proper timing.