Skip to content

Get logs of a service

Description

For different reasons maybe you need to get the logs for a service or group of services (deployment). There are two main ways to do that: using the kubectl command line and argocd user interface.
To get the logs using the command line you have to install and configure kubectl in your command system.

Requirements

If you want to use the command line tool you have to install and configure kubectl before. Use the next link to config this feature.
If you want to use the argocd user interface you need a github user that is part of the team 1doc3 developers to get read only access or senior to have write access.

Procedure

For command line

> kubectl -n <namespace> get pods
NAME READY STATUS RESTARTS AGE
apiv3-7985bf4fd4-bqjfs 1/1 Running 0 76m
auth-674577559c-bncv7 1/1 Running 0 20h
> kubectl -n <namespace> get logs <pod_name> -f --tail=500
The previous command shown the last 500 lines of logs and follow new entries on real time.

Argocd user interface

Enter on the argo cd 1doc3 web page following the next
.
Using your github credentials sign in
Chose the stage (namespace) of the service you want to get.
Search the service or the pod you want to inspect and then select logs
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.