Der Portname des Diensts kann ein Suffix in der Syntax name: protocol[-suffix] enthalten, wobei mit den eckigen Klammern ein optionales Suffix angegeben wird, das mit einem Bindestrich beginnen muss. Beispiel:
kind: Service
metadata:
name: myservice
spec:
ports:
- number: 3306
name: mysql
- number: 80
name: http-web
Damit die Messwerte in der Google Cloud Console angezeigt werden, müssen die Dienstports eines der folgenden Protokolle im Namen tragen: http, http2 oder grpc.
Dienstports mit dem https-Protokoll im Namen werden als tcp behandelt. Für diese Dienste werden keine Messwerte angezeigt.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-02 (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."]]