ncp-iam-authenticator 설치

Prev Next

VPC 환경에서 이용 가능합니다.

Ncloud Kubernetes Service는 ncp-iam-authenticator를 통해 IAM 인증을 제공합니다. IAM 인증을 통해 kubectl 명령을 사용하려면 ncp-iam-authenticator를 설치하고 이를 인증에 사용하도록 kubectl 설정 파일을 수정해야 합니다.

참고

API 접근 제어를 사용하는 경우 메인 계정으로는 IAM 인증을 지원하지 않으며, 서브 계정만 IAM 인증이 가능합니다.

macOS에 ncp-iam-authenticator를 설치하는 방법은 다음과 같습니다.

Homebrew로 설치

brew tap NaverCloudPlatform/tap
brew install ncp-iam-authenticator
Plain text

직접 다운로드하여 설치

  1. ncp-iam-authenticator 바이너리를 다운로드해 주십시오. (Arm 버전을 다운로드하려면 명령을 실행하기 전에 amd64를 arm64로 변경합니다.)
    curl -o ncp-iam-authenticator -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_darwin_amd64
    
    Shell
  2. (선택) SHA-256 SUM을 사용하여 다운로드한 바이너리 파일을 확인할 수 있습니다.
    1. ncp-iam-authenticator 바이너리 파일의 SHA-256 합계를 확인합니다.
      openssl sha1 -sha256 ncp-iam-authenticator
      
      Shell
    2. SHA-256 SUM을 다운로드 합니다.
      https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS
      
      Shell
    3. 두 값이 일치하는지 확인합니다.
  3. 바이너리에 실행 권한을 추가해 주십시오.
    chmod +x ./ncp-iam-authenticator
    
    Shell
  4. $HOME/bin/ncp-iam-authenticator를 생성하고 $PATH에 추가해 주십시오.
    mkdir -p $HOME/bin && cp ./ncp-iam-authenticator $HOME/bin/ncp-iam-authenticator && export PATH=$PATH:$HOME/bin
    
    Shell
  5. Shell Profile에 PATH를 추가해 주십시오.
    • bash
      echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
      
      Shell
    • zsh
      echo 'export PATH=$PATH:$HOME/bin' >> ~/.zshrc
      
      Shell
  6. ncp-iam-authenticator 바이너리가 정상 동작하는지 테스트해 주십시오.
    ncp-iam-authenticator help
    
    Shell

linux에 ncp-iam-authenticator를 설치하는 방법은 다음과 같습니다.

  1. ncp-iam-authenticator 바이너리를 다운로드해 주십시오.(Arm 버전을 다운로드하려면 명령을 실행하기 전에 amd64arm64로 변경합니다.)
    curl -o ncp-iam-authenticator -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_linux_amd64
    
    Shell
  2. (선택) SHA-256 SUM을 사용하여 다운로드한 바이너리 파일을 확인할 수 있습니다.
    1. ncp-iam-authenticator 바이너리 파일의 SHA-256 합계를 확인합니다.
      openssl sha1 -sha256 ncp-iam-authenticator
      
      Shell
    2. SHA-256 SUM을 다운로드 합니다.
      curl -o ncp-iam-authenticator.sha256 -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS
      
      Shell
    3. 두 값이 일치하는지 확인합니다.
  3. 바이너리에 실행 권한을 추가해 주십시오.
    chmod +x ./ncp-iam-authenticator
    
    Shell
  4. $HOME/bin/ncp-iam-authenticator를 생성하고 $PATH에 추가해 주십시오.
    mkdir -p $HOME/bin && cp ./ncp-iam-authenticator $HOME/bin/ncp-iam-authenticator && export PATH=$PATH:$HOME/bin
    
    Shell
  5. Shell Profile에 PATH를 추가해 주십시오.
    • bash
      echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
      
      Shell
  6. ncp-iam-authenticator 바이너리가 정상 동작하는지 테스트해 주십시오.
    ncp-iam-authenticator help
    
    Shell

windows ncp-iam-authenticator를 설치하는 방법은 다음과 같습니다.

  1. PowerShell 터미널에서 ncp-iam-authenticator 바이너리를 다운로드해 주십시오.
    curl -o ncp-iam-authenticator.exe -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_windows_amd64.exe
    
    Shell
  2. (선택) SHA-256 SUM을 사용하여 다운로드한 바이너리 파일을 확인할 수 있습니다.
    1. ncp-iam-authenticator 바이너리 파일의 SHA-256합계를 확인합니다.
      Get-FileHash ncp-iam-authenticator.exe
      
      Shell
    2. SHA-256 SUM을 다운로드 합니다.
      curl -o ncp-iam-authenticator.sha256 -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS
      
      Shell
    3. 두 값이 일치하는지 확인합니다.
  3. C:\bin과 같이, 새 폴더를 생성해 주십시오.
  4. ncp-iam-authenticator.exe 실행 파일을 새 폴더로 복사해 주십시오.
  5. 사용자 또는 시스템 PATH 환경 변수를 편집하여 PATH에 새 폴더를 추가해 주십시오.
  6. PowerShell 터미널을 닫고 새 PATH 변수를 가져오기 위해 새 터미널을 열어 주십시오.
  7. ncp-iam-authenticator 바이너리가 정상 동작하는지 테스트해 주십시오.
    ncp-iam-authenticator help
    
    Shell

ncp-iam-authenticator가 설치가 완료되었다면 kubeconfig를 추가해야 합니다. IAM 인증 kubeconfig 생성을 참조해 주십시오.