Skip to content

Feature Request: Add API Support for Retrieving Pod Logs #400

@andylizf

Description

@andylizf

Is your feature request related to a problem? Please describe.

Yes - currently, RunPod’s API doesn’t provide access to pod logs, even though logs are available through the RunPod console. This creates a problem when automating workflows or debugging issues programmatically. For example, when provisioning a container, if an error occurs, we have no way to retrieve the logs via the API to understand what went wrong. This forces us to rely on the UI, which isn’t ideal for automated or large-scale deployments.

In cases like SkyPilot provisioning, when the container fails to start correctly, we need to see the logs to diagnose issues such as missing dependencies, incorrect environment variables, or service startup failures. Without API access to logs, we’re left guessing or repeatedly retrying without knowing the root cause.

Describe the solution you’d like

We’d like to have an API endpoint that allows us to fetch pod logs, similar to docker logs or kubectl logs. This would make it easier to programmatically diagnose issues during provisioning or runtime failures. Ideally, the API should support:

  • Retrieving logs from specific pods or containers
  • Filtering logs by time or line limits (e.g., tail functionality)
  • Optionally streaming logs for real-time monitoring

Describe alternatives you’ve considered

  • Manually logging into the RunPod console to check logs, which is not scalable for automation.

Additional context

Adding API access to container logs would significantly improve the debugging experience, especially for automated workflows like SkyPilot. This would not only help quickly identify issues during the provisioning phase but also make RunPod a more robust and developer-friendly platform for large-scale deployments. Since SkyPilot already integrates with RunPod, better log visibility would enhance its support and potentially encourage more users to choose RunPod for their compute workloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions