Halaman ini menjelaskan daftar hostPort yang dicadangkan dalam Google Kubernetes Engine (GKE).
hostPort yang dicadangkan Sistem GKE
GKE mencadangkan rentang hostPort tertentu untuk proses dan layanan sistem internalnya. Reservasi ini sangat penting untuk menjaga
stabilitas dan fungsi cluster GKE. Meskipun GKE umumnya tidak menganjurkan penggunaan hostPort untuk aplikasi pengguna karena potensi konflik dan risiko keamanan, GKE mengandalkannya untuk operasi internal.
Tujuan hostPort yang dicadangkan
Komunikasi bidang kontrol: komponen GKE tertentu, seperti kubelet dan metrics-server, mungkin menggunakan hostPort tertentu untuk berkomunikasi dengan bidang kontrol atau layanan internal lainnya.
Daemon sistem: Daemon dan agen sistem GKE mungkin memerlukan akses ke port tertentu di node untuk pemantauan, logging, atau tugas operasional lainnya.
Layanan internal: Layanan internal GKE, yang bertanggung jawab atas pengelolaan cluster dan health check, mungkin menggunakan hostPort yang dicadangkan.
Memahami rentang yang dicadangkan
Meskipun rentang persisnya dapat bervariasi berdasarkan versi dan konfigurasi GKE, GKE mencadangkan sebagian ruang port yang tersedia. Rentang yang dicadangkan ini biasanya tidak didokumentasikan untuk penggunaan pengguna eksternal, karena dapat berubah sewaktu-waktu.
Sangat penting untuk menghindari penggunaan port bernomor rendah, karena port ini biasanya dicadangkan oleh sistem operasi.
Praktik terbaik
Praktik terbaik:
Hindari penggunaan hostPort: minimalkan penggunaan hostPort dalam deployment aplikasi Anda untuk mengurangi risiko konflik dengan port yang dicadangkan GKE.
Abstraksi layanan: gunakan jenis layanan Kubernetes (NodePort,
LoadBalancer, Ingress) sebagai alternatif pilihan untuk hostPort.
Pemeriksaan keamanan: jika hostPort tidak dapat dihindari, tinjau dan
terapkan aturan firewall dengan cermat untuk membatasi akses ke port yang terekspos.
Pertimbangan Autopilot: saat Anda menggunakan GKE Autopilot,
perlu diketahui bahwa Anda tidak dapat menentukan hostPort yang tepat.
Daftar hostPort yang dicadangkan
Komponen
Port Host yang Dicadangkan
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 (pemasangan NFS lokal)
665 - 986
Filestore
990
k8s-metadata-proxy / gke-metadata-server
987, 988, 989
node-local-dns
53, 8080, 9253, 9353
gcfsd
11253
Kebijakan jaringan Antrea
10349, 10350, 10351, 10352
network-metering-agent
47082, 47083
configconnector
8888, 48797
gke-spiffe
9889
workload-identity-webhook
9910
GKE Metrics Agent
8200, 8201, 8202, 8203
Plugin Perangkat GPU
2112
runsc (gVisor / GKE Sandbox)
9115
containerd
1338
Pengumpul Metrik GKE
11123
netd
10231
Daftar hostPort yang dicadangkan dan khusus untuk Autopilot
[[["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-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)."]]