Problem
Runs give an error without a clear message of the issue
or
Prerequisites
- You have Terraform Enterprise Flexible Deployment running on Kubernetes
Cause
Terraform Enterprise will start a new pod under the namespaceterraform-enterprise-agents
. The issue could be that there are not enough resources on the Kubernetes cluster to start this pod.
Verify the events on the specified namespace
kubectl get events -n terraform-enterprise-agents
You might see the following for example
0/1 nodes are available: 1 Insufficient memory.
preemption: 0/1 nodes are available:
1 No preemption victims found for incoming pod..
Solutions
- Resize your Kubernetes cluster to have enough resources to start the specified pods
If the above is not an option then verify the settings as specified here
- Alter the CPU/Memory a tasks is allowed to use
- Alter the
TFE_CAPACITY_CONCURRENCY
for a better fit on your Kubernetes cluster
Outcome
With enough resources the runs should execute and you should see these task pods starting
kubectl get pods -n terraform-enterprise-agents
NAME READY STATUS RESTARTS AGE
tfe-task-ddab255d-7dc6-4ca9-8ecb-b47e8a27bee0-klzkh 1/1 Running 0 11s
If you still have issues then please create a ticket with HashiCorp Support
Additional Information
-
TFE FDO Kubernetes settings in our official documentation here