[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],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."]]