Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

  1. Runner Pod Name 확인

    kubectl get pods -A -o wide
  2. pods 진입

    kubectl exec -it <GitLab Pod Name> bash
  3. extra_host 파일 생성

    vi ~/extra_hosts
    ​
    192.168.1.50 gitlab.centos.com
  4. ~/.gitlab-runner/config.toml 수정

    [[runners]]
    pre_clone_script = "cat ~/extra_hosts >> /etc/hosts"
    • 만약 vi 편집기가 없을 경우

      # [[runners]] 밑에 위 명령어를 추가시켜주는 스크립트
      sed -i'' -r -e "/\[\[runners\]\]/a\  pre_clone_script = \"echo '14.36.48.220    gitlab.twoseed.co.kr' >> /etc/hosts\"" config.toml
      
      # 추가해야할 Host가 여러 개인 경우
       sed -i'' -r -e "/\[\[runners\]\]/a\  pre_clone_script = \"echo '14.36.48.220    gitlab.twoseed.co.kr' >> extra_hosts; echo '175.197.124.236 local.registry.co.kr' >> extra_hosts; cat extra_hosts >> /etc/hosts\"" config.toml
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.