Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
All solutions
    • All solutions for Managed Service for Kubernetes
    • Fixing the "timed out waiting for the condition" error when mounting a PVC
    • Resolving the "timed out waiting for the condition" error when mounting a volume with a large number of files
    • Hosts of the Managed Service for Kubernetes node groups stay in the Reconciling status for a long time
    • Constant restarts of the kube-dns-autoscaler pod
    • Number of nodes in the group fails to decrease
    • Resolving the "Multi-Attach error for volume" error
    • Resolving the "DEADLINE_EXCEEDED" error
    • Adding and updating Linux SSH keys on Managed Services for Kubernetes node group hosts
    • Assigning static external IP addresses for Managed Service for Kubernetes cluster nodes
    • Granting internet access to Kubernetes nodes
    • How to change the network or subnet for an MDB cluster
    • How to create an internal Ingress controller

In this article:

  • Issue description
  • Solution
  1. Managed Kubernetes
  2. Resolving the "DEADLINE_EXCEEDED" error

Resolving the "DEADLINE_EXCEEDED" error

Written by
Yandex Cloud
Updated at November 27, 2023
  • Issue description
  • Solution

Issue description

When attempting to execute this curl request:

curl "https://monitoring.api.cloud.yandex.net/monitoring/v2/prometheusMetrics/?folderId=folder_id&service=managed-kubernetes" -H "Authorization: Bearer ${IAM_TOKEN}" -H "Content-Type: application/json" -i

you see this error message:

{"code":504,"message":"Metabase: [cloud-prod-sas] Status{code=DEADLINE_EXCEEDED, description=deadline exceeded after 0.807915461s, ... cause=null}"}

Solution

This error arises because of numerous metrics, due to which the request does not have time to complete. We recommend exporting metrics using selectors to reduce the volume of data:

scrape_configs:
  - job_name: 'yc-monitoring-export'
    metrics_path: '/monitoring/v2/prometheusMetrics'
    params:
      folderId:
      - 'b1gXXXXXXXXXXXXXXXXX'
      service:
      - 'managed-kubernetes'
      selectors:
      - 'namespace=...'
    bearer_token: ...

Note

The selectors parameter for pod metrics can be filtered by namespace or pod name mask, for example, pod=part-of-name*. We write more details in the query language documentation.

Was the article helpful?

Previous
Resolving the "Multi-Attach error for volume" error
Next
Adding and updating Linux SSH keys on Managed Services for Kubernetes node group hosts
Yandex project
© 2025 Yandex.Cloud LLC