Links

Specify Service Ports

Workloads can be exposed inside a Kubernetes cluster using a Service. A service acts as as a stable way of addressing and load balancing between Pods. The service feature in Humanitec allows to define how a service for the Workload is configured.
To specify the service port configuration:
UI
  • Start on the Workload Details Page and navigate to the service ports section. If you haven't created a Workload yet, please start here.
  • Click the Add (service port) button. This will open a configuration dialog box.
  • Type in a port name. The name must be a valid Humanitec ID.
  • Set a service port. This is the port exposed by the service. Must be in range 1 - 65535.
  • Define a container port (optional). This is 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.
  • Choose a protocol. Must be one of TCP, UDP or SCTP.
  • Click on Save changes.
How to add a service port to your Workload
After successfully configuring a service port you can edit or delete it any time by clicking the three dot menu and selecting the according option.
Find out more about the service ports Workload Profile Feature in our Concepts section: