Somehow if I specify resource in my KubernetesPodOperator, the DAG will fail. Looks like the pod is created at least it attempts to create it. The log says Event: XXXXX-e59a4be6 had an event of type Pending
.
resource_config = {'limit_memory': 1, 'limit_cpu': 1, 'request_memory': 1, 'request_cpu': 1}
dagA = KubernetesPodOperator(
name="podA", namespace='my-app', task_id="task1", resources=resource_config,
...
If I don't specify the resource, it will run. The resource
param is of type dictionary looking at code.
Did anyone have this issue?
I found a solution. Specifying a whole integer values does not work based on the examples here. This resource spec works:
resource_config = {'limit_memory': '1024Mi', 'limit_cpu': '500m'}
So I think that is the correct way for specifying the values.