OCI Registry: Container Image 등록 및 안전한 배포

by Velucid June 09, 2021

Topics

OCI OKE(Oracle Kubernetes Engine) 따라하기


내용 설명

외부의 Docker Hub에서 Docker 이미지를 다운받아, OCI Registry의 Repository에 등록하고, 이를 안전하게 OCI내에서 OKE Cluster에서 사용하는 과정을 보여 줍니다.

Docker 공식 이미지인 karthequian/helloworld를 다운 받아 OCI Repository(helloword)에 등록합니다.

1) OCI Auth Token 생성

Kubernetes에서 OCI Registry에 접속하기 위한 Auth Token(Password)을 생성하고 등록합니다.

Generate Token

Generate Token

Generate Token

2) OCI Repository 생성

"helloworld"라는 이름으로 OCI Repository를 생성합니다.

OCI Registry

Create Repository

Repository Result

3) Bastion 서버에 Docker 설치

4) Docker image download

5) OCI Registry 로그인

6) OCIR로의 image 업로드

Note: Docker Enterprise Edition에서는 docker CLI를 통해 Registry의 내용도 확인 가능

$ docker registry ls

OCIR helloworld

OCIR helloworld

7) Secret 생성 - OCIR과 K8S 연결

8) OCIR를 통해 애플리케이션 배포 및 테스트

Helloworld Page


참고 자료