aws-iam-authenticator
설치
Amazon EKS는 IAM을 사용하여 Kubernetes용 AWS IAM 인증자kubectl
용 AWS IAM 인증자를 설치하고 이를 인증에 사용하도록 Kubernetes 구성 파일을 수정하여 스톡 kubectl
클라이언트가 Amazon EKS와 함께 작동하도록 구성할 수 있습니다.
AWS CLI 버전 1.16.156
이상을 실행 중인 경우에는 authenticator를 설치할 필요가 없습니다. 대신 aws eks
get-token
명령을 사용할 수 있습니다. 자세한 내용은 수동으로 kubeconfig 파일 생성 섹션을 참조하세요.
AWS CLI 버전 1.16.156
이상을 사용하여 kubeconfig
파일을 생성할 수 없는 경우 macOS, Linux 또는 Windows에서 Kubernetes용 AWS IAM 인증자를 설치할 수 있습니다.
- macOS
-
Homebrew로
를 설치하려면aws-iam-authenticator
를 설치하는 가장 쉬운 방법은 Homebrewaws-iam-authenticator
를 사용하는 것입니다. -
Mac에 아직 Homebrew
가 설치되어 있지 않다면 다음 명령으로 설치하십시오. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-
다음 명령으로
aws-iam-authenticator
를 설치합니다.brew install aws-iam-authenticator
-
aws-iam-authenticator
바이너리가 작동하는지 테스트합니다.aws-iam-authenticator help
macOS에
를 설치하려면aws-iam-authenticator
다음 단계에 따라
aws-iam-authenticator
를 설치할 수 있습니다.-
하드웨어 플랫폼용 GitHub에서
aws-iam-authenticator
바이너리를 다운로드합니다. 첫 번째 명령은amd64
릴리스를 다운로드합니다. 두 번째 명령은arm64
릴리스를 다운로드합니다.curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_darwin_amd64
curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_darwin_arm64
(선택 사항) 파일의
SHA-256
체크섬을 사용하여 다운로드한 바이너리를 확인합니다.-
SHA-256
체크섬 파일을 다운로드합니다.curl -Lo aws-iam-authenticator.txt https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/authenticator_0.5.9_checksums.txt
-
다운로드한 인증자 바이너리의 체크섬을 확인합니다. 첫 번째 명령은
amd64
체크섬을 반환합니다. 두 번째 명령은arm64
체크섬을 반환합니다.awk '/aws-iam-authenticator_0.5.9_darwin_amd64/ {print $1}' aws-iam-authenticator.txt
awk '/aws-iam-authenticator_0.5.9_darwin_arm64/ {print $1}' aws-iam-authenticator.txt
출력 예는 다음과 같습니다.
7656bd290a7e9cb588df1d9ccec43fab7f2447b88ed4f41d3f5092fd114b0939
-
다운로드한 바이너리에 대해
SHA-256
체크섬을 확인합니다.openssl sha1 -sha256 aws-iam-authenticator
출력 예는 다음과 같습니다.
SHA256(aws-iam-authenticator)=
7656bd290a7e9cb588df1d9ccec43fab7f2447b88ed4f41d3f5092fd114b0939
반환되는 출력은 이전 단계의 출력과 일치해야 합니다.
-
-
바이너리에 실행 권한을 적용합니다.
chmod +x ./aws-iam-authenticator
-
바이너리를
$PATH
의 폴더에 복사합니다.$HOME/bin/aws-iam-authenticator
를 생성하고$PATH
가$HOME/bin
로 시작하는 것이 좋습니다.mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
-
PATH
환경 변수에$HOME/bin
을 추가합니다.echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
-
aws-iam-authenticator
바이너리가 작동하는지 테스트합니다.aws-iam-authenticator help
-
- Linux
-
Linux에
를 설치하려면aws-iam-authenticator
-
하드웨어 플랫폼용 GitHub에서
aws-iam-authenticator
바이너리를 다운로드합니다. 첫 번째 명령은amd64
릴리스를 다운로드합니다. 두 번째 명령은arm64
릴리스를 다운로드합니다.curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64
curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_arm64
(선택 사항) 파일의
SHA-256
체크섬을 사용하여 다운로드한 바이너리를 확인합니다.-
SHA-256
체크섬 파일을 다운로드합니다.curl -Lo aws-iam-authenticator.txt https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/authenticator_0.5.9_checksums.txt
-
다운로드한 인증자 바이너리의 체크섬을 확인합니다. 첫 번째 명령은
amd64
체크섬을 반환합니다. 두 번째 명령은arm64
체크섬을 반환합니다.awk '/aws-iam-authenticator_0.5.9_linux_amd64/ {print $1}' aws-iam-authenticator.txt
awk '/aws-iam-authenticator_0.5.9_linux_arm64/ {print $1}' aws-iam-authenticator.txt
출력 예는 다음과 같습니다.
b192431c22d720c38adbf53b016c33ab17105944ee73b25f485aa52c9e9297a7
-
다운로드한 바이너리에 대해
SHA-256
체크섬을 확인합니다.openssl sha1 -sha256 aws-iam-authenticator
출력 예는 다음과 같습니다.
SHA256(aws-iam-authenticator)=
b192431c22d720c38adbf53b016c33ab17105944ee73b25f485aa52c9e9297a7
반환되는 출력은 이전 단계의 출력과 일치해야 합니다.
-
-
바이너리에 실행 권한을 적용합니다.
chmod +x ./aws-iam-authenticator
-
바이너리를
$PATH
의 폴더에 복사합니다.$HOME/bin/aws-iam-authenticator
를 생성하고$PATH
가$HOME/bin
로 시작하는 것이 좋습니다.mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
-
PATH
환경 변수에$HOME/bin
을 추가합니다.echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
-
aws-iam-authenticator
바이너리가 작동하는지 테스트합니다.aws-iam-authenticator help
-
- Windows
-
Chocolatey로 Windows에
를 설치하려면 다음을 수행합니다.aws-iam-authenticator
-
Windows 시스템에 아직 Chocolatey가 설치되어 있지 않은 경우, chocolatey 설치
를 참조하세요. -
PowerShell 터미널 창을 열고 다음과 같은 명령을 사용하여
aws-iam-authenticator
패키지를 설치합니다.choco install -y aws-iam-authenticator
-
aws-iam-authenticator
바이너리가 작동하는지 테스트합니다.aws-iam-authenticator help
Windows에
를 설치하려면aws-iam-authenticator
-
PowerShell 터미널 창을 열고 GitHub에서
aws-iam-authenticator
바이너리를 다운로드합니다.curl -Lo aws-iam-authenticator.exe https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_windows_amd64.exe
(선택 사항) 파일의
SHA-256
체크섬을 사용하여 다운로드한 바이너리를 확인합니다.-
SHA-256
체크섬 파일을 다운로드합니다.curl -Lo aws-iam-authenticator.txt https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/authenticator_0.5.9_checksums.txt
-
다운로드한 인증자 바이너리의 체크섬을 확인합니다.
$checksum = Get-Content aws-iam-authenticator.txt $checksum[3]
출력 예는 다음과 같습니다.
b7345e06c5f1d31b9459a38baffe0744343711cb5042cb31ff1e072d870c42f9 aws-iam-authenticator_0.5.9_windows_amd64.exe
-
다운로드한 바이너리에 대해
SHA-256
체크섬을 확인합니다.Get-Filehash aws-iam-authenticator.exe
출력 예는 다음과 같습니다.
Algorithm Hash Path --------- ---- ---- SHA256 B7345E06C5F1D31B9459A38BAFFE0744343711CB5042CB31FF1E072D870C42F9 /home/cloudshell-user/temp/aws-iam-authenticator
반환된 출력은 대문자이지만 이전 단계에서 반환된 소문자 출력과 일치해야 합니다.
-
-
바이너리를
PATH
의 폴더에 복사합니다. PATH에 명령줄 유틸리티에 사용하는 기존 디렉터리가 있으면 해당 디렉터리로 이진 파일을 복사하십시오. 그렇지 않은 경우 다음 단계를 완료합니다.-
C:\bin
과 같이, 명령줄 이진 파일용 새 디렉터리를 생성합니다. -
aws-iam-authenticator.exe
이진 파일을 새 디렉터리로 복사합니다. -
사용자 또는 시스템
PATH
환경 변수를 편집하여PATH
에 새 디렉터리를 추가합니다. -
PowerShell 터미널을 닫고 새
PATH
변수를 가져오기 위해 새 터미널을 엽니다.
-
-
aws-iam-authenticator
바이너리가 작동하는지 테스트합니다.aws-iam-authenticator help
-
기존 Amazon EKS 클러스터가 있는 경우 해당 클러스터에 대한 kubeconfig
파일을 생성합니다. 자세한 내용은 Amazon EKS 클러스터용 kubeconfig 파일 생성 또는 업데이트 섹션을 참조하세요. 그렇지 않은 경우 새 Amazon EKS 클러스터를 생성하려면 Amazon EKS 클러스터 생성 섹션을 참조하세요.