Links

service

Reference for humanitec/service Workload Profile Feature
The service feature defines how a service for the workload is configured.

Description

The top level of the service feature only contains the property ports.
The ports property is a Map or port objects. The Key must be a valid Humanitec ID.
The port object has the following properties:
Property
Type
Description
service_port
Integer
The port exposed by the service. Must be in range 1 - 65535
container_port
Integer
The port a container in the Pod is listening on. Traffic will be mapped from service_port to container_port. If not specified, no mapping will occur. Must be in range 1 - 65535.
protocol
String
Must be one of TCP, UDP or SCTP.

Example

This example shows an service configured with 2 port, one exposes port 8080 and maps to port 3001 on the container. The other listens on 90245 expecting a UDP connection.
{
"www": {
"service_port": 8080,
"container_port": 3001
},
"stream": {
"service_port": 90245,
"protocol": "UDP"
}
}