Am 15. September 2026erreichen alle Cloud Composer 1- und Cloud Composer 2-Umgebungen der Version 2.0.x das geplante Ende des Lebenszyklus und können nicht mehr verwendet werden. Wir empfehlen, die Migration zu Cloud Composer 3 zu planen.
Auf dieser Seite wird der Unterschied zwischen den Netzwerktypen „Private IP“ und „Public IP“ in Cloud Composer 3 erläutert. Außerdem finden Sie hier eine Anleitung zum Wechseln des Netzwerktyps Ihrer Umgebung.
Cloud Composer 3 verwendet zwei Arten von Umgebungsnetzwerken:
Öffentliche IP-Netzwerke:
Airflow-Komponenten der Umgebung können auf das Internet zugreifen. Dies ist der Standard-Netzwerktyp.
Airflow-Komponenten in Umgebungen mit öffentlichen IP-Adressen stellen ausgehende Verbindungen über automatisch zugewiesene öffentliche IP-Adressen und Ports her.
Wenn Sie möchten, dass Ihre Umgebungen mit öffentlicher IP-Adresse bestimmte IP-Adressen und Ports verwenden, können Sie dies tun, indem Sie ein VPC-Netzwerk mit Ihrer Umgebung verbinden und auf private IP-Adresse umstellen.
In diesem Fall leitet Cloud Composer den gesamten Traffic mit Ausnahme des Traffics zu Google-Diensten über dieses Netzwerk weiter.
Private IP-Netzwerke:
Die Airflow-Komponenten der Umgebung haben keinen Zugriff auf das Internet.
In Umgebungen mit privaten IP-Adressen wird der privater Google-Zugriff über den Bereich private.googleapis.com konfiguriert. Dadurch wird der Zugriff auf Google APIs, Dienste und Domains ermöglicht, die von diesem Bereich unterstützt werden.
Weitere Informationen und eine Liste der Dienste und Domains, die über private.googleapis.com verfügbar sind, finden Sie in der Virtual Private Cloud-Dokumentation unter Netzwerkkonfiguration.
In Umgebungen mit privaten IP-Adressen und VPC Service Controls wird der privater Google-Zugriff über den Bereich restricted.googleapis.com konfiguriert. Dadurch wird der Zugriff auf Google APIs, Dienste und Domains ermöglicht, die von diesem Bereich unterstützt werden.
Weitere Informationen und eine Liste der Dienste und Domains, die über restricted.googleapis.com verfügbar sind, finden Sie in der Virtual Private Cloud-Dokumentation unter Netzwerkkonfiguration.
Sie können http_proxy- und https_proxy-Umgebungsvariablen in Ihrer Umgebung festlegen. Diese Standard-Linux-Variablen werden von Webclients verwendet, die in Containern des Clusters Ihrer Umgebung ausgeführt werden, um den Traffic über die angegebenen Proxys weiterzuleiten.
Die Variable NO_PROXY ist standardmäßig auf eine Liste von Google-Domains und localhost festgelegt, damit sie vom Proxying ausgeschlossen werden:
.google.com,.googleapis.com,metadata.google.internal,localhost. Diese Konfiguration ermöglicht es, eine Umgebung mit festgelegten Umgebungsvariablen http_proxy und https_proxy zu erstellen, wenn der Proxy nicht für die Verarbeitung von Traffic zu Google-Diensten konfiguriert ist.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-26 (UTC)."],[[["\u003cp\u003eCloud Composer 3 offers two networking types: Public IP, which allows internet access, and Private IP, which restricts internet access but enables connections to Google services through specific ranges.\u003c/p\u003e\n"],["\u003cp\u003ePublic IP environments have default outbound internet access, while Private IP environments access Google services through \u003ccode\u003eprivate.googleapis.com\u003c/code\u003e or \u003ccode\u003erestricted.googleapis.com\u003c/code\u003e ranges and can gain internet access if configured with a VPC network.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer 3 simplifies Private IP configurations compared to Cloud Composer 2, eliminating the need for manual settings of IP ranges, networks, or Private Service Connect.\u003c/p\u003e\n"],["\u003cp\u003eThe networking type of a Cloud Composer 3 environment can be switched between Public IP and Private IP using the Google Cloud console, \u003ccode\u003egcloud\u003c/code\u003e command-line tool, API requests, or Terraform configurations.\u003c/p\u003e\n"]]],[],null,["# Change environment networking type (Private or Public IP)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n**Cloud Composer 3** \\| [Cloud Composer 2](/composer/docs/composer-2/configure-private-ip \"View this page for Cloud Composer 2\") \\| [Cloud Composer 1](/composer/docs/composer-1/configure-private-ip \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page explains the difference between Private IP and Public IP environment\nnetworking types in Cloud Composer 3 and provides instructions for switching\nthe networking type of your environment.\n\nIf you want to disable or enable internet access only when installing PyPI packages, see\n[Configure internet access when installing PyPI packages](/composer/docs/composer-3/packages-internet-access).\n\nIf you want to enable access to your VPC network from your environment,\nsee [Connect an environment to a VPC network](/composer/docs/composer-3/connect-vpc-network).\n\nAbout environment networking types\n----------------------------------\n\nCloud Composer 3 uses two environment networking types:\n\n- *Public IP networking*:\n\n - Airflow components of the environment can access the\n internet. This is the default networking type.\n\n - Airflow components in Public IP environments establish outbound\n connections from automatically allocated public IP addresses and ports.\n If you want your Public IP environments to use predetermined IP\n addresses and ports, you can do so through\n [connecting a VPC network](/composer/docs/composer-3/connect-vpc-network) to your environment\n and [switching it to Private IP](#change-networking-type).\n In this case, Cloud Composer routes all traffic except\n traffic to Google services through this network.\n\n- *Private IP networking*:\n\n - Airflow components of the environment don't have access to\n the internet.\n\n - Private IP environments configure Private Google Access through the\n `private.googleapis.com` range, which enables access to\n Google APIs, services, and domains supported by this range.\n\n For more information and the list of services and domains available\n through `private.googleapis.com`, see\n [Network configuration](/vpc/docs/configure-private-google-access-hybrid#config-choose-domain)\n in the Virtual Private Cloud documentation.\n - [Private IP environments with VPC Service Controls](/composer/docs/composer-3/configure-vpc-sc) configure\n Private Google Access through the `restricted.googleapis.com`\n range, which enables access to Google APIs, services, and domains supported by this range.\n\n For more information and the list of services and domains available\n through `restricted.googleapis.com`, see\n [Network configuration](/vpc/docs/configure-private-google-access-hybrid#config-choose-domain)\n in the Virtual Private Cloud documentation.\n\nIn addition to two networking types, you can\n[enable or disable access to a custom VPC network](/composer/docs/composer-3/connect-vpc-network) for\nany type of environment. Depending on how you configure your VPC network, a\nPrivate IP environment can gain access the internet through you VPC network.\n\n### Cloud Composer 2 networking compared to Cloud Composer 3\n\nIn Cloud Composer 3, Private IP environments require no configuration.\n\nThe following Cloud Composer 2 networking features are no longer relevant in\nCloud Composer 3:\n\n- [Configuring Private IP networking](/composer/docs/composer-2/configure-private-ip). You don't\n need to specify IP ranges, networks, or configure connectivity and firewall\n rules.\n\n- [Configuring Private Service Connect](/composer/docs/composer-2/configure-private-service-connect).\n You don't need to set ranges for Private Service Connect\n in Cloud Composer 3.\n\n | **Note:** [Custom VPC network attachments](/composer/docs/composer-3/connect-vpc-network) in Cloud Composer 3 are based on Private Service Connect. This implementation is **not related** to how Private Service Connect is used in Cloud Composer 2 (for connectivity between the environment's cluster and the resources located in the tenant project). In Cloud Composer 3, network attachments are used differently, you don't need to reflect your Cloud Composer 2 networking setup in them.\n- [Using privately used public IP ranges](/composer/docs/composer-2/configure-privately-used-public-ip). This feature provided an\n option to extend the available IP ranges, which are not required in\n Cloud Composer 3.\n\n- [Using the IP Masquerade agent](/composer/docs/composer-2/enable-ip-masquerade-agent). You don't need to configure\n cluster connectivity in Cloud Composer 3.\n\n- [Configuring authorized networks](/composer/docs/composer-2/configure-authorized-networks). It is not\n possible to access the environment's cluster in Cloud Composer 3.\n\nChange environment networking type\n----------------------------------\n\n### Console\n\n1. In the Google Cloud console, go to the **Environments** page.\n\n [Go to Environments](https://console.cloud.google.com/composer/environments)\n2. In the list of environments, click the name of your environment.\n The **Environment details** page opens.\n\n3. Go to the **Environment configuration** tab.\n\n4. In the **Networking configuration** section, find the\n **Networking type** item and click **Edit**.\n\n5. In the **Networking type** dialog, select:\n\n - **Public IP environment (default)** for Public IP networking.\n - **Private IP environment** for Private IP networking.\n6. Click **Save**.\n\n### gcloud\n\nThe Following Google Cloud CLI arguments change the environment's\nnetworking type:\n\n- `--enable-private-environment`: changes to Private IP networking.\n- `--disable-private-environment`: changes to Public IP networking (default).\n\nChange to Private IP networking: \n\n gcloud beta composer environments update \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --enable-private-environment\n\nChange to Public IP networking: \n\n gcloud beta composer environments update \u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e \\\n --location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --disable-private-environment\n\nReplace the following:\n\n- `ENVIRONMENT_NAME`: the name of the environment.\n- `LOCATION`: the region where the environment is located.\n\nExample (Private IP): \n\n gcloud beta composer environments update example-environment \\\n --location us-central1 \\\n --enable-private-environment\n\nExample (Public IP): \n\n gcloud beta composer environments update example-environment \\\n --location us-central1 \\\n --disable-private-environment\n\n### API\n\n1. Create an [`environments.patch`](/composer/docs/reference/rest/v1beta1/projects.locations.environments/patch) API request.\n\n2. In this request:\n\n 1. In the `updateMask` parameter, specify\n the `config.private_environment_config.enable_private_environment`\n mask.\n\n 2. In the request body, in the `enablePrivateEnvironment` field:\n\n - Specify `true` to change to Private IP networking.\n - Specify `false` to change to Public IP networking (default).\n\nExample (Private IP): \n\n // PATCH https://composer.googleapis.com/v1beta1/projects/example-project/\n // locations/us-central1/environments/example-environment?updateMask=\n // config.private_environment_config.enable_private_environment\n\n \"config\": {\n \"privateEnvironmentConfig\": {\n \"enablePrivateEnvironment\": true\n }\n }\n\n### Terraform\n\nThe `enable_private_environment` field in the `config` block specifies the\nenvironment's networking type:\n\n- `true`: Private IP networking.\n- `false` or omitted: Public IP networking (default).\n\n resource \"google_composer_environment\" \"example\" {\n provider = google-beta\n name = \"\u003cvar translate=\"no\"\u003eENVIRONMENT_NAME\u003c/var\u003e\"\n region = \"\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\"\n\n config {\n\n enable_private_environment = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-err\"\u003ePRIVATE_IP_STATUS\u003c/span\u003e\u003c/var\u003e\n\n }\n }\n\nReplace the following:\n\n- `ENVIRONMENT_NAME`: the name of your environment.\n- `LOCATION`: the region where the environment is located.\n- `PRIVATE_IP_STATUS`: `true` for Private IP, `false` for Public IP\n\nExample (Private IP): \n\n resource \"google_composer_environment\" \"example\" {\n provider = google-beta\n name = \"example-environment\"\n region = \"us-central1\"\n\n config {\n\n enable_private_environment = true\n\n ... other configuration parameters\n }\n }\n\nConfigure proxy server variables\n--------------------------------\n\n| **Important:** Routing with proxy variables is done on a best-effort basis. **There's no guarantee that every request goes through the proxy** . Instead, we recommend to route traffic by [attaching a VPC network](/composer/docs/composer-3/connect-vpc-network) to your environment and configuring traffic routing rules in this network.\n\nYou can set `http_proxy` and `https_proxy` [environment variables](/composer/docs/composer-3/set-environment-variables)\nin your environment. These standard Linux variables are used by web clients\nthat run in containers of your environment's cluster to route traffic through\nthe specified proxies.\n\nThe `NO_PROXY` variable by default is set to a list of Google domains and\n`localhost` so that they are excluded from proxying:\n`.google.com,.googleapis.com,metadata.google.internal,localhost`. This\nconfiguration makes it possible to create an environment with set `http_proxy`\nand `https_proxy` environment variables in cases when the proxy isn't\nconfigured to handle traffic to Google services.\n\nWhat's next\n-----------\n\n- [Configure VPC Service Controls](/composer/docs/composer-3/configure-vpc-sc)"]]