Nama port layanan dapat menyertakan akhiran dalam sintaksis berikut:
name: protocol[-suffix]
dengan tanda kurung siku menunjukkan akhiran opsional yang harus dimulai dengan
tanda hubung, misalnya:
kind: Service
metadata:
name: myservice
spec:
ports:
- number: 3306
name: mysql
- number: 80
name: http-web
Agar metrik ditampilkan di konsol Google Cloud , port layanan
harus diberi nama dengan salah satu protokol berikut: http, http2, atau grpc.
Port layanan yang diberi nama dengan protokol https diperlakukan sebagaitcp, dan metrik
tidak ditampilkan untuk layanan tersebut.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 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."]]