forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs on how to access Run logs 🗎
As @cmoulliard pointed out, it's not obvious how to get to the logs for a PipelineRun or a TaskRun. If you know how the underlying kubernetes resources work you can figure it out but it can be hard to know where to start. Plus, folks may not realize that we are working on better ways of accessing logs. And once we work on #107 we can build up these docs with more detail about how to upload logs too. Fixes tektoncd#898
- Loading branch information
1 parent
b440da3
commit a7a6044
Showing
6 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Logs | ||
|
||
Logs for [`PipelineRuns`](pipelineruns.md) and [`TaskRuns`](taskruns.md) are | ||
associated with the underlying pod. | ||
|
||
_In [#107](https://github.com/tektoncd/pipeline/issues/107) | ||
we will add a solution to persist logs outside of your kubernetes cluster._ | ||
|
||
To access these logs currently you have a few options: | ||
|
||
* [You can get the logs from the pod](https://kubernetes.io/docs/reference/kubectl/cheatsheet/#interacting-with-running-pods) | ||
e.g. using `kubectl`: | ||
|
||
```bash | ||
# Get the name of the pod from the instance of the TaskRun | ||
kubectl get taskruns -o yaml | grep podName | ||
|
||
# Or get the pod name from the PipelineRun | ||
kubectl get pipelineruns -o yaml | grep podName | ||
|
||
# Use kubectl to access the logs for all containers in the pod | ||
kubectl logs $POD_NAME --all-containers | ||
|
||
# Or get the logs from a specific container in the pod | ||
kubectl logs $POD_NAME -c $CONTAINER_NAME | ||
kubectl logs $POD_NAME -c step-run-kubectl | ||
``` | ||
|
||
* You can use [the `tkn` cli tool](https://github.com/tektoncd/cli) to access logs | ||
* You can use [the dashboard web interface](https://github.com/tektoncd/dashboard) to access logs | ||
* You can setup an external service to consume and display logs, for example | ||
[Elasticsearch, Beats and Kibana](https://github.com/mgreau/tekton-pipelines-elastic-tutorials) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters