The service port name can include a suffix in the following syntax:
name: protocol[-suffix]
where the square brackets indicate an optional suffix that must start with a
dash, for example:
kind: Service
metadata:
name: myservice
spec:
ports:
- number: 3306
name: mysql
- number: 80
name: http-web
For metrics to be displayed in the Google Cloud console, the service ports
must be named with one of the following protocols: http, http2, or grpc.
Service ports named with the https protocol are treated astcp, and metrics
aren't displayed for those services.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Naming service ports\n====================\n\nTo be included in Cloud Service Mesh, service ports must be named, and the name must\ninclude the port's protocol, for example: \n\n```\napiVersion: v1\nkind: Service\nmetadata:\n name: ratings\n labels:\n app: ratings\n service: ratings\nspec:\n ports:\n - port: 9080\n name: http\n```\n\nThe service port name can include a suffix in the following syntax:\n`name: `\u003cvar translate=\"no\"\u003eprotocol\u003c/var\u003e`[-`\u003cvar translate=\"no\"\u003esuffix\u003c/var\u003e`]`\nwhere the square brackets indicate an optional suffix that must start with a\ndash, for example: \n\n```\nkind: Service\nmetadata:\n name: myservice\nspec:\n ports:\n - number: 3306\n name: mysql\n - number: 80\n name: http-web\n```\n\nFor metrics to be displayed in the Google Cloud console, the service ports\nmust be named with one of the following protocols: `http`, `http2`, or `grpc`.\nService ports named with the `https` protocol are treated as`tcp`, and metrics\naren't displayed for those services."]]