Cluster IAM 액세스 생성

Prev Next

입력한 정보에 따라 생성된 클러스터의 IAM 액세스를 생성합니다.

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
POST /clusters/{uuid}/access-entries

Ncloud Kubernetes Service API에서 공통으로 사용하는 헤더에 대한 자세한 내용은 Ncloud Kubernetes Service 공통 요청 헤더를 참조해 주십시오.

요청 구문은 다음과 같습니다.

{
  "type": "string",
  "entry": "string",
  "groups": [
    "string"
  ],
  "policies": [
    {
      "type": "string",
      "scope": "string",
      "namespaces": [
        "string"
      ]
    }
  ]
}
JSON

요청 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
type String Required IAM 액세스 타입
  • USER
  • ROLE
entry String Required IAM USER, ROLE별 NRN 정보
groups[] Array Optional 그룹명
policies[] Array Optional 추가할 정책 목록
policies[].type String Conditional 정책 타입
  • policies[] 입력 시 필수
  • NKSClusterAdminPolicy
  • NKSAdminPolicy
  • NKSEditPolicy
  • NKSViewPolicy
policies[].scope String Conditional 정책 범위
  • policies[] 입력 시 필수
  • cluster
  • namespace
policies[].namespaces Array Conditional 네임스페이스
  • policies[].scope 설정이 namespace인 경우 필수

요청 예시는 다음과 같습니다.

curl --location --request POST 'https://nks.apigw.fin-ntruss.com/nks/v2/clusters/****a20e-e0fb-4dc9-af1b-97fd3f8d****/access-entries' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'
--data '{
  "type": "USER",
  "entry": "string",
  "groups": [
    "string"
  ],
  "policies": [
    {
      "type": "string",
      "scope": "string",
      "namespaces": [
        "string"
      ]
    }
  ]
}'
Curl

응답 형식을 설명합니다.

응답 구문은 다음과 같습니다.

{
    "uuid": "string"
}
JSON

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
uuid String - 클러스터의 UUID

Ncloud Kubernetes Service API에서 공통으로 사용하는 응답 상태 코드에 대한 자세한 내용은 Ncloud Kubernetes Service 응답 상태 코드를 참조해 주십시오.

응답 예시는 다음과 같습니다.

{
    "uuid": "****a20e-e0fb-4dc9-af1b-97fd3f8d****"
}
JSON