Skip to content

Is there a way to log container defined in ResourceTemplate? #7010

Answered by terrytangyuan
mirocody asked this question in Q&A
Discussion options

You must be logged in to vote

TFJob is a custom resource so I don't think logs are available besides the main container log that basically watches for the resource status. I'd suggest using a sidecar to collect your logs from worker/master pods and inject the log to a separate container/step so that you can see via the UI. Other than that, kubectl is the easiest way to access the logs.

The current solution for this is through a sidecar, e.g. example mentioned in #6910 (comment)

    - name: tfjob-multiworker-sidecar
      sidecars:
        - name: master
          image:  argoproj/argoexec:v3.0.7
          command:
            - sh
            - -c
          args:
            - "kubectl wait --for=condition=ContainersR…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mirocody
Comment options

Answer selected by mirocody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants