Hi, I could use some help with task logs in the Fl...
# flyte-support
l
Hi, I could use some help with task logs in the Flyte UI. When I run a task (just a hello world task), there is no output/log in the Flyte console. I am running Flyte on Minikube using https://github.com/davidmirror-ops/flyte-the-hard-way/blob/main/docs/on-premises/single-node/002-single-node-onprem-install.md Any ideas, what the issue could be? Do you need additional info? I'd appreciate it 🙂
c
@little-printer-49833 So the Flyte console should give you access to task execution Outputs without any additional config (regardless of the deployment path) Log links in the UI can be configured with the K8s dashboard, or Cloudwatch/Stackdriver
live execution logs is not available in Flyte OSS but Union. Let me know if you need help setting up log links
l
What are log links? I just need to see the output of my python code (with normal print). If this is not available in OSS, is there an API endpoint, where I can get the execution logs at runtime? thx
Why do I have to configure logging links for Flyte to get logs? Couldn't Flyte just use the Kubernetes API to get the logs?
I mean exceptions are transmitted to the Flyte UI but logs not for some reason 😕
n
@average-finland-92144 so there's no way to view logs under
task logs
in the Flyte UI through the k8s API?
@little-printer-49833 Did you make some progress?
b
The documentation doesn't make it clear that it's a Union-only thing: the breadcrumb trail is "Flyte OSS > User guide > Core concepts > Tasks > Viewing logs" (although the screenshots certainly look like Union and not Flyte OSS)
a
@bland-dress-83134 thanks for flagging that docs bug, already sent a PR to fix. @nutritious-mechanic-88579 so runtime logs are not surfaced in the Flyte UI by default but you can configure the K8s dashboard to access the logs of the specific Pod. If you add something like this to values, Flyte will generate a log link for each node in the UI to display the Pod logs:
Copy code
plugins:
  logs:
    kubernetes-enabled: true
    kubernetes-template-uri: http://<YOUR_FLYTE_ENDPOINT>/kubernetes-dashboard/#/log/{{.namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}
b
I'm interested in this
task_logs.plugins.logs
too -- is the kubernetes-dashboard endpoint enabled by deploying
flyte-deps
in addition to
flyte-core
(or binary)?
a
Yes but it seems to be using an old version plus installs other components that you may not need. I'd rather go with the upstream install and configuring access https://github.com/kubernetes/dashboard/tree/master/charts/kubernetes-dashboard
b
Came to the same conclusion 👍
although I was curious if there was some kind of integration in Flyte since you had "FLYTE_ENDPOINT" in your example there?
was just wondering how these links would work in a multi-cluster setup...
fwiw, looks like this config needs the trick mentioned in the docs for other logging links
Copy code
plugins:
  logs:
    kubernetes-enabled: true
    kubernetes-template-uri: 'http://<YOUR_DASHBOARD_URL>/#/log/{{ "{{" }}.namespace {{ "}}" }}/{{ "{{" }} .podName {{ "}}" }}/pod?namespace={{ "{{" }} .namespace {{ "}}" }}'
a
Ah you're right. My bad
Let me know how it works for you to make sure the docs cover it
b
the above worked for me 👍