Slackbot
07/11/2025, 6:30 AMMarvin
07/11/2025, 6:30 AMMarvin
07/11/2025, 6:31 AMvalues.yaml
includes the correct storage configuration. For example:
yaml
worker:
volumeClaimTemplate:
resources:
requests:
storage: 10Gi
2. GKE Autopilot Considerations
- GKE Autopilot has certain restrictions on resource management that might override your specifications
- The default storage class in GKE Autopilot might be enforcing minimum sizes
- Check your storage class configuration with:
bash
kubectl get storageclass
3. Solutions:
a. Explicit Storage Class:
yaml
worker:
volumeClaimTemplate:
storageClassName: "standard" # or your preferred storage class
resources:
requests:
storage: 10Gi
b. Advanced Configuration:
You can also set these values through the Prefect UI under the worker's advanced configuration settings:
json
{
"kubernetes": {
"volumeClaimTemplate": {
"spec": {
"resources": {
"requests": {
"storage": "10Gi"
}
}
}
}
}
}
4. Important Notes:
- GKE Autopilot might enforce minimum storage requirements for certain workload types
- Verify that your storage class supports the requested size
- Make sure you're applying the Helm chart correctly with:
bash
helm upgrade --install prefect-worker prefect/prefect-worker -f values.yaml
If these solutions don't resolve the issue, you might need to:
1. Check if your storage class has minimum allocation requirements
2. Verify the actual PVC (Persistent Volume Claim) specifications being created:
bash
kubectl get pvc
kubectl describe pvc <your-pvc-name>
This will help you understand if the storage size is being overridden by GKE Autopilot's policies or if there's an issue with the Helm chart configuration.Rasmus
07/11/2025, 6:34 AMMarvin
07/11/2025, 6:34 AMMarvin
07/11/2025, 6:35 AMyaml
worker:
resources:
limits:
cpu: "1"
ephemeral-storage: 1Gi
memory: 1Gi
requests:
cpu: 100m
ephemeral-storage: 1Gi
memory: 256Mi
Key points:
1. The resources configuration should be nested under the worker
key
2. Make sure you're using the latest version of the Prefect Helm chart
3. Verify the changes are being applied with:
bash
helm get values prefect-worker
To apply these changes:
1. Update your values.yaml file with the correct structure
2. Upgrade your Helm release:
bash
helm upgrade prefect-worker prefect/prefect-worker \
-f values.yaml \
--namespace your-namespace
3. Verify the deployment:
bash
kubectl get deployment -n your-namespace
kubectl describe deployment prefect-worker -n your-namespace
If you're still seeing the default values after making these changes:
1. Try doing a fresh install:
bash
helm uninstall prefect-worker -n your-namespace
helm install prefect-worker prefect/prefect-worker -f values.yaml -n your-namespace
2. Check if there are any validation webhooks or admission controllers in your GKE Autopilot cluster that might be modifying the resources:
bash
kubectl get validatingwebhookconfigurations
kubectl get mutatingwebhookconfigurations
3. Verify the values are being passed correctly to Helm:
bash
helm template prefect-worker prefect/prefect-worker -f values.yaml | grep -A 10 resources:
Remember that GKE Autopilot has some restrictions on resource configurations, but the values you're trying to set should be within acceptable ranges. If the issue persists, you might want to check the GKE Autopilot logs for any resource-related errors or warnings.Rasmus
07/11/2025, 7:09 AMMarvin
07/11/2025, 7:09 AMMarvin
07/11/2025, 7:10 AMbash
# Check which nodes your jobs are running on
kubectl get pods -o wide
# View node labels and taints
kubectl get nodes --show-labels
kubectl describe nodes
If you're seeing jobs consistently scheduled to the same node, check:
1. Node selectors in your work pool configuration
2. Resource requests/limits that might only be satisfied by specific nodes
3. Any affinity rules you might have configured
Remember that in GKE Autopilot, Google manages the nodes, but your Prefect worker can still schedule work across all available nodes in the cluster as long as the scheduling requirements are met.Rasmus
07/11/2025, 7:13 AMMarvin
07/11/2025, 7:13 AMMarvin
07/11/2025, 7:13 AMbash
# Get the node where your worker is running
kubectl get pod -l app=prefect-worker -o wide
# Get the nodes where your flow run jobs are running
kubectl get pods -l <http://prefect.io/flow-run-id|prefect.io/flow-run-id> -o wide
You'll likely see the jobs distributed across different nodes.
4. What Can Restrict Node Selection:
Even without explicit node selectors, scheduling might be limited by:
- Node taints (if your pods don't have matching tolerations)
- Resource availability
- Node affinity/anti-affinity rules in your cluster
- GKE Autopilot's system constraints
If you're seeing jobs consistently landing on the same node without specifying node selectors, it's likely due to:
- Resource availability on other nodes
- Default node taints that your pods need tolerations for
- Or, in GKE Autopilot's case, the node pool configuration
The worker itself is completely agnostic to where the jobs run - it's all handled by the Kubernetes scheduler.