Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Zertifizierungsstellenverbindung über einen Proxy konfigurieren
In diesem Leitfaden wird beschrieben, wie Sie die Verbindung zur Zertifizierungsstelle über einen Proxy konfigurieren, wenn keine direkte Verbindung von den über Sidecars bereitgestellten Arbeitslasten verfügbar ist (z. B. aufgrund von Firewalls oder anderen einschränkenden Funktionen).
Diese Konfiguration gilt nur für Cloud Service Mesh-Installationen, die den Certificate Authority Service verwenden.
Bei einer typischen Cloud Service Mesh-Installation innerhalb eines Clusters werden Sidecars in Anwendungs-Pods bereitgestellt, in denen eine direkte Verbindung zu CA-Diensten (z. B. meshca.googleapis.com und privateca.googleapis.com) verfügbar ist. In Szenarien, in denen keine direkte Verbindung verfügbar ist, müssen Sie einen expliziten CONNECT-basierten HTTPS-Proxy konfigurieren.
Vorbereitung
Bevor Sie die CA-Verbindung über einen Proxy konfigurieren, müssen folgende Voraussetzungen erfüllt sein:
Es wurde eine Netzwerkverbindung von allen Pods, in die Sidecars eingeschleust wurden, zum HTTPS-Proxy hergestellt.
Dem bereitgestellten HTTPS-Proxy Zugriff auf alle Google Cloud -Dienste gewährt.
CA_PLUGIN_PROXY_URL ist die Konfiguration, die von Sidecars verwendet wird, um einen CONNECT-Handshake mit dem Proxy herzustellen, der dann den gesamten Traffic an den entsprechenden Endpunkt weiterleitet.
proxy-service ist im Namespace proxy-ns bereitgestellt und wartet auf CONNECT-Handshakes am Port proxy-port. Das Format dieser Umgebungsvariablen ähnelt dem der Standardumgebungsvariablen HTTPS_PROXY.
Nachdem die Cloud Service Mesh-Steuerungsebene installiert wurde, wenden Sie die entsprechende ProxyConfig-Kopienressource (in Schritt 1 konfiguriert) auf den Cluster an, bevor Sie Arbeitslasten in Namespaces mit Cloud Service Mesh-Label neu starten, damit die Konfiguration korrekt in die Sidecars eingefügt wird. Diese Konfiguration ist erforderlich, damit Sidecars signierte Arbeitslastzertifikate von der Zertifizierungsstelle erhalten. So wird sichergestellt, dass der von Sidecars bereitgestellte Pod gestartet werden kann.
[[["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-09-02 (UTC)."],[],[],null,["Configure Certificate Authority connectivity through a proxy\n\nThis guide explains how to configure certificate authority (CA) connectivity\nthrough a proxy when direct connectivity from the sidecar-injected workloads is\nnot available (for example, due to firewalls or other restrictive features).\nThis configuration is only applicable for Cloud Service Mesh installations that use\n[Certificate Authority Service](../install-anthos-service-mesh#install_ca_service).\n| **Warning:** This guide only ensures CA connectivity through a proxy. However, note that Telemetry and Observability features (including metrics explorer, Cloud Service Mesh UI) **do not work** when workloads are behind a proxy.\n\nIn a typical in-cluster Cloud Service Mesh installation, you deploy sidecars in\napplication pods where direct connectivity to CA services (such as\n`meshca.googleapis.com` and `privateca.googleapis.com`) is available. In\nscenarios where a direct connection is not available, you must configure an\nexplicit `CONNECT`-based HTTPS proxy.\n\nPrerequisites\n\nBefore configuring CA connectivity through a proxy, ensure you have:\n\n- Established network connectivity from all sidecar injected pods to the HTTPS proxy.\n- Granted access for the deployed HTTPS proxy to all Google Cloud services.\n\nConfigure a ProxyConfig custom resource\n\n1. Configure an\n [Istio ProxyConfig custom resource (CR)](https://istio.io/latest/docs/reference/config/networking/proxy-config/)\n to inject into the sidecar proxy to point to the HTTPS proxy. For example:\n\n apiVersion: networking.istio.io/v1beta1\n kind: ProxyConfig\n metadata:\n labels:\n istio.io/rev: \u003cistio-rev\u003e # To target proxies mapped to a specific control plane if needed.\n name: test-proxy-inject\n namespace: istio-system # To ensure side-cars injected into all namespaces process this CR\n spec:\n environmentVariables:\n CA_PLUGIN_PROXY_URL: http://\u003cproxy-service\u003e.\u003cproxy-ns\u003e:\u003cproxy-port\u003e\n\n where:\n - `CA_PLUGIN_PROXY_URL` is the configuration consumed by sidecars to establish a `CONNECT` handshake with the proxy which then forwards all CA-destined traffic to the relevant endpoint.\n - `proxy-service` is deployed in the `proxy-ns` namespace and listening for `CONNECT` handshakes on `proxy-port` port. The format of this environment variable is similar to the standard `HTTPS_PROXY` environment variable.\n2. Once the Cloud Service Mesh control plane has been installed, apply the\n appropriate `ProxyConfig` CR (configured in step 1) on the cluster **before**\n restarting workloads in Cloud Service Mesh-labeled namespaces to ensure that the\n configuration is correctly injected into the sidecars. This configuration is\n required for sidecars to get signed workload certificates from the CA, which\n ensures that the sidecar injected pod can start up."]]