summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Ramachandran <harish@gitlab.com>2019-08-22 15:09:10 +0000
committerAchilleas Pipinellis <axil@gitlab.com>2019-08-22 15:09:10 +0000
commit3d405831be700c9b0d198d08fb6ade2ad6fd24ae (patch)
tree1385ea7a8a545d06f5078ab3de2af8508acd16ff
parent9f6ff5dca286b99a960e923efa5a24030de462ec (diff)
downloadgitlab-ce-3d405831be700c9b0d198d08fb6ade2ad6fd24ae.tar.gz
Add missing content from debug's kubectl cheat sheet
-rw-r--r--doc/administration/troubleshooting/kubernetes_cheat_sheet.md20
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
index 238c522a0ee..260af333e8e 100644
--- a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
+++ b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
@@ -83,12 +83,22 @@ and they will assist you with any issues you are having.
kubectl logs gitlab-unicorn-7656fdd6bf-jqzfs -c unicorn
```
-- It is not possible to get all the logs via Kubectl at once, like with `gitlab-ctl tail`,
- but a number of third-party tools can be used to do it:
+- Tail and follow all pods that share a label (in this case, `unicorn`):
- - [Kubetail](https://github.com/johanhaleby/kubetail)
- - [kail: kubernetes tail](https://github.com/boz/kail)
- - [stern](https://github.com/wercker/stern)
+ ```bash
+ # all containers in the unicorn pods
+ kubectl logs -f -l app=unicorn --all-containers=true --max-log-requests=50
+
+ # only the unicorn containers in all unicorn pods
+ kubectl logs -f -l app=unicorn -c unicorn --max-log-requests=50
+ ```
+
+- One can stream logs from all containers at once, similar to the Omnibus
+ command `gitlab-ctl tail`:
+
+ ```bash
+ kubectl logs -f -l release=gitlab --all-containers=true --max-log-requests=100
+ ```
- Check all events in the `gitlab` namespace (the namespace name can be different if you
specified a different one when deploying the helm chart):