# ask-ai

Anastasios Tzinieris

03/08/2024, 12:50 PM
Warning events for pod: FailedScheduling: 0/2 nodes are available: 1 Too many pods, 2 Insufficient cpu. preemption: 0/2 nodes are available: 2 No preemption victims found for incoming pod.. @Scout


03/08/2024, 12:50 PM
The warning events you're seeing indicate that the Kubernetes scheduler is unable to place your pod on a node due to resource constraints. Here's a breakdown of the warning messages: 1.
FailedScheduling: 0/2 nodes are available: 1 Too many pods
- This suggests that one of the nodes in your cluster cannot accept any more pods because it has reached its maximum pod capacity. Kubernetes nodes have a maximum number of pods they can run, which is determined by the node's configuration. 2.
2 Insufficient cpu
- This indicates that two nodes do not have enough CPU resources available to meet the requirements of the pod you're trying to schedule. 3.
preemption: 0/2 nodes are available: 2 No preemption victims found for incoming pod.
- Preemption is a process where the scheduler can evict lower-priority pods to make room for higher-priority ones. This message means that there are no pods eligible for preemption to free up resources for your pod. To address these issues, you can consider the following steps: - Scale up your cluster: Add more nodes or nodes with higher resource capacities to your Kubernetes cluster to accommodate the resource demands of your pods. - Review resource requests and limits: Check the resource requests and limits specified in your pod specifications. Ensure that they are set to reasonable values that reflect the actual resource needs of your applications. - Optimize pod scheduling: Use Kubernetes features like node affinity, pod affinity, and pod anti-affinity to optimize the placement of your pods across the nodes in your cluster. - Manage pod priorities: Assign priority classes to your pods to control which pods can preempt others if necessary. If you're running Dagster on Kubernetes and encountering these scheduling issues, you may need to adjust your Dagster deployment configuration to align with your cluster's resource availability. This could involve configuring the resource requests and limits for your Dagster run worker pods or scaling your Dagster deployment to better fit your cluster's capacity. For more specific guidance on managing Dagster deployments on Kubernetes, you can refer to the Dagster documentation on Kubernetes deployment and configuration. If you're experiencing persistent issues with scheduling Dagster jobs on Kubernetes, it may be helpful to review the documentation on run retries and run monitoring to ensure that your jobs can recover from interruptions or failures due to resource constraints.