Troubleshooting
Start with the affected stack. Its status shows what the controller observed. The Workflow and its Pods show where the pipeline stopped. These commands use the quickstart namespaces. Substitute the values from your environment.
On an existing installation, the new columns require the updated CRD. See Helm upgrades.
1. Check the resource and its events
STACK_NS=platform-system
STACK=hello-stack
kubectl config current-context
kubectl get iacstacks -A -o wide
kubectl -n "$STACK_NS" get iacstack "$STACK" -o yaml
kubectl -n "$STACK_NS" describe iacstack "$STACK"
kubectl -n "$STACK_NS" get events \
--field-selector "involvedObject.kind=IaCStack,involvedObject.name=$STACK" \
--sort-by=.metadata.creationTimestamp
In spec, check the repository, path and version in sourceRef, the inputs, the alias in workflowRef.name, dependencies, and whether suspend is set. If the stack omits the alias, check the default in the controller configuration.
Compare status.observedGeneration with metadata.generation. If they differ, the status may describe a previous configuration. If they match, check the conditions and phase to determine readiness. Compare the requested spec.sourceRef.version with the revision resolved for the attempt when available.
Start with the wide view for the active condition, execution phase, reason, Workflow, and drift. An empty drift column means unknown. Waiting is an execution signal, not necessarily a human approval. You can filter by team labels with -l team=platform. The next steps use Bash and jq.
| Field | How to read it |
|---|---|
status.conditions | Read type, status, reason, and message. The condition explains what the controller recorded for that generation. |
status.execution | Identifies the recorded attempt by alias, Workflow name, phase, and intentHash. Check scheduledAt and finishedAt when present. |
status.execution.resolvedSource | Shows the revision and target binding the executor reported for this attempt. |
status.lastCheckTime, lastSuccessTime, driftPending | Distinguish the most recent check, the most recent ready result, and outstanding drift. |
2. Open the exact Workflow for the recorded attempt
Use the recorded Workflow name, namespace, and UID, not the alias in the current spec. Updating an alias does not retarget a running or previous attempt.
RUN=$(kubectl -n "$STACK_NS" get iacstack "$STACK" -o json |
jq -c '.status.execution // {}')
WORKFLOW=$(jq -r '.workflow // empty' <<< "$RUN")
WORKFLOW_NS=$(jq -r '.integration.namespace // empty' <<< "$RUN")
WORKFLOW_UID=$(jq -r '.workflowUID // empty' <<< "$RUN")
jq '{workflowRef, workflow, workflowUID, sequence, attempt, phase,
generation: .intent.generation}' <<< "$RUN"
If there is no Workflow UID, the controller has not yet observed the object or the attempt predates this field. For older attempts, consult the Argo logs and UI guide. Otherwise, fetch the recorded Workflow and verify its UID before proceeding:
WF=$(kubectl -n "$WORKFLOW_NS" get workflows.argoproj.io "$WORKFLOW" -o json)
jq -e --arg uid "$WORKFLOW_UID" \
'$uid != "" and .metadata.uid == $uid' <<< "$WF"
Continue only if the command prints true. If the Workflow was removed or the name was reused, don’t use a replacement object. When retry or drift starts another attempt, the stack points to the new attempt; keep the old reference if you’re still investigating it.
3. Discover steps and open their logs
List the nodes from Argo, without depending on names such as plan or apply:
jq -r '.status.nodes // {} | to_entries[] |
[.key, .value.displayName, .value.type, .value.phase] | @tsv' <<< "$WF"
A pending Suspend node may indicate a gate, but it doesn’t prove that someone needs to approve it. Not every node has a Pod. If Argo has compressed or offloaded node status, this query may have no rows; inspect the execution with argo get using an Argo Server that can read the node status.
To read logs, set NODE_ID to the ID shown in the first column. Use the Pod’s Workflow owner UID and Argo node ID to find the exact Pod, rather than constructing a Pod name:
NODE_ID='<node ID>'
kubectl -n "$WORKFLOW_NS" get pods \
-l "workflows.argoproj.io/workflow=$WORKFLOW" -o json |
jq -r --arg uid "$WORKFLOW_UID" --arg node "$NODE_ID" '
.items[]
| select(any(.metadata.ownerReferences[]?;
.kind == "Workflow" and .uid == $uid))
| select(.metadata.annotations["workflows.argoproj.io/node-id"] == $node)
| [.metadata.name, ([.spec.initContainers[]?.name, .spec.containers[].name] | join(","))] | @tsv'
Copy the Pod and container names from the output, then run:
kubectl -n "$WORKFLOW_NS" logs "$POD" -c "$CONTAINER" --timestamps
For a restarted container use --previous. If no Pod is returned, check whether it was cleaned up or whether you chose a node without a Pod. Use archived logs only if your Argo installation keeps them. This guide needs read access to IaCStacks, Workflows, Pods and pods/log in their respective namespaces; it requires no permission to update a Workflow. Logs and HTML reports are not copied into IaCStack status.
4. Correlate the controller logs
The IaCStack is a Kubernetes API resource. Look for reconciliation decisions in the controller Deployment’s logs and Terraform or OpenTofu execution in the pipeline Pods.
CONTROLLER_NS=platform-system
kubectl -n "$CONTROLLER_NS" logs -l app=iacstack-controller \
-c controller --prefix=true --since=30m
The selector queries the controller replicas. Filter the JSON logs by namespace, stack, workflow, or intentHash when present. If the stack was recreated with the same name, also compare the uid. In your log backend, use the time window from scheduling through completion when available.
5. Identify the next diagnostic step
| Symptom | What to check |
|---|---|
| No Workflow was created | Read the condition and events. UnknownWorkflow points to an alias registration problem. Check dependencies, suspension, the WorkflowTemplate in the expected namespace, and controller permissions. |
| Workflow exists without an active Pod | Inspect its nodes. A running Suspend node may be waiting for a decision. If the step should start a Pod, check Workflow events and the ServiceAccount permissions in Argo. |
Pod in Pending or ImagePullBackOff | Read the Pod events to distinguish scheduling, image references, and registry access. For release images, confirm the tag, registry access and node architecture (Linux/amd64 for the initial release). For local development images only, confirm the image was loaded into the correct Kind cluster. |
| Workflow finished, but the stack is blocked | Check the stack phase and reasons. For InvalidExecutionContract, check the global parameter names and outputs the executor reported. Read the OPA or approval decision in the Workflow. |
ExecutionMissing | Verify that Pods and executor processes stopped and check the state backend and lock before requesting a retry. |
| Outstanding drift | Open the Workflow that reported drift and check the plan and execution policy. After remediation, confirm convergence through the next ready result and status.driftPending. |
When reporting an issue, include the code revision, Kubernetes and Argo versions, and expected and observed outcomes. Remove credentials, private identifiers, and sensitive information from shared manifests, plans, and logs.