Examples for k8s configuration #23026
-
I have deployed dagster on my k8s , successfully run a simple job and sheduler, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Check out Customizing your Kubernetes Deployment |
Beta Was this translation helpful? Give feedback.
-
I recently worked on comprehensive deployment documentation and encountered similar K8s configuration challenges when enhancing Dagster's concurrency and deployment guides. For defining job pods in K8s with Dagster, here are the key configuration patterns that work:
dagster:
instance:
config:
concurrency:
runs:
max_concurrent_runs: 10
tag_concurrency_limits:
- key: "kubernetes/namespace"
value: "data-pipelines"
limit: 5
dagsterUserDeployments:
enabled: true
deployments:
- name: "your-job-deployment"
image:
repository: "your-registry/dagster-user-code"
tag: "latest"
dagsterApiGrpcArgs:
- "--python-file"
- "/path/to/your/definitions.py"
port: 4000
env:
DAGSTER_POSTGRES_USER: ${POSTGRES_USER}
DAGSTER_POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
from dagster import define_asset_job, multiprocess_executor
configured_executor = multiprocess_executor.configured({
"max_concurrent": 3,
"tag_concurrency_limits": [
{
"key": "kubernetes/resource_type",
"value": "memory_intensive",
"limit": 1
}
]
})
k8s_job = define_asset_job(
name="k8s_data_job",
selection=["your_assets"],
executor_def=configured_executor,
tags={
"dagster-k8s/config": {
"container_config": {
"resources": {
"requests": {"memory": "1Gi", "cpu": "500m"},
"limits": {"memory": "2Gi", "cpu": "1000m"}
}
}
}
}
)
The key is ensuring your dagster.yaml instance configuration, Helm chart settings, and job definitions all work together consistently.
You can see more complete examples and troubleshooting guidance in the enhanced deployment documentation I contributed: https://github.com/dagster-io/dagster/pull/30317.
What specific K8s configuration challenges are you facing? Are you having issues with pod resource allocation, environment variables, or something else? Happy to help with more targeted examples! |
Beta Was this translation helpful? Give feedback.
Check out Customizing your Kubernetes Deployment