1.4. 클러스터가 단기 인증 정보를 사용하는지 확인
CCO(Cloud Credential Operator) 구성 및 클러스터의 기타 값을 확인하여 클러스터가 개별 구성 요소에 대해 단기 보안 인증 정보를 사용하는지 확인할 수 있습니다.
사전 요구 사항
-
단기 인증 정보를 구현하기 위해 Cloud Credential Operator 유틸리티(
ccoctl
)를 사용하여 OpenShift Container Platform 클러스터를 배포했습니다. -
OpenShift CLI(
oc
)를 설치합니다. -
cluster-admin
권한이 있는 사용자로 로그인합니다.
프로세스
다음 명령을 실행하여 CCO가 수동 모드에서 작동하도록 구성되었는지 확인합니다.
$ oc get cloudcredentials cluster \ -o=jsonpath={.spec.credentialsMode}
다음 출력은 CCO가 수동 모드에서 작동하는지 확인합니다.
출력 예
Manual
다음 명령을 실행하여 클러스터에
root
인증 정보가 없는지 확인합니다.$ oc get secrets \ -n kube-system <secret_name>
여기서
<secret_name
>은 클라우드 공급자의 루트 시크릿 이름입니다.플랫폼 시크릿 이름 AWS(Amazon Web Services)
aws-creds
Microsoft Azure
azure-credentials
GCP(Google Cloud Platform)
gcp-credentials
오류가 발생하면 루트 시크릿이 클러스터에 존재하지 않음을 확인할 수 있습니다.
AWS 클러스터의 출력 예
Error from server (NotFound): secrets "aws-creds" not found
다음 명령을 실행하여 구성 요소가 개별 구성 요소에 대해 단기 보안 인증 정보를 사용하고 있는지 확인합니다.
$ oc get authentication cluster \ -o jsonpath \ --template='{ .spec.serviceAccountIssuer }'
이 명령은 클러스터
Authentication
오브젝트에서.spec.serviceAccountIssuer
매개변수 값을 표시합니다. 클라우드 공급자와 연결된 URL의 출력은 클러스터가 클러스터 외부에서 생성 및 관리되는 단기 자격 증명과 함께 수동 모드를 사용하고 있음을 나타냅니다.Azure 클러스터: 구성 요소가 다음 명령을 실행하여 시크릿 매니페스트에 지정된 Azure 클라이언트 ID를 가정하는지 확인합니다.
$ oc get secrets \ -n openshift-image-registry installer-cloud-credentials \ -o jsonpath='{.data}'
azure_client_id
및azure_federated_token_file
가 포함된 출력은 구성 요소가 Azure 클라이언트 ID를 가정하고 있음을 확인합니다.Azure 클러스터: 다음 명령을 실행하여 Pod ID Webhook가 실행 중인지 확인합니다.
$ oc get pods \ -n openshift-cloud-credential-operator
출력 예
NAME READY STATUS RESTARTS AGE cloud-credential-operator-59cf744f78-r8pbq 2/2 Running 2 71m pod-identity-webhook-548f977b4c-859lz 1/1 Running 1 70m
/validating-an-installation.adoc