Error while deploying on AWS 'timed out waiting for the condition'

Hello,

I am having an issue while deploying on AWS :
console

Hi @Loic ,

The error coming from your deployment logs is the following:

There are 2 errors here

Not enough CPU and RAM

unable to retrieve container logs for docker://ef62e1c15f0bce1a35639156f42ab523b8a59259cf80b43a9709a5fd5161c722
2022-06-29T07:08:15Z Warning Unhealthy: Liveness probe failed: dial tcp 10.0.54.244:80: connect: connection refused
2022-06-29T07:05:47Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.54.244:80: connect: connection refused
2022-06-29T06:31:10Z Warning Unhealthy: Liveness probe failed: dial tcp 10.0.92.91:80: connect: connection refused
2022-06-29T06:28:55Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.92.91:80: connect: connection refused
2022-06-29T06:47:41Z Warning FailedScheduling: 0/3 nodes are available: 3 Insufficient memory.
2022-06-29T06:48:16Z Warning FailedScheduling: 0/4 nodes are available: 1 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate, 3 Insufficient memory.
2022-06-29T06:53:34Z Warning Unhealthy: Liveness probe failed: dial tcp 10.0.50.99:80: connect: connection refused
2022-06-29T06:51:17Z Warning Unhealthy: Readiness probe failed: dial tcp 10.0.50.99:80: connect: connection refused
2022-06-29T06:49:01Z Warning FailedGetResourceMetric: failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from resource metrics API
2022-06-29T06:49:01Z Warning FailedComputeMetricsReplicas: invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from resource metrics API
2022-06-29T06:51:46Z Warning FailedGetResourceMetric: failed to get cpu utilization: did not receive metrics for any ready pods
2022-06-29T06:49:31Z Warning FailedComputeMetricsReplicas: invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: did not receive metrics for any ready pods
2022-06-29T06:56:34Z Warning NoControllers: found no controllers for pod "app-z5c69f39b-7665fb6cb5-8fz47"
2022-06-29T06:56:34Z Warning CalculateExpectedPodCountFailed: Failed to calculate the number of expected pods: found no controllers for pod "app-z5c69f39b-7665fb6cb5-8fz47"
2022-06-29T07:03:28Z Warning FailedGetResourceMetric: failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from resource metrics API
2022-06-29T07:03:28Z Warning FailedComputeMetricsReplicas: invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from resource metrics API
2022-06-29T07:08:38Z Warning FailedGetResourceMetric: failed to get cpu utilization: did not receive metrics for any ready pods
2022-06-29T07:06:19Z Warning FailedComputeMetricsReplicas: invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: did not receive metrics for any ready pods
2022-06-29T07:13:16Z Warning NoControllers: found no controllers for pod "app-z5c69f39b-594b7b8f9-2mb5h"
2022-06-29T07:13:16Z Warning CalculateExpectedPodCountFailed: Failed to calculate the number of expected pods: found no controllers for pod "app-z5c69f39b-594b7b8f9-2mb5h"

Your CPU and RAM are extremely higher than what your cluster can give. cf screenshot

I would recommend downsizing the RAM of your app OR increasing the instance type of your cluster.

Listening port

Plus, since you are using Buildpacks, you need to create an environment variable PORT with the value of your application listening port (80 in your case)

Go to your app environment variables

Create the PORT environment variable with the value 80


(Please, can you give more details next time :pray: )

Thank you for your response,

I have a t3.xlarge in my cluster which have 4 CPU, why would 2CPU be to high for the application ?

I probably don’t really get how Kubernetes really works …