Hostname Guidelines
When deploying applications to a Kubernetes cluster, it’s important to choose proper hostnames for your applications and services. This page provides guidelines for choosing hostnames for your Control Center applications and services.
Hostname Necessity
A hostname has two requirements: external access; and service communication. Regarding external access, the hostname acts as the application’s URL and makes it accessible from outside the cluster (e.g., via a browser or API calls). As for service communication, other services or microservices may need to communicate with your Vaadin application via this hostname.
A valid hostname must resolve to an IP address that can be accessed from the browser or external services.
Cloud Environments
If your Kubernetes cluster is hosted on a cloud platform (e.g., Google Kubernetes Engine, Amazon EKS, Azure AKS), you can add a DNS record that points to the cluster’s public IP.
To do this, get the public IP address of your service from your cloud provider’s dashboard. Then add a DNS record (e.g., app.mydomain.com
) pointing to this public IP. For example, you might use:
https://app.mydomain.com
Make sure your firewall rules or security settings allow external traffic to this IP address on the appropriate ports.
Local Development & Testing
If you’re working with a local Kubernetes cluster (e.g., Minikube, Docker Desktop), you can use a local hostname and configure your operating system’s hosts
file to resolve it to the loopback address.
The next two sub-sections provide the steps for configuring the hosts
file depending on your operating system. Be sure to use a consistent hostname throughout your development environment to avoid a misconfiguration.
Whichever system you use, after editing the file, you can access your application locally by using the hostname, http://app.local
.