O nome da porta do serviço pode incluir um sufixo na seguinte sintaxe: name: protocol[-suffix],
em que os colchetes indicam um sufixo opcional que precisa começar com um
traço, por exemplo:
kind: Service
metadata:
name: myservice
spec:
ports:
- number: 3306
name: mysql
- number: 80
name: http-web
Para que as métricas sejam exibidas no console Google Cloud , as portas de serviço
precisam ser nomeadas com um dos seguintes protocolos: http, http2 ou grpc.
As portas de serviço nomeadas com o protocolo https são tratadas como tcp, e as métricas
não são exibidas para esses serviços.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 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."]]