TIS0602 - Port appProtocol Must Follow the 'protocol'[-suffix] Format
The port appProtocol must follow the 'protocol'[-suffix] format.
appProtocol Follows Required FormatTo ensure proper traffic routing and functionality within Istio, always set the appProtocol for service ports following the 'protocol'[-suffix] format, where protocol is a recognized value such as http, https, tcp, etc.
Examples
-
Service Port
appProtocolNot Following Required FormatapiVersion: v1
kind: Service
metadata:
name: my-service
namespace: example-namespace
spec:
ports:
- port: 80
name: "http-port"
appProtocol: "invalid-protocol-name"Explanation: The
appProtocolvalueinvalid-protocol-namedoes not follow the expected format of'protocol'[-suffix]. TheappProtocolfield should start with a valid protocol, such ashttp,https, ortcp, to enable proper traffic management by Istio.
Recommendation
Rename the service port appProtocol to follow the required format for proper traffic flow.
-
Correct the
appProtocolValue to Follow FormatUpdate the
appProtocolto follow the required'protocol'[-suffix]format, whereprotocolis a valid protocol type.apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: example-namespace
spec:
ports:
- port: 80
name: "http-port"
appProtocol: "http"Explanation: The updated
appProtocolvaluehttpfollows the correct format, allowing Istio to correctly handle and route traffic based on the protocol type, ensuring the expected behavior for application policies.