<@ULVA73B9P> Im using Kubernetes worker and my ta...
# marvin-in-the-wild
c
@Marvin Im using Kubernetes worker and my tasks fail because of OOM. How do I give the more resources?
m
To modify the resources allocated to a Kubernetes worker, such as increasing memory to prevent Out-of-Memory (OOM) issues, you can update the base job template in the work pool configuration. Here is a general outline for editing the base job template for memory requests: 1. Go to the Advanced tab in the work pool settings. 2. Edit the JSON representation of the base job template. 3. Under
job_configuration
, locate the
containers
section. 4. Add the following section to specify the memory request for the pod:
Copy code
json
   "resources": {
     "requests": {
       "memory": "MEMORY_REQUEST_VALUE"
     },
     "limits": {
       "memory": "MEMORY_LIMIT_VALUE"
     }
   }
Replace
MEMORY_REQUEST_VALUE
and
MEMORY_LIMIT_VALUE
with appropriate values for your use case (e.g., "1Gi" for 1 gigabyte of memory). Remember to save the work pool configuration after making these changes. The deployments running with this work pool will now request the specified amount of memory. For further details, refer to the Prefect Kubernetes Deployment documentation.