Skip to content

docs: update exec command with namespace

Steve Xuereb requested to merge docs/k8s-cheatsheet into master

What

Update the exec command to specify the namespace to connect to toolbox

Why

Following the current instructions:

$ kubectl --namespace gitlab get pods -lapp=toolbox
NAME                                       READY   STATUS      RESTARTS   AGE
ops-gitlab-toolbox-6f7487f9d6-4tvjv        1/1     Running     0          2d7h
ops-gitlab-toolbox-backup-28363740-nvjc2   0/1     Completed   0          32h
ops-gitlab-toolbox-backup-28365180-t8gzr   0/1     Completed   0          8h
$ kubectl exec -it ops-gitlab-toolbox-6f7487f9d6-4tvjv -- bash
Error from server (NotFound): pods "ops-gitlab-toolbox-6f7487f9d6-4tvjv" not found

We need to specify --namespace gitlab

$ kubectl exec --namespace gitlab -it ops-gitlab-toolbox-6f7487f9d6-4tvjv -- bash
Defaulted container "toolbox" out of: toolbox, certificates (init), configure (init)

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, follow the instructions in the "Reviewer Roulette" section of the Danger Bot MR comment, as per the Distribution experimental MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added/updated
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Equivalent MR/issue for Gitlab Operator project opened (see Operator documentation on impact of Charts changes)
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Merge request reports