Access Application
There are multiple ways to do this, for testing, such as Port Forward and Node Port. for production, such as LoadBalancer and via cluster gateway. This section focus on the production environment.
This way is only suitable for the cloud environment, such as Aliyun, AWS, and Azure.
For the webservice component, you only need to set the to LoadBalancer
, it means this component will generate a Kubernetes Service with LoadBalancer type. After deployment, you could get the service endpoints.
For Example:
For other components, similarly, only need to generate the Kubernetes Service with LoadBalancer type.
This way required installed the ingress controller in the cluster.
Users could bound the gateway
trait for the component to generate the Ingress. for example:
traits:
- type: gateway
properties:
http:
"/": 8000
"/manage": 8090
In VelaUX, you can click the button and select the gateway
trait type. refer to follow configuration:
This way required installed the traefik addon firstly.
Get more info about this addon, refer to
This addon provides three traits, including http-route, and tcp-route.
For HTTP, you can click the Add Trait
button and select the http-route
trait type. refer to follow configuration:
traits:
- type: http-route
properties:
domains:
- testsvc.example.com
- port: 80
gatewayName: traefik-gateway
For HTTPS, you must create the TLS certificate firstly. In VelaUX, open the Integrations page, there is a TLS Certificate
type. Click the New button, You need to provide the certificate public and private keys and encoded the content by base64.
This will generate the secret and distribute to managed clusters with the application.
Then open the application configuration page and click the Add Trait
button and select the https-route
trait type. refer to follow configuration:
The secret name is the same as the name of the certificate configuration.
TCP
This way is suitable for the service with the stream protocol, reusing the same public IP address.
traits:
- type: https-route
properties:
rules:
- gatewayPort: 16379