--- title: "createTargetGroup" slug: "cli-vloadbalancer-targetgroup-createtargetgroup" tags: ["Target Group", "Load Balancer", "Auto Scaling Group"] updated: 2026-09-17T09:10:37Z published: 2026-09-17T09:10:37Z canonical: "cli-fin.ncloud-docs.com/cli-vloadbalancer-targetgroup-createtargetgroup" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli-fin.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createTargetGroup 타깃 그룹을 생성합니다. ## 구문 `createTargetGroup` 구문은 다음과 같습니다. ``` ./ncloud vloadbalancer createTargetGroup \ --vpcNo \ --targetGroupProtocolTypeCode \ --healthCheckProtocolTypeCode \ [--targetGroupName ] \ [--targetTypeCode ] \ [--targetGroupPort ] \ [--targetGroupDescription ] \ [--healthCheckPort ] \ [--healthCheckUrlPath ] \ [--healthCheckHttpMethodTypeCode ] \ [--healthCheckCycle ] \ [--healthCheckUpThreshold ] \ [--healthCheckDownThreshold ] \ [--targetNoList ] \ [--regionCode ] \ [--output ] ``` ## 옵션 `createTargetGroup` 실행 시 지정할 수 있는 옵션을 설명합니다. ### 필수 옵션 `createTargetGroup`의 필수 옵션입니다. | 옵션 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC 번호 - [getVpcList](/docs/cli-vpc-vpcmanagement-getvpclist) 참조 | | `--targetGroupProtocolTypeCode` | String | Required | 타깃 그룹의 프로토콜 유형 - `TCP` \| `UDP` \| `PROXY_TCP` \| `HTTP` \| `HTTPS` - 사용하는 프로토콜에 따라서 적용할 수 있는 로드밸런서의 유형이 제한됨 - 네트워크 로드밸런서: `TCP` \| `UDP` - 네트워크 프록시 로드밸런서: `PROXY_TCP` - 애플리케이션 로드밸런서: `HTTP` \| `HTTPS` | | `--healthCheckProtocolTypeCode` | String | Required | 타깃의 상태를 확인하기 위한 헬스 체크 수행 시 로드밸런서가 사용하는 프로토콜 - `HTTP` \| `HTTPS` \| `TCP` - 타깃 그룹의 프로토콜 유형에 따라서 선택할 수 있는 값이 제한됨 - `TCP`, `UDP`, `PROXY_TCP` 프로토콜: `TCP` - `HTTP`, `HTTPS` 프로토콜: `HTTP`, `HTTPS` | | `--healthCheckHttpMethodTypeCode` | String | Conditional | 헬스 체크 수행 시 사용할 HTTP 메서드 유형 - `HEAD` \| `GET` - 타깃 그룹의 헬스 체크 프로토콜 유형이 `HTTP` 또는 `HTTPS`인 경우, 필수 입력 | ### 선택 옵션 `createTargetGroup`의 선택 옵션입니다. 지정하지 않은 옵션에는 기본값이 적용됩니다. | 옵션 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `--targetGroupName` | String | Optional | 타깃 그룹의 이름 - 영문자, 숫자, 특수문자 `-`를 조합하여 3~30자 이내로 입력 - 문자열의 시작은 영문자, 마지막은 영문자 또는 숫자로 구성 - 미입력 시 네이버 클라우드 플랫폼에서 자동으로 부여 | | `--targetTypeCode` | String | Optional | 타깃 그룹에 추가될 타깃 유형 - `VSVR`: Server (VPC) | | `--targetGroupPort` | Integer | Optional | 타깃 그룹에서 사용하는 포트 - `1`~`65534` (기본값: `80`) | | `--targetGroupDescription` | String | Optional | 타깃 그룹에 대한 설명 (Byte) - 0~1,000 | | `--healthCheckPort` | Integer | Optional | 타깃의 상태를 확인하기 위한 헬스 체크 수행 시 로드밸런서가 사용하는 포트 - `1`~`65534` (기본값: `80`) | | `--healthCheckUrlPath` | String | Optional | 헬스 체크 수행 시 사용할 URL 경로 - `/`로 시작하는 URL 경로 - 기본값: `/` - 타깃 그룹의 헬스 체크 프로토콜 유형이 `HTTP` 또는 `HTTPS`인 경우에만 설정 가능 | | `--healthCheckCycle` | Integer | Optional | 헬스 체크 주기 (초) - `5`~`300` (기본값: `30`) | | `--healthCheckUpThreshold` | Integer | Optional | 타깃 상태를 정상이라고 판단하기 위해 필요한 연속적인 헬스 체크 성공 횟수 - `2`~`10` (기본값: `2`) | | `--healthCheckDownThreshold` | Integer | Optional | 타깃 상태를 비정상이라고 판단하기 위해 필요한 연속적인 헬스 체크 실패 횟수 - `2`~`10` (기본값: `2`) | | `--targetNoList` | List | Optional | 타깃 그룹에 바인딩할 타깃 목록 - 공백으로 구분하여 여러 개 입력 가능 (예시: `--targetNoList 34567890 34567891`) - [getServerInstanceList](/docs/cli-vserver-server-getserverinstancelist) 참조 | ### 공통 옵션 `vloadbalancer` 명령에서 공통으로 사용하는 옵션에 대한 정보는 [Load Balancer 옵션](/docs/cli-vloadbalancer#%EC%98%B5%EC%85%98)을 참조해 주십시오. ## 예시 타깃 그룹 생성 요청이 성공하면 타깃 그룹의 구성 정보가 반환됩니다. ### 명령 명령 예시는 다음과 같습니다. ``` ./ncloud vloadbalancer createTargetGroup \ --vpcNo 12345678 \ --targetGroupProtocolTypeCode HTTP \ --healthCheckProtocolTypeCode HTTP \ --targetGroupName lb-test-tg \ --targetGroupPort 80 \ --targetGroupDescription "Test target group" \ --healthCheckHttpMethodTypeCode GET \ --regionCode FKR \ --output json ``` ### 출력 출력 예시는 다음과 같습니다. ``` { "createTargetGroupResponse": { "totalRows": 1, "targetGroupList": [ { "targetGroupNo": "55667788", "targetGroupName": "lb-test-tg", "targetType": { "code": "VSVR", "codeName": "Server (VPC)" }, "vpcNo": "12345678", "targetGroupProtocolType": { "code": "HTTP", "codeName": "HTTP protocol" }, "targetGroupPort": 80, "targetGroupDescription": "Test target group", "useStickySession": false, "useProxyProtocol": false, "algorithmType": { "code": "RR", "codeName": "Round Robin" }, "createDate": "2026-08-13T11:36:07+0900", "regionCode": "FKR", "loadBalancerInstanceNo": "", "healthCheckProtocolType": { "code": "HTTP", "codeName": "HTTP protocol" }, "healthCheckPort": 80, "healthCheckUrlPath": "/", "healthCheckHttpMethodType": { "code": "GET", "codeName": "HTTP GET Method" }, "healthCheckCycle": 30, "healthCheckUpThreshold": 2, "healthCheckDownThreshold": 2, "targetNoList": [] } ], "requestId": "e3ea2e8e-5473-4d56-9e53-015feef82685", "returnCode": "0", "returnMessage": "success" } } ```