Configure virtual hosts Stay organized with collections Save and categorize content based on your preferences.
This topic discusses thevirtualhosts configuration property. Virtual hosts allow Apigee hybrid to handle API requests to hostaliases associated with an environment group. For more information, seeRouting and base paths in theAbout environments and environment groups topic.
...virtualhosts: - name: my-env-group sslCertPath: ./certs/fullchain.pem sslKeyPath: ./certs/privkey.key...
When an API proxy call comes, it is routed to the host alias(es) of the environment group where the API proxy is deployed.
For instructions on how to applyvirtualhosts to the cluster, seeApplying virtualhosts changes. For information about configuring TLS, seeConfiguring TLS and mTLS on the Istio ingress.
Adding multiple virtual hosts
Thevirtualhosts[] property is an array, and therefore you can create more than one....virtualhosts: - name: my-env-group-1 sslCertPath: ./certs/fullchain1.pem sslKeyPath: ./certs/privkey1.key - name: my-env-group-2 sslCertPath: ./certs/fullchain2.pem sslKeyPath: ./certs/privkey2.key...
For information about configuring TLS, seeConfiguring TLS and mTLS on the Istio ingress.
Applyingvirtualhosts changes
If you only add or change thevirtualhosts property, apply the changes with theapigee-virtualhost chart and the name of the environment group to which you are applying the changes:
helm upgrade$ENV_GROUP apigee-virtualhost/ \ --namespaceapigee \ --atomic \ --set envgroup=$ENV_GROUP \ -fOVERRIDES_FILE.yaml
Error: UPGRADE FAILED: "ENV_GROUP" has no deployed releases, replaceupgrade withinstall and try the command again.If, for example, you changevirtualhosts andenv, then you must apply the change withhelm upgrade without using theENV_GROUP apigee-virtualhost/flag to update the cluster. For example:
Run
helm upgrade$ENV_NAME apigee-env/ \ --namespaceapigee \ --atomic \ --set env=$ENV_NAME \ -fOVERRIDES_FILE.yaml
Error: UPGRADE FAILED: "ENV_NAME" has no deployed releases, replaceupgrade withinstall and try the command again.TLS keys and certificates
Thevirtualhost property requires a TLS key and certificate. The key/cert are used to provide secure communication with the ingress gateway and must be compatible with the host aliases used in the specified environment group.
It is up to you how you generate proper TLS certificate/key pairs for your hybrid configuration. The following topics are provided as samples only, intended primarily for trying out or testing a new hybrid installation if it isn't feasible to obtain TLS credentials in another way:
- SeeObtain TLS credentials for a set of sample steps for creating an authorized TLS certificate/key pair.
- You can use a self-signed certificate/key pair(s) for testing purposes only. SeeGenerate self-signed TLS credentials.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.