Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Creazione di una rete virtuale Azure
Prima di poter eseguire il deployment di un cluster Anthos su Azure, devi creare una rete virtuale (VNet) di Azure in cui verrà eseguito il cluster. Questa pagina spiega come fare.
Tuttavia, prima di creare una VNet di Azure, ti consigliamo di creare un nuovo gruppo di risorse per la VNet separato dal gruppo di risorse che creerai in un secondo momento per GKE su Azure. Questa separazione può aiutarti a organizzare e gestire meglio le tue risorse.
Per creare un nuovo gruppo di risorse per la tua VNet di Azure, esegui il seguente comando:
Ora che hai creato un gruppo di risorse per la tua VNet di Azure, segui i seguenti passaggi per creare una VNet con una subnet predefinita e collegare un gateway NAT a questa subnet:
Per creare una nuova VNet con una subnet predefinita, esegui il seguente comando:
AZURE_REGION: la regione Azure utilizzata in precedenza
VNET_RESOURCE_GROUP_NAME: il nome del gruppo di risorse per la tua VNet che hai creato all'inizio di questo documento
VNET_ADDRESS_PREFIXES: un elenco separato da spazi di prefessi di indirizzi IP in notazione CIDR, ad esempio10.0.0.0/16 172.16.0.0/12
Per creare un indirizzo IP per un nuovo gateway NAT, collega un gateway NAT all'indirizzo IP e collega il gateway NAT alla subnet predefinita, esegui i seguenti comandi:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Create an Azure virtual network\n===============================\n\nBefore you can deploy an Anthos cluster on Azure, you need to create an Azure\nvirtual network (VNet) in which your cluster will run. This page explains how to\ndo that.\n\nHowever, before creating an Azure VNet, we recommend that you create a new\nresource group for the VNet that is separate from the resource group you will\ncreate later for your GKE on Azure. This separation can help better\norganize and manage your resources.\n\nTo create a new resource group for your Azure VNet, run the following command: \n\n az group create --name \"\u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e\" \\\n --location \"\u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e: the name of the resource group for your GKE on Azure VNet\n- \u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e: a [supported Azure region](/kubernetes-engine/multi-cloud/docs/azure/reference/supported-regions)---for example `westus2`\n\nNow that you have created a resource group for your Azure Vnet, perform the\nfollowing steps to create a VNet with a default subnet, and attach a NAT gateway\nto that subnet:\n\n1. To create a new VNet with a default subnet, run the following command:\n\n az network vnet create \\\n --name \"\u003cvar translate=\"no\"\u003eVNET_NAME\u003c/var\u003e\" \\\n --location \"\u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e\" \\\n --resource-group \"\u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e\" \\\n --address-prefixes \u003cvar translate=\"no\"\u003eVNET_ADDRESS_PREFIXES\u003c/var\u003e \\\n --subnet-name default\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eVNET_NAME\u003c/var\u003e: the name of your VNet\n - \u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e: the Azure region used previously\n - \u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e: the name of the resource group for your VNet that you created at the beginning of this document\n - \u003cvar translate=\"no\"\u003eVNET_ADDRESS_PREFIXES\u003c/var\u003e: a space-separated list of IP address prefixes in CIDR notation---for example `10.0.0.0/16 172.16.0.0/12`\n2. To create an IP address for a new NAT gateway, attach a NAT gateway to the\n IP address, and attach the NAT gateway to the default subnet, run the\n following commands:\n\n az network public-ip create \\\n --name \"\u003cvar translate=\"no\"\u003eNAT_GATEWAY_NAME\u003c/var\u003e-ip\" \\\n --location \"\u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e\" \\\n --resource-group \"\u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e\" \\\n --allocation-method Static \\\n --sku Standard\n\n az network nat gateway create \\\n --name \"\u003cvar translate=\"no\"\u003eNAT_GATEWAY_NAME\u003c/var\u003e\" \\\n --location \"\u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e\" \\\n --resource-group \"\u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e\" \\\n --public-ip-addresses \"\u003cvar translate=\"no\"\u003eNAT_GATEWAY_NAME\u003c/var\u003e-ip\" \\\n --idle-timeout 10\n\n az network vnet subnet update \\\n --name default \\\n --vnet-name \"\u003cvar translate=\"no\"\u003eVNET_NAME\u003c/var\u003e\" \\\n --resource-group \"\u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e\" \\\n --nat-gateway \"\u003cvar translate=\"no\"\u003eNAT_GATEWAY_NAME\u003c/var\u003e\"\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNAT_GATEWAY_NAME\u003c/var\u003e: the name of the new NAT gateway\n - \u003cvar translate=\"no\"\u003eVNET_NAME\u003c/var\u003e: the name of your VNet\n - \u003cvar translate=\"no\"\u003eAZURE_REGION\u003c/var\u003e: the Azure region used previously\n - \u003cvar translate=\"no\"\u003eVNET_RESOURCE_GROUP_NAME\u003c/var\u003e: the name of the resource group for your VNet that you created at the beginning of this document\n\nWhat's next\n-----------\n\n- [Create an Azure resource group](/kubernetes-engine/multi-cloud/docs/azure/how-to/create-azure-resource-group)"]]