Liferay Cloud now supports custom hostname-to-IP mapping for your applications, providing a seamless method to update the
/etc/hosts file of your container pods. This enhancement offers users granular control over networking aspects without compromising infrastructure stability or security.
How it Works
Configurable LCP.json: Liferay Cloud's LCP.json configuration file has been expanded to include the
hostAliasesproperty, which lets users define custom hostname-to-IP mappings.
}Dynamic Kubernetes Deployment: During deployment, Liferay Cloud processes the
hostAliasesconfiguration from LCP.json and appropriately incorporates it into the Kubernetes deployment. Resultantly, every pod arising from this deployment will have its
/etc/hostsfile updated with the custom hostname-to-IP mapping.
For the Customer: This approach allows customers to map internal IPs to specific domain entries, offering flexibility akin to editing an
/etc/hostsentry, but at the Kubernetes pod level.
For Liferay Cloud: The platform gains more adaptability, enabling users to fine-tune their deployed application's networking facets without risking the foundational security or stability.
Test Scenario & Validation
After implementing this feature, when an application is deployed with the
hostAliases property in its LCP.json, users can access the application's container, inspect the
/etc/hosts file, and verify the desired mappings.
By introducing this feature, Liferay Cloud offers an efficient solution to customize hostname-to-IP mappings without the need for other methods like public DNS or manual adjustments, ensuring that your applications run smoothly and effectively within the Liferay Cloud environment.