Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS0601 - Port Name Must Follow the 'protocol'[-suffix] Format

The port name must follow the 'protocol'[-suffix] format.

Recommendation: Ensure Port Names Follow Required Format

To ensure proper traffic routing and functionality with Istio, always name service ports following the 'protocol'[-suffix] format, where protocol is a recognized value such as http, https, tcp, etc.

Examples

  1. Service Port Name Not Following Required Format

    apiVersion: v1
    kind: Service
    metadata:
    name: my-service
    namespace: example-namespace
    spec:
    ports:
    - port: 80
    name: "wrong-port-name"
    protocol: TCP

    Explanation: The port name wrong-port-name does not follow the expected format of 'protocol'[-suffix]. In Istio, the port name must start with the protocol (e.g., http, https, tcp) to enable proper traffic routing and identification.

Recommendation

Rename the service port name to follow the required format for proper traffic flow.

  1. Correct the Port Name to Follow Format

    Update the port name to follow the required 'protocol'[-suffix] format, where protocol is a valid protocol such as http, https, tcp, etc.

    apiVersion: v1
    kind: Service
    metadata:
    name: my-service
    namespace: example-namespace
    spec:
    ports:
    - port: 80
    name: "http-port"
    protocol: TCP

    Explanation: The updated port name http-port follows the format of starting with the protocol (http), which allows Istio to correctly identify and route the traffic based on protocol type. This ensures proper behavior for traffic management and application policies.