비공개 풀 구성 파일(비공개 풀 구성 파일)에는 사양에 따라 비공개 풀을 만드는 Cloud Build 지침이 포함됩니다. 비공개 풀 구성 파일에는 비공개 풀에 사용할 디스크 크기 및 머신 유형과 같은 정보가 포함되어 있습니다. gcloud 도구 또는 Cloud Build API를 사용하여 비공개 풀을 만들고 관리하는 경우 비공개 풀 구성 파일이 필요합니다.
비공개 풀 구성 파일의 구조
YAML 또는 JSON 구문을 사용하여 비공개 풀 구성 파일을 작성할 수 있습니다. curl을 사용하여 비공개 풀을 만들고 관리하려면 비공개 풀 구성 파일을 JSON 형식으로 작성합니다. gcloud 도구를 사용하여 비공개 풀을 만들고 관리하려면 YAML 또는 JSON 형식으로 비공개 풀 구성 파일을 작성하세요.
이 필드는 선택 사항입니다. 서비스 프로듀서 네트워크와 VPC 네트워크를 피어링하는 경우에만 networkConfig를 지정합니다.
egressOption
이 필드는 선택 사항입니다. VPC 서비스 제어 경계 내에 비공개 풀을 만드는 경우 이 필드의 값을 NO_PUBLIC_EGRESS로 설정합니다. 비공개 풀 구성 파일에 이 필드를 포함하지 않으면 공개 이그레스가 사용 설정됩니다.
비공개 풀의 VPC 서비스 제어 설정에 대한 자세한 내용은 VPC 서비스 제어 사용을 참조하세요.
peeredNetwork
비공개 풀 구성 파일에 networkConfig 필드가 포함된 경우 필수 필드입니다. 이 필드의 값을 서비스 제작자 네트워크와 피어링된 VPC 네트워크의 네트워크 리소스 URL로 설정합니다. 네트워크 리소스 URL은 projects/NETWORK_PROJECT_ID/global/networks/NETWORK_NAME 형식이어야 합니다. 여기서 NETWORK_PROJECT_ID는 VPC 네트워크를 보유한 Google Cloud 프로젝트의 프로젝트 ID이고 NETWORK_NAME은 VPC 네트워크의 이름입니다.
값을 지정하지 않으면 Cloud Build는 기본적으로 서비스 프로듀서 네트워크를 사용합니다.
peeredNetworkIpRange
이 필드는 선택 사항입니다. 이 필드의 값을 설정하여 피어링된 네트워크의 할당된 범위 내에 VM을 할당할 수 있는 내부 IP 범위를 지정합니다. 크기 제한 또는 잘못된 시작 IP 등으로 인해 비공개 연결 범위 내에서 지정된 IP 범위를 할당할 수 없는 경우 비공개 풀을 만들 수 없습니다.
peeredNetworkIpRange는 'STARTING_IP/SUBNET_PREFIX_SIZE' 형식의 클래스 없는 도메인 간 라우팅(CIDR) 표기법을 사용하여 지정됩니다. 이 필드를 사용하는 경우 SUBNET_PREFIX_SIZE를 지정해야 합니다. SUBNET_PREFIX_SIZE는 IP 범위의 크기를 결정합니다. 슬래시(/)로 시작해야 하며 값은 29 이하여야 합니다. STARTING_IP 부분은 선택사항이며 범위의 시작 주소를 지정합니다. STARTING_IP를 지정하지 않으면 시작 주소가 비공개 연결 범위 내에서 자동으로 할당됩니다. peeredNetworkIpRange에 값을 지정하지 않으면 기본값 /24가 사용되며 256개 IP 범위의 시작 IP가 자동으로 할당됩니다.
SUBNET_PREFIX_SIZE 값은 29를 초과하지 않아야 합니다. 숫자가 클수록 더 큰 서브넷 프리픽스가 지정되므로 가능한 IP 수가 줄어들고 IP 범위가 더 작아집니다. IP 주소가 32비트이므로 프리픽스 크기가 /24이면 범위에 256개의 가능한 IP(8비트)가 허용되고 프리픽스 크기가 /29이면 가능한 IP(3비트)가 8개로 줄어듭니다. 최대 빌더 VM 수는 범위의 가용 IP 수(해당 범위의 총 가능한 IP 수에서 2를 뺀 값)로 제한됩니다.
peeredNetworkIpRange 필드의 예시는 다음을 참조하세요.
192.168.0.0/24는 192.168.0.0으로 시작하고 서브넷 프리픽스 크기가 24인 IP 범위를 지정합니다(256개 IP, 254개 가용 IP 포함).
/29는 시작 IP가 자동으로 결정되고 서브넷 프리픽스 크기가 29인 범위를 지정합니다(8개 IP, 6개 가용 IP 포함).
workerConfig
필수 필드입니다. 여기에는 비공개 풀의 구성 옵션이 포함되어 있습니다.
diskSizeGb
이 필드는 선택 사항입니다. 이 필드를 사용하여 비공개 풀 인스턴스의 디스크 크기를 GB 단위로 지정합니다. 100 이상이고 2,000 이하인 값을 지정합니다. 비공개 풀 구성 파일에 이 필드를 포함하지 않거나 0을 이 필드의 값으로 지정하면 Cloud Build가 기본값 100을 사용합니다.
machineType
이 필드는 선택 사항입니다. 이 필드를 사용하여 비공개 풀 인스턴스의 Compute Engine 머신 유형을 지정합니다. 다음 머신 유형 중 하나를 지정합니다.
e2-medium
e2-standard-2
e2-standard-4
e2-standard-8
e2-standard-16
e2-standard-32
e2-highmem-2
e2-highmem-4
e2-highmem-8
e2-highmem-16
e2-highcpu-2
e2-highcpu-4
e2-highcpu-8
e2-highcpu-16
e2-highcpu-32
값을 지정하지 않으면 Cloud Build는 기본값인 e2-standard-2을 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-06-14(UTC)"],[[["\u003cp\u003eA private pool config file is essential for defining the specifications of a private pool in Cloud Build, including disk size and machine type.\u003c/p\u003e\n"],["\u003cp\u003eThe private pool config file can be written in either YAML or JSON format, but when using \u003ccode\u003ecurl\u003c/code\u003e it must be in JSON.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003enetworkConfig\u003c/code\u003e is an optional setting for private pools that enables peering with a VPC network, requiring \u003ccode\u003epeeredNetwork\u003c/code\u003e to be defined and allowing \u003ccode\u003epeeredNetworkIpRange\u003c/code\u003e for IP range customization.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eworkerConfig\u003c/code\u003e is required to specify the setup of your private pool and to use optional fields such as \u003ccode\u003ediskSizeGb\u003c/code\u003e for disk size configuration and \u003ccode\u003emachineType\u003c/code\u003e to determine the type of Compute Engine.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting a \u003ccode\u003epeeredNetworkIpRange\u003c/code\u003e subnet prefix it must not exceed 29, with a larger number resulting in a smaller number of useable IP's.\u003c/p\u003e\n"]]],[],null,["# Private pool configuration file schema\n\nA private pool configuration file (private pool config file) contains\ninstructions for Cloud Build to create a private pool based on\nyour specifications. A private pool config file contains information such as the\ndisk size and machine type you want to use for your private pool. The\nprivate pool config file is required when you create and manage private pools\nusing the `gcloud` tool or the Cloud Build API.\n| **Note:** The private pool config file is different from the [Cloud Build configuration file](/build/docs/build-config): the Cloud Build config file lets you configure your build whereas the private pool config file lets you configure your private pool.\n\nStructure of a private pool config file\n---------------------------------------\n\nYou can write the private pool config file using the YAML or the JSON\nsyntax. To create and manage private pools using `curl`, write\nthe private pool config file in the JSON format. To create and manage private\npools using the `gcloud` tool, write the private pool config file in the\nYAML or the JSON format.\n\nA private pool config file has the following structure: \n\n### YAML\n\n privatePoolV1Config:\n networkConfig:\n egressOption: NO_PUBLIC_EGRESS\n peeredNetwork: '\u003cvar translate=\"no\"\u003ePEERED_NETWORK\u003c/var\u003e'\n peeredNetworkIpRange: '\u003cvar translate=\"no\"\u003ePEERED_NETWORK_IP_RANGE\u003c/var\u003e'\n workerConfig:\n diskSizeGb: '\u003cvar translate=\"no\"\u003ePRIVATE_POOL_DISK_SIZE\u003c/var\u003e'\n machineType: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePRIVATE_POOL_MACHINE_TYPE\u003c/span\u003e\u003c/var\u003e\n\n### JSON\n\n {\n \"privatePoolV1Config\": {\n \"networkConfig\": {\n \"egressOption\": \"NO_PUBLIC_EGRESS\",\n \"peeredNetwork\": \"\u003cvar translate=\"no\"\u003ePEERED_NETWORK\u003c/var\u003e\",\n \"peeredNetworkIpRange\": \"\u003cvar translate=\"no\"\u003ePEERED_NETWORK_IP_RANGE\u003c/var\u003e\"\n },\n \"workerConfig\": {\n \"diskSizeGb\": \"\u003cvar translate=\"no\"\u003ePRIVATE_POOL_DISK_SIZE\u003c/var\u003e\",\n \"machineType\": \"\u003cvar translate=\"no\"\u003ePRIVATE_POOL_MACHINE_TYPE\u003c/var\u003e\"\n }\n }\n }\n\nThe fields in the private pool config file are explained as follows:\n\n`networkConfig`\n---------------\n\nThis is an optional field. Specify `networkConfig` only if you're peering your\nVPC network with the service producer network.\n\n### `egressOption`\n\nThis is an optional field. Set the value of this field to `NO_PUBLIC_EGRESS` if\nyou're creating your private pool within a VPC Service Controls perimeter. If you\ndon't include this field in the private pool config file, public egress is enabled.\nFor information on setting up VPC Service Controls for private pools, see\n[Using VPC Service Controls](/build/docs/private-pools/using-vpc-service-controls).\n\n### `peeredNetwork`\n\nThis is a required field if your private pool config file contains the `networkConfig`\nfield. Set the value of this field to the network\nresource URL of the VPC network that is peered to the service\nproducer network. The network resource URL must be of the format\n`projects/`\u003cvar translate=\"no\"\u003eNETWORK_PROJECT_ID\u003c/var\u003e`/global/networks/`\u003cvar translate=\"no\"\u003eNETWORK_NAME\u003c/var\u003e,\nwhere \u003cvar translate=\"no\"\u003eNETWORK_PROJECT_ID\u003c/var\u003e is the project ID of\nthe Google Cloud project that holds your VPC network and\n\u003cvar translate=\"no\"\u003eNETWORK_NAME\u003c/var\u003e is the name of your VPC network.\nIf you don't specify a value, Cloud Build uses the [service producer\nnetwork](/build/docs/private-pools/set-up-private-pool-environment) by default.\n\n### `peeredNetworkIpRange`\n\nThis is an optional field. Set the value of this field to specify the internal\nIP range that VMs can be assigned to within the peered network's allocated\nrange. If the specified IP range can't be allocated within the range of the\nprivate connection, for example due to size limitations or an invalid starting\nIP, then the private pool can't be created.\n\n`peeredNetworkIpRange` is specified using Classless Inter-Domain Routing (CIDR)\nnotation in the format `'STARTING_IP/SUBNET_PREFIX_SIZE'`.\nIf this field is used, then `SUBNET_PREFIX_SIZE` must be specified.\n`SUBNET_PREFIX_SIZE` determines the size of the IP range. It must begin with a\nslash (`/`) and have a value less than or equal to 29.The `STARTING_IP` portion\nis optional, and specifies the starting address of the range. If the\n`STARTING_IP` is not specified, then a starting address is automatically\nassigned from within the private connection range. If no value is specified for\n`peeredNetworkIpRange`, a default value of `/24` will be used which\nautomatically assigns a starting IP with a range of 256 IPs.\n\nThe value of `SUBNET_PREFIX_SIZE` must not exceed 29. A larger number specifies\na larger subnet prefix, which would leave fewer possible IPs and result in a\nsmaller IP range. Since an IP address is 32 bits, a prefix size of `/24` allows\n256 possible IPs in the range (eight bits) whereas a prefix size of `/29` leaves\neight possible IPs (three bits). The maximum number of builder VMs is limited to\nthe number of usable IPs in the range (the total possible number of IPs in the\nrange minus two).\n\nSee the following for examples of the `peeredNetworkIpRange` field:\n\n- `192.168.0.0/24` specifies an IP range starting at 192.168.0.0 with a subnet prefix size of 24 (256 IPs, with 254 usable IPs).\n- `/29` specifies a range with an automatically determined starting IP and a subnet prefix size of 29 (eight IPs, with six usable IPs).\n\n`workerConfig`\n--------------\n\nThis is a required field. It contains configuration options for your private\npool.\n\n### `diskSizeGb`\n\nThis is an optional field. Use this field to specify a disk size for your\nprivate pool instance in GB. Specify a value greater than or equal to\n100 and less than or equal to 4000. If you don't include this field in your\nprivate pool config file, or if you specify `0` as the value of this field,\nCloud Build uses the default value of 100.\n\n### `machineType`\n\nThis is an optional field. Use this field to specify the [Compute Engine\nmachine type](/compute/docs/machine-resource#predefined_machine_types) for your\nprivate pool instance. If you don't specify a value, then Cloud Build\nuses the default value of `e2-medium`. Otherwise, specify one of the following\nmachine types: \n\n#### Machine types\n\nThe following table shows the availability of machine types by region: \n\n#### Machine type availability by region\n\n### `enableNestedVirtualization`\n\nThis is an optional field. If your private pool uses a VM with a\n`C3` machine type, then you can enable nested virtualization to run other\nVM instances inside your private pool's VM. For more information, see\n[About nested virtualization](/compute/docs/instances/nested-virtualization/overview).\n\nWhat's next\n-----------\n\n- Learn how to [run builds in private pools](/build/docs/private-pools/run-builds-in-private-pool).\n- Learn how to [create and manage private pools](/build/docs/private-pools/create-manage-private-pools)."]]