Kubernetes Pod Logs
A common need to utilize the Kubernetes dashboard is to review pod logs. This can be used to debug why a pod is restarting, failing to start, or check in on its health or activity.
We can provide this experience directly within GitLab, for the cluster that is integrated.
I have proposed 2 phases of the MVC. We should get the initial MVC submitted and reviewed as an MR, but it would be ideal if we could continue on and get MVC.2 also finished in the same release. Without support for multi-container pods, a lot of users will see errors when trying to use it.
- The Pod log screen can be a dedicated screen to show the logs. An example of kubectl's view is below.
- Entrypoint would be from Deploy Boards, once pod tracking ships.
- For the absolute MVC, we would only support pods with a single container.
- For this first release, not required to do a live view of the logs. Page reload will refresh the logs.
- We should try to load a healthy amount of log data, since we will not support pagination.
- Retrieve the list of containers within the selected pod. Show a dropdown populated with that list. Automatically select and display the logs for the first alphabetical container.
- Add a refresh button to refresh the logs.
Future pod log enhancements
previouspod logs (i.e. if the pod is crash looping, retrieve the now dead pod logs)
- Streaming pod logs (e.g. tail -f)
- Pagination of pod logs
Design specs: https://gitlab-org.gitlab.io/gitlab-design/hosted/hazel/ee%234752-kubernetes-pod-logs-spec-previews/
- The tooltip shows up when the pod box is on hover.
- Then, the style of pod box will change to:
- Background color -->
- Border color -->
Pod logs screen
boldstyle displays after "Pod logs from" in the header.
- It has a
Refreshbutton in the header, so users can refresh it manually.
- Do not need the time span footer for this MVC.
|Deployment board||Pod logs screen|
- It has the dropdowns in the header, so users can select the containers.
- The width of dropdown is
360pxsince the containers sometimes have the long names.
- It has timespan of the logs on the bottom of the logs frame. (Optional, nice to have.)