Questa pagina descrive l'elenco di hostPort riservati in
Google Kubernetes Engine (GKE).
hostPort riservati dal sistema GKE
GKE riserva intervalli hostPort specifici per i propri servizi e processi di sistema interni. Queste prenotazioni sono fondamentali per mantenere la
stabilità e la funzionalità dei cluster GKE. Sebbene
GKE sconsigli generalmente l'utilizzo di hostPort per le applicazioni
utente a causa di potenziali conflitti e rischi per la sicurezza, si basa su di essi
per le operazioni interne.
Scopo di hostPort riservati
Comunicazione del control plane: alcuni componenti GKE, come kubelet e metrics-server, potrebbero utilizzare hostPort specifici per la comunicazione con il control plane o altri servizi interni.
Daemon di sistema: i daemon e gli agent di sistema GKE potrebbero
richiedere l'accesso a porte specifiche sui nodi per il monitoraggio, il logging o
altre attività operative.
Servizi interni: i servizi interni di GKE, responsabili
della gestione del cluster e dei controlli di integrità, potrebbero utilizzare hostPort riservati.
Informazioni sugli intervalli riservati
Sebbene gli intervalli esatti possano variare in base alla versione e alla configurazione di GKE, GKE riserva una parte dello spazio delle porte disponibile. Questi intervalli riservati
in genere non sono documentati per l'utilizzo da parte di utenti esterni, in quanto sono soggetti a modifiche.
È molto importante evitare di utilizzare porte con numeri bassi, in quanto sono comunemente
riservate dai sistemi operativi.
Best practice
Best practice:
Evita l'utilizzo di hostPort: riduci al minimo l'utilizzo di hostPort nei deployment delle applicazioni
per ridurre il rischio di conflitti con le porte riservate di GKE.
Astrazioni del servizio: utilizza i tipi di servizio Kubernetes (NodePort,
LoadBalancer, Ingress) come alternative preferite a hostPort.
Controllo di sicurezza: se hostPort è inevitabile, esamina attentamente e
implementa le regole firewall per limitare l'accesso alle porte esposte.
Considerazioni su Autopilot: quando utilizzi GKE Autopilot,
tieni presente che non puoi specificare hostPort esatti.
Elenco di hostPort riservati
Componente
Porte host riservate
CNI / DPv2
9990, 6942, 9890, 4244, 9965
kubelet
4194, 10248, 10250, 10255
kube-proxy
10249, 10256
node-problem-detector
20256
fluentbit
2020, 2021
stackdriver-metadata-agent
8799
sunrpc (montaggi NFS locali)
665 - 986
Filestore
990
k8s-metadata-proxy / gke-metadata-server
987, 988, 989
node-local-dns
53, 8080, 9253, 9353
gcfsd
11253
Criterio di rete Antrea
10349, 10350, 10351, 10352
network-metering-agent
47082, 47083
configconnector
8888, 48797
gke-spiffe
9889
workload-identity-webhook
9910
Agente delle metriche GKE
8200, 8201, 8202, 8203
Plug-in dispositivo GPU
2112
runsc (gVisor / GKE Sandbox)
9115
containerd
1338
GKE Metrics Collector
11123
netd
10231
Elenco di hostPort riservati specifici per Autopilot
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-04 UTC."],[],[],null,["# Reserved hostPorts\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page describes the list of reserved hostPorts within\nGoogle Kubernetes Engine (GKE).\n| **Note:** Always refer to the latest GKE release notes for any updates or changes to GKE's reserved hostPort ranges. When in doubt, avoid using hostPorts and rely on Kubernetes service abstractions.\n\nGKE System reserved hostPorts\n-----------------------------\n\nGKE reserves specific `hostPort` ranges for its internal system\nprocesses and services. These reservations are crucial for maintaining the\nstability and functionality of GKE clusters. Although\nGKE generally discourages the use of `hostPort` for user\napplications due to potential conflicts and security risks, it relies on them\nfor internal operations.\n| **Warning:** Attempting to use hostPorts within GKE's reserved ranges might result in Pod deployment failures or unexpected cluster behavior. GKE reserves the right to change these ranges without prior notice.\n\n### Purpose of reserved hostPorts\n\n- **Control plane communication**: certain GKE components, such as the kubelet and metrics-server, might use specific hostPorts for communication with the control plane or other internal services.\n- **System daemons**: GKE system daemons and agents might require access to specific ports on the nodes for monitoring, logging, or other operational tasks.\n- **Internal services**: GKE's internal services, responsible for cluster management and health checks, might use reserved hostPorts.\n\n### Understanding reserved ranges\n\nAlthough the exact ranges can vary based on GKE version and\nconfiguration, GKE\nreserves a portion of the available port space. These reserved ranges are\ntypically not documented for external user usage, as they are subject to change.\nIt is very important to avoid using low-numbered ports, as these are commonly\nreserved by operating systems.\n\n### Best practices\n\n**Best practices**:\n\n- **Avoid hostPort usage**: minimize the use of hostPort in your application deployments to reduce the risk of conflicts with GKE's reserved ports.\n- **Service abstractions**: use Kubernetes service types (NodePort, LoadBalancer, Ingress) as preferred alternatives to hostPort.\n- **Security scrutiny**: if hostPort is unavoidable, carefully review and implement firewall rules to restrict access to the exposed ports.\n- **Autopilot considerations**: when you use GKE Autopilot, be aware that you are unable to specify exact hostPorts.\n\n### List of reserved hostPorts\n\n### List of reserved hostPorts that are specific to Autopilot\n\nWhat's next\n-----------\n\n- Read an overview of [networking in\n GKE](/kubernetes-engine/docs/concepts/network-overview).\n- Learn about [Kubernetes Services](/kubernetes-engine/docs/concepts/service).\n- Learn about [exposing\n applications](/kubernetes-engine/docs/how-to/exposing-apps)."]]