Skip to content

Support logs pulling in KubernetesJobOperator #40252

Closed

Description

@pykenny

Description

In cncf-kubernetes provider, KubernetesPodOperator provides get_logs and log_containers arguments to support pulling logs generated from created Kubernetes pod into task logs, and these arguments are also available in KubernetesJobOperator through class inheritance.

However, KubernetesJobOperator does not implement logs pulling mechanism, so user has no way to transfer pod logs from the created job to task logs within this operator.

Use case/motivation

Supports get_logs and log_containers settings in KubernetesJobOperator when wait_until_job_complete is enabled (otherwise it's user's responsibility to manage logs/output generated from the job).

We can take similar approach used in KubernetesPodOperator to regularly fetch pod logs under the created job.

Related issues

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Jun 15, 2024
  2. pykenny commented on May 26, 2025

    @pykenny
    ContributorAuthor

    Went back to the topic today and found that it was solved just a month later:

    Much appreciate @MaksYermak's support on this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions