Troubleshooting Stalled Resources Error

A stalled resources error occurs when a resource does not become ready within the configured deployment interval.

A resource can stall for the following reasons:

  • An image pull fails.
  • The cluster has insufficient resources.
  • The resource configuration is invalid.
  • A required dependency is unavailable.
  • A volume mount fails.
  • Network connectivity fails.
  • The application fails to start.

When a Helm release fails, Helm remediation can roll back the release. Depending on the remediation and cleanup configuration, the failed Pod might no longer be available. This can make it difficult to collect logs and identify the root cause. You must re-create the resource to collect the required logs and identify the cause.

Re-creating the Resource for Debugging

If Helm rollback removes the failed Pod, create a new chart revision to start another deployment attempt:

  1. Increment the chart version in the affected chart's Chart.yaml file:
    /home/opc/siebel/<ENV_ID>/<git_helm_repo>/<chart_name>/Chart.yaml
  2. Commit and push the chart update:
    git add <chart_directory>
    git commit -m "Trigger stalled resource deployment for debugging"
    git push
  3. Reconcile the Git source and the affected HelmRelease:
    flux reconcile source git <source_name> -n <namespace>
    flux reconcile helmrelease <helmrelease_name> -n <namespace> --with-source
  4. Verify that Flux creates or upgrades the Helm release and that Kubernetes creates the required pods:
    flux get helmrelease <helmrelease_name> -n <namespace>
    kubectl get pods -n <namespace>

Monitoring the Deployment and Collecting Logs

You must monitor the deployment while it is in progress. Before Helm remediation rolls back the release, collect events, resource descriptions, and container logs, as follows:

kubectl get events -n <namespace> -w
kubectl describe <resource_type> <resource_name> -n <namespace>
kubectl describe pod <pod_name> -n <namespace>
kubectl logs <pod_name> -n <namespace> --all-containers=true

Review the events, resource descriptions, and container logs to identify the cause of the stalled resource.