Merge pull request #131458 from BenTheElder/hostnetwork-docs

document hostnetwork <> port implications
This commit is contained in:
Kubernetes Prow Robot
2025-07-14 16:42:23 -07:00
committed by GitHub
8 changed files with 12 additions and 6 deletions

View File

@@ -9361,7 +9361,7 @@
"type": "boolean"
},
"hostNetwork": {
"description": "Host networking requested for this pod. Use the host's network namespace. Default to false.",
"description": "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
"type": "boolean"
},
"hostPID": {

View File

@@ -5591,7 +5591,7 @@
"type": "boolean"
},
"hostNetwork": {
"description": "Host networking requested for this pod. Use the host's network namespace. Default to false.",
"description": "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
"type": "boolean"
},
"hostPID": {

View File

@@ -3819,7 +3819,7 @@
"type": "boolean"
},
"hostNetwork": {
"description": "Host networking requested for this pod. Use the host's network namespace. Default to false.",
"description": "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
"type": "boolean"
},
"hostPID": {

View File

@@ -3011,7 +3011,7 @@
"type": "boolean"
},
"hostNetwork": {
"description": "Host networking requested for this pod. Use the host's network namespace. Default to false.",
"description": "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
"type": "boolean"
},
"hostPID": {

View File

@@ -28704,7 +28704,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA
},
"hostNetwork": {
SchemaProps: spec.SchemaProps{
Description: "Host networking requested for this pod. Use the host's network namespace. Default to false.",
Description: "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
Type: []string{"boolean"},
Format: "",
},

View File

@@ -4270,6 +4270,9 @@ message PodSpec {
optional string nodeName = 10;
// Host networking requested for this pod. Use the host's network namespace.
// When using HostNetwork you should specify ports so the scheduler is aware.
// When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`,
// and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`.
// Default to false.
// +k8s:conversion-gen=false
// +optional

View File

@@ -3981,6 +3981,9 @@ type PodSpec struct {
// +optional
NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"`
// Host networking requested for this pod. Use the host's network namespace.
// When using HostNetwork you should specify ports so the scheduler is aware.
// When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`,
// and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`.
// Default to false.
// +k8s:conversion-gen=false
// +optional

View File

@@ -1824,7 +1824,7 @@ var map_PodSpec = map[string]string{
"serviceAccount": "DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
"automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.",
"nodeName": "NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename",
"hostNetwork": "Host networking requested for this pod. Use the host's network namespace. Default to false.",
"hostNetwork": "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.",
"hostPID": "Use the host's pid namespace. Optional: Default to false.",
"hostIPC": "Use the host's ipc namespace. Optional: Default to false.",
"shareProcessNamespace": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.",