Requirement

  • kubernetes version 확인 : kubectl version --client

  • kubernetes 연결 상태 확인 : kubectl cluster-info

  • istio 설치 (pod로 구성됨)
    • microservice 기반 application을 위한 open souce service platform으로 app의 traffic 관리, 보안 및 metric 관찰을 향상시키기 위해 k8s와 사용
      1. 다운 : curl -L https://istio.io/downloadIstio | sh -
      2. 환경변수 설정 : export PATH=$PATH:~/istio-<version>/bin
      3. 설치 : istioctl install --set profile=demo -y (demo, default, minimal, custom)
      4. 버전 확인 : istioctl version
      5. 사이드카 주입 : kubectl label namespace default istio-injection=enabled
      • istio의 기능을 각 service에 적용하기 위한 단계
  • docker version -> docker 명령어를 containerd 명령어로 변경해보자

  • ebvsybst
    • 환경변수 치환을 위한 command line
  • jq command 설치 : sudo apt install jq
    • JSON data를 처리하고 변환하는데 사용하는 command line
  • keytool
    • opensource java 개발 kit인 openJDK를 설치 : sudo apt install openjdk-17-jdk
    • 설치확인 : java -version
    • keytool 확인 : keytool -help
  • OpenSSL
    • 암호화 작업을 수행하기 위한 opensource library

image build (docker 제거) (https-server, pm-rapp)

  1. (docker -> nerdctl) / (docker build -> buildctl)
    • nerdctl, buildctl 앞에 sudo 붙여야함
    • containerd에서는 image에도 namespace가 있다!
  2. buildkit 오류
    • buildkit은 containerd runtime을 사용해 container로 띄워져 있음 (sudo nerdctl ps로 확인)
    • server를 재시작하면 buildkit container가 죽는 현상
    • 나는 builkdkit socket도 없어서 socket이 올바르게 mount되는 명령어를 사용했다. (-v option)
    • 해결 방법
      • buildkit 데몬 컨테이너 삭제 및 실행

      • sudo nerdctl stop buildkitd
      • sudo nerdctl rm buildkitd
      • 생성 sudo nerdctl run -d --name buildkitd --privileged -v /var/run/buildkit:/var/run/buildkit docker.io/moby/buildkit:latest buildkitd
      • 권한부여 sudo chmod 777 /var/run/buildkit
      • 환경변수 export BUILDKIT_HOST=unix:///var/run/buildkit/buildkitd.sock
  3. 빌드된 image 확인
    • sudo nerdctl images --namespace k8s.io

installation

  • 설치 파일 종류 : install-nrt.sh, install-pm-log.sh, install-pm-influx-job.sh, install-pm-rapp.sh
  • 이전에 빌드했던 image를 사용하는데 이름변수가 설정이 잘 안되있어서 오류가 생김
    1. install-nrt.sh
    1. cd install
    2. ./install-nrt.sh
    3. pm-https-server-0 오류 발생: InvalidImageName
    4. InspectFailed
      • 이미지 이름 /pm-https-server:latest의 format이 잘못됨
      • 이미지 이름 format
        • /:
        • 현재 파일에는 이미지 이름이 ‘ /pm-https-server:latest’ 즉, /가 포함된 상황
    5. 이미지 이름이 적어져있는 yaml 파일 찾기
      1. install-nrt.sh에서 https-server의 namespace인 ran 설치 부분을 찾기
        • helm install --wait --create-namespace -n ran -f helm/global-values.yaml ran helm/ran
        • helm/global-values.yaml 이 파일과 helm/ran 이 repo 주목
      2. /install/helm/ran/templates/app-deployment.yaml 내에서 http-server의 image 이름 찾기
      3. image: /pm-https-server:latest 수정
      4. image: pm-https-server:latest 수정완료
  1. install-pm-log.sh, install-pm-influx-job.sh 오류 없음

  2. install-pm-rapp.sh

    1. install-nrt.sh와 동일한 문제가 발생
    2. /install/helm/nrt-pm-rapp/template/app-pod.yaml
      • image: /pm-rapp:latest 수정
      • image: pm-rapp:latest 수정완료