Configuring Services and Routes¶
This section shows how the application developer can create new service configurations so that applications can open the Web services to those outside the cluster, as well as how to configure corresponding routes.
Prerequisites¶
Before creating a new service, you need to complete the deployment configuration. For the detailed steps, see Configuring Deployments.
Creating a Service¶
In the EnOS Management Console, navigate to Enterprise Container Platform and select Container > Services.
Click the New Service button and provide details for the following.
Application: Select the application that needs to publish the service.
Environment: Select the service environment, for which dev, alpha, beta, ppe, and prod environments are supported currently.
Cluster: Select the cluster where the application is deployed. Note that the cluster is already pre-configured by the system.
Type: Select the service type, where only ClusterIP is supported currently.
Complete the port configuration for the service by entering the port and target port and selecting the protocol type.
Protocol: The protocol supported by the ports. You can select TCP or UDP.
Port name: Select the port name, You can select http-, tcp- or udp-. Inconsistency with the protocol is allowed.
Port: The port to be used by the internal clients of the cluster to access the service.
Target port: The port on the pod, where the data received from the service port will flow through the kube-proxy to the target port of the backend pod and then to the container.
Enter the description for the service.
Click the OK button to complete the configuration.
Creating a Route¶
Select Container > Routes.
Click the New Route button and provide details for the following.
Application: Select an application that requires the route.
Environment: Select the route environment, for which dev, alpha, beta, ppe, and prod environments are supported currently.
Cluster: Select the cluster where the application is deployed. Note that the cluster is already pre-configured by the system.
Configure the route rules.
Host: Depends on default cluster settings, and cannot be modified.
Route: Enter the path to access the external service.
Service: Select the service you have created.
Port: Select 8080 as the port.
Set the Timeout in seconds for the connection to the upstream servers and add Annotations to customize the behaviour.
Enter the description for the route.
Click the OK button to complete the configuration.
Next Step¶
After the service and route are created, you can clone, edit, and delete them as needed. The specific steps are similar to those for Configuring Deployments.