Stay organized with collections
Save and categorize content based on your preferences.
Use an HTTP proxy
This document shows you how to route traffic from the GKE on Azure
through an HTTP/HTTPS proxy. You specify proxy configuration when you create
a cluster.
Overview
GKE on Azure can route outbound internet traffic through a proxy for
the following reasons:
To register clusters with Google Cloud through
Connect
To run the Connect Agent
To download images from Container Registry
Limitations
The httpProxy and httpsProxy fields do not support URLs beginning with
https://. You must use http://. Requests to port 443 use HTTPS.
You must set values for httpProxy, httpsProxy, and noProxy.
A cluster's proxy configuration— the resource group ID and secret
ID— is immutable. You must create a new cluster and node pool to
update these values.
You might need to add additional domains, IPs, or CIDRs to the noProxy
field. We recommend adding your cluster's control planes subnet CIDRs (Pod
address CIDR and Service address CIDR are added by default).
Prerequisites
This section describes the prerequisites you must apply before using a proxy.
Azure Key Vault configuration
GKE on Azure stores proxy configuration information in Azure Key Vault.
To configure a proxy with GKE on Azure, you need to have
permissions to create a secret in a Key Vault. The Key Vault must be accessible
from your cluster's VNet.
Proxy Allowlist
For GKE on Azure to connect to Google Cloud services,
the proxy server must allow traffic to specific Google and Microsoft domains.
Replace GCP_LOCATION with the Google Cloud region in
which your cluster resides. Specify us-west1 or another
supported region.
Subnet Network Security Group requirement
If you're using Network Security Groups (NSGs) to manage traffic to your subnets,
your NSG rules must allow outgoing TCP traffic to following destinations:
AzureCloud: TCP, port 80 and 443
See Azure service tags
for more information about using service tags with NSGs.
Create a proxy configuration file
The proxy configuration is stored in an Azure Key Vault secret as a JSON string.
You can pass this configuration to the az command-line tool as a
file. This section describes how to create that file.
The following table describes the contents of this file.
Field
Description
Examples
Required
httpProxy
A proxy server URL. The value should include a hostname/IP address and
optionally a port, username, and password.
A proxy URL for encrypted, HTTPS traffic. The httpProxy URL will be used if
httpsProxy has an empty value.
"http://10.101.16.31:80"
Yes
noProxy
A comma-separated list of URLs to exclude from proxying. Each value can be
an IP address, a CIDR range, a domain name, or the asterix character (*).
Domains specified with a leading dot (for example, `.google.com`) indicate
that a subdomain is required. A single asterix * ignores all proxy
configuration.
"1.2.3.4,10.0.0.0/16,example.com,.site.com"
Yes
To create the configuration file, create a JSON file that contains values for
httpProxy, noProxy, and optional httpsProxy keys.
PROXY_RESOURCE_GROUP_ID: the resource group that hosts
your cluster
PROXY_SECRET_ID: the ID of the secret that
contains your proxy configuration— for example,
https://VAULT_NAME.vault.azure.net/secrets/SECRET_NAME/SECRET_VERSION
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Use an HTTP proxy\n\nThis document shows you how to route traffic from the GKE on Azure\nthrough an HTTP/HTTPS proxy. You specify proxy configuration when you create\na cluster.\n\nOverview\n\nGKE on Azure can route outbound internet traffic through a proxy for\nthe following reasons:\n\n- To register clusters with Google Cloud through [Connect](/anthos/multicluster-management/connect/overview)\n- To run the Connect Agent\n- To download images from Container Registry\n\nLimitations\n\n- The `httpProxy` and `httpsProxy` fields do not support URLs beginning with `https://`. You must use `http://`. Requests to port 443 use HTTPS.\n- You must set values for `httpProxy`, `httpsProxy`, and `noProxy`.\n- A cluster's proxy configuration--- the resource group ID and secret ID--- is immutable. You must create a new cluster and node pool to update these values.\n- You might need to add additional domains, IPs, or CIDRs to the `noProxy` field. We recommend adding your cluster's control planes subnet CIDRs (Pod address CIDR and Service address CIDR are added by default).\n\nPrerequisites\n\nThis section describes the prerequisites you must apply before using a proxy.\n\nAzure Key Vault configuration\n\nGKE on Azure stores proxy configuration information in Azure Key Vault.\nTo configure a proxy with GKE on Azure, you need to have\npermissions to create a secret in a Key Vault. The Key Vault must be accessible\nfrom your cluster's VNet.\n\nProxy Allowlist\n\nFor GKE on Azure to connect to Google Cloud services,\nthe proxy server must allow traffic to specific Google and Microsoft domains. \n\n .azure.com\n .gcr.io\n cloudresourcemanager.googleapis.com\n container.googleapis.com\n gkeconnect.googleapis.com\n gkehub.googleapis.com\n oauth2.googleapis.com\n securetoken.googleapis.com\n storage.googleapis.com\n sts.googleapis.com\n www.googleapis.com\n servicecontrol.googleapis.com\n logging.googleapis.com\n monitoring.googleapis.com\n opsconfigmonitoring.googleapis.com\n \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nf\"\u003eGCP_LOCATION\u003c/span\u003e\u003c/var\u003e-gkemulticloud.googleapis.com\n\nReplace \u003cvar translate=\"no\"\u003eGCP_LOCATION\u003c/var\u003e with the Google Cloud region in\nwhich your cluster resides. Specify `us-west1` or another\n[supported region](/kubernetes-engine/multi-cloud/docs/azure/reference/supported-regions).\n\nSubnet Network Security Group requirement\n\nIf you're using Network Security Groups (NSGs) to manage traffic to your subnets,\nyour NSG rules must allow outgoing TCP traffic to following destinations:\n\n- AzureCloud: TCP, port 80 and 443\n\nSee [Azure service tags](https://docs.microsoft.com/en-us/azure/virtual-network/service-tags-overview#available-service-tags)\nfor more information about using service tags with NSGs.\n\n\nCreate a proxy configuration file\n\nThe proxy configuration is stored in an Azure Key Vault secret as a JSON string.\nYou can pass this configuration to the `az` command-line tool as a\nfile. This section describes how to create that file.\n\nThe following table describes the contents of this file.\n\n| **Field** | **Description** | **Examples** | **Required** |\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|--------------|\n| `httpProxy` | A proxy server URL. The value should include a hostname/IP address and optionally a port, username, and password. | `\"http://user:password@10.184.37.42:80\"` `\"10.184.37.42\"` | Yes |\n| `httpsProxy` | A proxy URL for encrypted, HTTPS traffic. The httpProxy URL will be used if httpsProxy has an empty value. | `\"http://10.101.16.31:80\"` | Yes |\n| `noProxy` | A comma-separated list of URLs to exclude from proxying. Each value can be an IP address, a CIDR range, a domain name, or the asterix character (\\*). Domains specified with a leading dot (for example, \\`.google.com\\`) indicate that a subdomain is required. A single asterix \\* ignores all proxy configuration. | `\"1.2.3.4,10.0.0.0/16,example.com,.site.com\"` | Yes |\n\n1. To create the configuration file, create a JSON file that contains values for\n `httpProxy`, `noProxy`, and optional `httpsProxy` keys.\n\n ```json\n {\n \"httpProxy\": \"AUTHENTICATION_URL\",\n \"httpsProxy\": \"AUTHENTICATION_URL\",\n \"noProxy\": \"NO_PROXY_ADDRESSES\"\n }\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eAUTHENTICATION_URL\u003c/var\u003e: Encoded URL containing the proxy username and the password\n - \u003cvar translate=\"no\"\u003eNO_PROXY_ADDRESSES\u003c/var\u003e: Comma-separated list of CIDR blocks and URLs--- for example `10.0.0.0/16,http://example.com`\n\n Save the file to use in the following section.\n2. Create a secret with this JSON data as a secret in Azure Key Vault using\n the `az` command-line tool.\n\n az keyvault secret set --name \u003cvar translate=\"no\"\u003eSECRET_NAME\u003c/var\u003e \\\n --vault-name \u003cvar translate=\"no\"\u003eKEY_VAULT_NAME\u003c/var\u003e \\\n --file \u003cvar translate=\"no\"\u003ePROXY_CONFIGURATION_FILE\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eSECRET_NAME\u003c/var\u003e: the name of the new secret\n - \u003cvar translate=\"no\"\u003eKEY_VAULT_NAME\u003c/var\u003e: the name of your Key Vault\n - \u003cvar translate=\"no\"\u003ePROXY_CONFIGURATION_FILE\u003c/var\u003e: the path to your\n proxy configuration file.\n\n The output includes the secret's name and contents. You can now\n reference this secret when you create a cluster.\n\nCreate a cluster that uses a proxy\n\nTo configure GKE on Azure to use an HTTP proxy for outbound\nconnectivity, perform the following steps:\n\nFollow the steps in\n[Create a cluster and node pool](/kubernetes-engine/multi-cloud/docs/azure/how-to/create-cluster)\nand pass the `--proxy-resource-group-id` and `--proxy-secret-id` flags. \n\n gcloud container azure clusters create \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --proxy-resource-group-id=\u003cvar translate=\"no\"\u003ePROXY_RESOURCE_GROUP_ID\u003c/var\u003e \\\n --proxy-secret-id=\u003cvar translate=\"no\"\u003ePROXY_SECRET_ID\u003c/var\u003e\n ...\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: your cluster's name\n- \u003cvar translate=\"no\"\u003ePROXY_RESOURCE_GROUP_ID\u003c/var\u003e: the resource group that hosts your cluster\n- \u003cvar translate=\"no\"\u003ePROXY_SECRET_ID\u003c/var\u003e: the ID of the secret that contains your proxy configuration--- for example, `https://`\u003cvar translate=\"no\"\u003eVAULT_NAME\u003c/var\u003e`.vault.azure.net/secrets/`\u003cvar translate=\"no\"\u003eSECRET_NAME\u003c/var\u003e`/`\u003cvar translate=\"no\"\u003eSECRET_VERSION\u003c/var\u003e\n\nWhat's next\n\n- Read additional information on how to [Create a cluster](/kubernetes-engine/multi-cloud/docs/azure/how-to/create-cluster)."]]