AEM as a Cloud Service deployment fails with KubernetesDeploymentTimeoutException despite healthy rollout
This article describes how to address a scenario in Adobe Experience Manager (AEM) as a Cloud Service where production deployments fail with a KubernetesDeploymentTimeoutException, even though the rollout completes successfully. The issue is often related to missing configuration on the Preview tier.
Description description
Environment
Adobe Experience Manager (AEM) as a Cloud Service (all versions)
Issue/Symptoms
- Production deployment via Cloud Manager fails during the deployment step with a
KubernetesDeploymentTimeoutException. - The deployment step may run for several hours before failing.
- Cloud Manager UI reports the deployment as ERROR.
- The underlying production rollout (such as
aem-publish) reaches a healthy and completed state, with all replicas ready, well before the timeout occurs. - No crash, out-of-memory, or shutdown errors are observed in AEM application logs after the rollout becomes healthy.
- The application continues to serve traffic normally while Cloud Manager remains in a waiting state.
- Preview pods may be seen constantly restarting, with dispatcher container logs showing health check failures (for example, failed to connect to localhost port 8080 or missing redirect configuration).
Cause
This issue is typically caused by missing required configuration content on the Preview tier. Even if the Preview tier is not used for serving traffic, its dispatcher initialization depends on the same configuration as the Publish tier. Missing configuration can cause Preview dispatcher initialization failures, which block the production deployment pipeline.
Resolution resolution
Follow the steps below to resolve the issue:
-
Verify that the production rollout has reached a healthy and completed state using your Kubernetes or Argo Rollout tooling. Confirm all expected replicas are ready.
-
In Cloud Manager, review the pipeline execution details for errors during the deployment step. Note if the error is a
KubernetesDeploymentTimeoutException. -
Ensure that all required redirect configuration content is published to the Preview tier. This includes any configuration or content that is required for dispatcher initialization, even if the Preview tier is not used for serving traffic.
- Review your deployment process to confirm that the same redirect and dispatcher configuration used for Publish is also available on Preview.
- If you use content packages or configuration management, verify that these are deployed to both Publish and Preview tiers.
-
Check the health of Preview pods.
- Use your Kubernetes tooling, such as
kubectl logs, to review dispatcher container logs for Preview pods. - Look for health check failures or repeated restarts, which may indicate missing configuration.
- Use your Kubernetes tooling, such as
-
After publishing the required configuration to the Preview tier, rerun the production deployment pipeline in Cloud Manager.
-
Verify that the deployment completes successfully and that all pods, including Preview pods, are healthy.