--- title: "createTargetGroup" slug: "cli-vloadbalancer-targetgroup-createtargetgroup" tags: ["Load Balancer", "VPC"] updated: 2026-10-08T05:07:46Z published: 2026-10-08T05:07:46Z canonical: "cli.ncloud-docs.com/cli-vloadbalancer-targetgroup-createtargetgroup" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createTargetGroup Available in VPC Create a target group. ## Syntax The `createTargetGroup` syntax is as follows: ``` ./ncloud vloadbalancer createTargetGroup \ --vpcNo \ --targetGroupProtocolTypeCode \ --healthCheckProtocolTypeCode \ [--targetGroupName ] \ [--targetTypeCode ] \ [--targetGroupPort ] \ [--targetGroupDescription ] \ [--healthCheckPort ] \ [--healthCheckUrlPath ] \ [--healthCheckHttpMethodTypeCode ] \ [--healthCheckCycle ] \ [--healthCheckUpThreshold ] \ [--healthCheckDownThreshold ] \ [--targetNoList ] \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `createTargetGroup`. ### Required options The following options are required for `createTargetGroup`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC number - See [getVpcList](/docs/en/cli-vpc-vpcmanagement-getvpclist). | | `--targetGroupProtocolTypeCode` | String | Required | Target group protocol type - `TCP` \| `UDP` \| `PROXY_TCP` \| `HTTP` \| `HTTPS` - Available load balancer types are limited based on the protocol used. - - Network Load Balancer: `TCP` \| `UDP` - - Network Proxy Load Balancer: `PROXY_TCP` - - Application Load Balancer: `HTTP` \| `HTTPS` | | `--healthCheckProtocolTypeCode` | String | Required | Protocol used by the load balancer when performing health checks to verify the status of targets - `HTTP` \| `HTTPS` \| `TCP` - Available values are limited based on the protocol type of the target group. - `TCP`, `UDP`, `PROXY_TCP` protocols: `TCP`. - `HTTP`, `HTTPS` protocols: `HTTP`, `HTTPS`. | | `--healthCheckHttpMethodTypeCode` | String | Conditional | HTTP method type to use when performing health checks - `HEAD` \| `GET` - Required if the target group's health check protocol type is `HTTP` or `HTTPS` | ### Optional options These are the optional options for `createTargetGroup`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--targetGroupName` | String | Optional | Target group name - Enter 3 to 30 characters using English letters, numbers, and the special character `-`. - The string must start with an English letter and end with an English letter or number. - If not entered, NAVER Cloud Platform will assign one automatically. | | `--targetTypeCode` | String | Optional | Target type to be added to the target group - `VSVR`: Server (VPC) | | `--targetGroupPort` | Integer | Optional | Port used by the target group - `1`-`65534` (default: `80`) | | `--targetGroupDescription` | String | Optional | Description of the target group (byte) - 0-1000 | | `--healthCheckPort` | Integer | Optional | Port used by the load balancer to perform health checks on the target - `1`-`65534` (default: `80`) | | `--healthCheckUrlPath` | String | Optional | URL path to use for health checks - URL path starting with `/` - Default: `/` - Can only be set if the target group's health check protocol type is `HTTP` or `HTTPS`. | | `--healthCheckCycle` | Integer | Optional | Health check interval (second) - `5`-`300` (default: `30`) | | `--healthCheckUpThreshold` | Integer | Optional | Number of consecutive successful health checks required to determine that the target is in a normal state - `2`-`10` (default: `2`) | | `--healthCheckDownThreshold` | Integer | Optional | Number of consecutive health check failures required to determine that the target status is abnormal - `2`-`10` (default: `2`) | | `--targetNoList` | List | Optional | List of targets to bind to the target group - You can enter multiple items separated by spaces (e.g., `--targetNoList 34567890 34567891`). - See [getServerInstanceList](/docs/en/cli-vserver-server-getserverinstancelist). | ### Common options For information about the options common to all `vloadbalancer` subcommands, see [Load Balancer (VPC) options](/docs/en/cli-vloadbalancer#%EC%98%B5%EC%85%98). ## Examples If the request to create a target group is successful, the target group's configuration information is returned. ### Command The command example is as follows: ``` ./ncloud vloadbalancer createTargetGroup \ --vpcNo 12345678 \ --targetGroupProtocolTypeCode HTTP \ --healthCheckProtocolTypeCode HTTP \ --targetGroupName lb-test-tg \ --targetGroupPort 80 \ --targetGroupDescription "Test target group" \ --healthCheckHttpMethodTypeCode GET \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "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-07-07T17:08:44+0900", "regionCode": "KR", "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": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "returnCode": "0", "returnMessage": "success" } } ```