Skip to content

Commit

Permalink
docs: fix sample command for container logs (#9427)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnkkk7 authored Dec 14, 2023
1 parent 1741c07 commit 26114df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/how/extract-container-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Depending on your issue, you may be interested to view both debug and normal inf
Since log files are named based on the current date, you'll need to use "ls" to see which files currently exist. To do so, you can use the `kubectl exec` command, using the pod name recorded in step one:

```
kubectl exec datahub-frontend-1231ead-6767 -n default -- ls -la /tmp/datahub/logs/gms
kubectl exec datahub-gms-c578b47cd-7676 -n default -- ls -la /tmp/datahub/logs/gms
total 36388
drwxr-xr-x 2 datahub datahub 4096 Jul 29 07:45 .
Expand Down Expand Up @@ -131,5 +131,5 @@ Now you should be able to view the logs locally.
There are a few ways to get files out of the pod and into a local file. You can either use `kubectl cp` or simply `cat` and pipe the file of interest. We'll show an example using the latter approach:

```
kubectl exec datahub-frontend-1231ead-6767 -n default -- cat /tmp/datahub/logs/gms/gms.log > my-local-gms.log
kubectl exec datahub-gms-c578b47cd-7676 -n default -- cat /tmp/datahub/logs/gms/gms.log > my-local-gms.log
```

0 comments on commit 26114df

Please sign in to comment.