ncp-iam-authenticator のインストール
    • PDF

    ncp-iam-authenticator のインストール

    • PDF

    Article Summary

    VPC環境で利用できます。

    Ncloud Kubernetes Serviceは、ncp-iam-authenticatorを通じて IAM認証を提供します。IAM認証を通じて kubectlコマンドを使用するには、ncp-iam-authenticatorをインストールしてこれを認証に使用するように kubectlの設定ファイルを修正する必要があります。

    参考

    APIアクセス制御を使用する場合、メインアカウントでは IAM認証をサポートせず、サブアカウントのみ IAM認証が可能です。

    macOSのインストール

    macOSに ncp-iam-authenticatorをインストールする方法は、次の通りです。

    Homebrewでインストール

    Homebrewでインストールする方法は、次の通りです。

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

    直接ダウンロードしてインストール

    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
      
    2. (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
      1. ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
        openssl sha1 -sha256 ncp-iam-authenticator
        
      2. SHA-256 SUMをダウンロードします。
        https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS
        
      3. 2つの値が一致しているか確認します。
    3. バイナリに実行権限を追加します。
      chmod +x ./ncp-iam-authenticator
      
    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
      
    5. Shell Profileに PATHを追加します。
      • bash
        echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
        
      • zsh
        echo 'export PATH=$PATH:$HOME/bin' >> ~/.zshrc
        
    6. ncp-iam-authenticatorバイナリが正常に動作するかテストします。
      ncp-iam-authenticator help
      

    linuxのインストール

    linuxに ncp-iam-authenticatorをインストールする方法は、次の通りです。

    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_linux_amd64
      
    2. (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
      1. ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
        openssl sha1 -sha256 ncp-iam-authenticator
        
      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
        
      3. 2つの値が一致しているか確認します。
    3. バイナリに実行権限を追加します。
      chmod +x ./ncp-iam-authenticator
      
    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
      
    5. Shell Profileに PATHを追加します。
      • bash
        echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
        
    6. ncp-iam-authenticatorバイナリが正常に動作するかテストします。
      ncp-iam-authenticator help
      

    windowsのインストール

    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
      
    2. (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
      1. ncp-iam-authenticatorバイナリファイルの SHA-256合計を確認します。
        Get-FileHash ncp-iam-authenticator.exe
        
      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
        
      3. 2つの値が一致しているか確認します。
    3. C:\binのように、新しいフォルダを作成します。
    4. ncp-iam-authenticator.exe実行ファイルをコピーして新しいフォルダに貼り付けます。
    5. ユーザーまたはシステム PATH環境変数を編集し、PATHに新しいフォルダを追加します。
    6. PowerShellターミナルを閉じ、新しい PATH変数をインポートするために新しいターミナルを開きます。
    7. ncp-iam-authenticatorバイナリが正常に動作するかテストします。
      ncp-iam-authenticator help
      

    ncp-iam-authenticatorのインストールが完了したら、kubeconfigを追加する必要があります。IAM認証 kubeconfigの作成をご参照ください。


    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.