diff options
Diffstat (limited to 'doc/administration/troubleshooting/kubernetes_cheat_sheet.md')
-rw-r--r-- | doc/administration/troubleshooting/kubernetes_cheat_sheet.md | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md index 64a6979c016..290d6d9f21d 100644 --- a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md +++ b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md @@ -118,15 +118,18 @@ and they will assist you with any issues you are having. kubectl get events -w --namespace=gitlab ``` -- Most of the useful GitLab tools (console, Rake tasks, etc) are found in the task-runner - pod. You may enter it and run commands inside or run them from the outside: +- Most of the useful GitLab tools (console, Rake tasks, etc) are found in the toolbox + pod. You may enter it and run commands inside or run them from the outside. + + NOTE: + The `task-runner` pod was renamed to `toolbox` in GitLab 14.2 (charts 5.2). ```shell # find the pod - kubectl get pods | grep task-runner + kubectl --namespace gitlab get pods -lapp=toolbox # enter it - kubectl exec -it <task-runner-pod-name> -- bash + kubectl exec -it <toolbox-pod-name> -- bash # open rails console # rails console can be also called from other GitLab pods @@ -139,10 +142,10 @@ and they will assist you with any issues you are having. /usr/local/bin/gitlab-rake gitlab:check # open console without entering pod - kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails console + kubectl exec -it <toolbox-pod-name> -- /srv/gitlab/bin/rails console # check the status of DB migrations - kubectl exec -it <task-runner-pod-name> -- /usr/local/bin/gitlab-rake db:migrate:status + kubectl exec -it <toolbox-pod-name> -- /usr/local/bin/gitlab-rake db:migrate:status ``` You can also use `gitlab-rake`, instead of `/usr/local/bin/gitlab-rake`. @@ -163,12 +166,15 @@ and they will assist you with any issues you are having. kubectl get secret <secret-name> -ojsonpath={.data.password} | base64 --decode ; echo ``` -- How to connect to a GitLab PostgreSQL database: +- How to connect to a GitLab PostgreSQL database. + + NOTE: + The `task-runner` pod was renamed to `toolbox` in GitLab 14.2 (charts 5.2). In GitLab 14.2 (chart 5.2) and later: ```shell - kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password --database main + kubectl exec -it <toolbox-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password --database main ``` In GitLab 14.1 (chart 5.1) and earlier: @@ -215,9 +221,9 @@ all Kubernetes resources and dependent charts: helm get manifest <release name> ``` -## Installation of minimal GitLab configuration via Minikube on macOS +## Installation of minimal GitLab configuration via minikube on macOS -This section is based on [Developing for Kubernetes with Minikube](https://docs.gitlab.com/charts/development/minikube/index.html) +This section is based on [Developing for Kubernetes with minikube](https://docs.gitlab.com/charts/development/minikube/index.html) and [Helm](https://docs.gitlab.com/charts/installation/tools.html#helm). Refer to those documents for details. @@ -227,13 +233,13 @@ to those documents for details. brew install kubernetes-cli ``` -- Install Minikube via Homebrew: +- Install minikube via Homebrew: ```shell brew cask install minikube ``` -- Start Minikube and configure it. If Minikube cannot start, try running `minikube delete && minikube start` +- Start minikube and configure it. If minikube cannot start, try running `minikube delete && minikube start` and repeat the steps: ```shell @@ -247,7 +253,7 @@ to those documents for details. brew install helm ``` -- Copy the [Minikube minimum values YAML file](https://gitlab.com/gitlab-org/charts/gitlab/raw/master/examples/values-minikube-minimum.yaml) +- Copy the [minikube minimum values YAML file](https://gitlab.com/gitlab-org/charts/gitlab/raw/master/examples/values-minikube-minimum.yaml) to your workstation: ```shell |