vSphere Docker 자격 증명 도우미 CLI를 사용하여 내장된 Harbor 레지스트리에 컨테이너 이미지를 안전하게 푸시하고 내장된 Harbor 레지스트리에서 컨테이너 이미지를 끌어옵니다.

Kubernetes CLI 도구 다운로드 페이지에는 vSphere Docker 자격 증명 도우미를 다운로드하는 링크가 포함되어 있습니다. vSphere Docker 자격 증명 도우미를 사용하여 Docker 클라이언트를 내장된 Harbor 레지스트리에 안전하게 연결합니다.

사전 요구 사항

프로시저

  1. 브라우저를 사용하여 사용 중인 환경에 해당하는 Kubernetes CLI 도구 다운로드 URL로 이동합니다.
  2. vSphere Docker 자격 증명 도우미 섹션까지 아래로 스크롤합니다.
  3. 운영 체제를 선택합니다.
  4. vsphere-docker-credential-helper.zip 파일을 다운로드합니다.
  5. 작업 디렉토리에 ZIP 파일 컨텐츠의 압축을 풉니다.
    docker-credential-vsphere 바이너리 실행 파일을 사용할 수 있습니다.
  6. docker-credential-vsphere 바이너리를 Docker 클라이언트 호스트에 복사합니다.
  7. 바이너리의 위치를 시스템 경로에 추가합니다.
    예를 들어 Linux:
    mv docker-credential-vsphere /usr/local/bin/docker-credential-vsphere
  8. 셸 또는 터미널 세션에서 docker-credential-vsphere 명령을 실행하여 vSphere Docker 자격 증명 도우미 설치를 확인합니다.
    배너 메시지 및 CLI에 대한 명령줄 옵션 목록이 표시됩니다.
    vSphere login manager is responsible for vSphere authentication. 
    It allows vSphere users to securely login and logout to access Harbor images.
    
    Usage:
      docker-credential-vsphere [command]
    
    Available Commands:
      help        Help about any command
      login       Login into specific harbor server and get authentication
      logout      Logout from Harbor server and erase user token
    
    Flags:
      -h, --help   help for docker-credential-vsphere
    
    Use "docker-credential-vsphere [command] --help" for more information about a command.
    
  9. 내장된 Harbor 레지스트리에 로그인합니다.
    우선 사용량을 확인합니다.
    docker-credential-vsphere login -help
    Usage:
      docker-credential-vsphere login [harbor-registry] [flags]
    
    Flags:
      -h, --help               help for login
      -s, --service string     credential store service
          --tlscacert string   location to CA certificate (default "/etc/docker/certs.d/*.crt")
      -u, --user string        vSphere username and password
    
    그런 후 다음 명령을 사용하여 로그인합니다.
    docker-credential-vsphere login <container-registry-IP>
    인증 토큰을 가져와서 저장되고 로그인됩니다.
    docker-credential-vsphere login 10.179.145.77
    Username: [email protected]
    Password: INFO[0017] Fetched username and password
    INFO[0017] Fetched auth token
    INFO[0017] Saved auth token
    
  10. 내장된 Harbor 레지스트리에서 로그아웃합니다.
    docker-credential-vsphere logout 10.179.145.77

다음에 수행할 작업

내장된 Harbor 레지스트리로 이미지 푸시.