Kubernetes Logs (DEPRECATED)
- Introduced in GitLab 11.0.
- Moved from GitLab Ultimate to GitLab Free 12.9.
- Deprecated in GitLab 14.5.
-
Moved behind a feature flag named
monitor_logging
in GitLab 15.0. Disabled by default. - Disabled on self-managed in GitLab 15.0.
monitor_logging
and the one named certificate_based_clusters
.
On GitLab.com, this feature is not available.
This feature is not recommended for production use.GitLab makes it easy to view the logs of running pods in connected Kubernetes clusters. By displaying the logs directly in GitLab in the Log Explorer, developers can avoid managing console tools or jumping to a different interface. The Log Explorer interface provides a set of filters above the log file data, depending on your configuration:
-
Namespace - Select the environment to display. Users with Maintainer or
greater permissions can also see pods in the
gitlab-managed-apps
namespace. - Scroll to bottom - Scroll to the end of the displayed logs.
- Refresh - Reload the displayed logs.
To learn more about the Log Explorer, see APM - Log Explorer.
Learn more about Kubernetes + GitLab. Everything you need to build, test, deploy, and run your application at scale.
Requirements
Deploying to a Kubernetes environment is required to use Logs.
Accessing the log explorer
To access the Log explorer, select the More actions menu on a metrics dashboard and select View logs, or:
- Sign in as a user with the View pod logs permissions in the project.
- To navigate to the Log Explorer from the sidebar menu, go to Monitor > Logs (Introduced in GitLab 12.5.).
-
To navigate to the Log Explorer from a specific pod on a deploy board:
- Go to Deployments > Environments and find the environment
which contains the desired pod, like
production
. - On the Environments page, you should see the status of the environment’s pods with deploy boards.
- When mousing over the list of pods, GitLab displays a tooltip with the exact pod name
and status.
- Select the desired pod to display the Log Explorer.
- Go to Deployments > Environments and find the environment
which contains the desired pod, like
Logs view
The Log Explorer lets you filter the logs by:
- Pods.
- From GitLab 12.4, environments.
- From GitLab 12.8, dates.
- From GitLab 13.2, managed apps.
Loading more than 500 log lines is possible from GitLab 12.9 onward.
Support for pods with multiple containers is coming in a future release.
Support for historical data is coming in a future release.