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
直接ダウンロードしてインストール
- 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 - (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
- ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
openssl sha1 -sha256 ncp-iam-authenticator - SHA-256 SUMをダウンロードします。
https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS - 2つの値が一致しているか確認します。
- ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
- バイナリに実行権限を追加します。
chmod +x ./ncp-iam-authenticator $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 Profileに PATHを追加します。
- bash
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile - zsh
echo 'export PATH=$PATH:$HOME/bin' >> ~/.zshrc
- bash
- ncp-iam-authenticatorバイナリが正常に動作するかテストします。
ncp-iam-authenticator help
linuxのインストール
linuxに ncp-iam-authenticatorをインストールする方法は、次の通りです。
- 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 - (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
- ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
openssl sha1 -sha256 ncp-iam-authenticator - SHA-256 SUMをダウンロードします。
curl -o ncp-iam-authenticator.sha256 -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS - 2つの値が一致しているか確認します。
- ncp-iam-authenticatorバイナリファイルの SHA-256の合計を確認します。
- バイナリに実行権限を追加します。
chmod +x ./ncp-iam-authenticator $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 Profileに PATHを追加します。
- bash
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
- bash
- ncp-iam-authenticatorバイナリが正常に動作するかテストします。
ncp-iam-authenticator help
windowsのインストール
windows ncp-iam-authenticatorをインストールする方法は、次の通りです。
- 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 - (任意) SHA-256 SUMを使用してダウンロードしたバイナリファイルを確認できます。
- ncp-iam-authenticatorバイナリファイルの SHA-256合計を確認します。
Get-FileHash ncp-iam-authenticator.exe - SHA-256 SUMをダウンロードします。
curl -o ncp-iam-authenticator.sha256 -L https://github.com/NaverCloudPlatform/ncp-iam-authenticator/releases/latest/download/ncp-iam-authenticator_SHA256SUMS - 2つの値が一致しているか確認します。
- ncp-iam-authenticatorバイナリファイルの SHA-256合計を確認します。
- C:\binのように、新しいフォルダを作成します。
- ncp-iam-authenticator.exe実行ファイルをコピーして新しいフォルダに貼り付けます。
- ユーザーまたはシステム PATH環境変数を編集し、PATHに新しいフォルダを追加します。
- PowerShellターミナルを閉じ、新しい PATH変数をインポートするために新しいターミナルを開きます。
- ncp-iam-authenticatorバイナリが正常に動作するかテストします。
ncp-iam-authenticator help
ncp-iam-authenticatorのインストールが完了したら、kubeconfigを追加する必要があります。IAM認証 kubeconfigの作成をご参照ください。