TIS0601 - Port Name Must Follow the 'protocol'[-suffix]
Format
The port name must follow the 'protocol'[-suffix]
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
-
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: TCPExplanation: 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.
-
Correct the Port Name to Follow Format
Update the port name to follow the required
'protocol'[-suffix]
format, whereprotocol
is a valid protocol such ashttp
,https
,tcp
, etc.apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: example-namespace
spec:
ports:
- port: 80
name: "http-port"
protocol: TCPExplanation: 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.