ContainerPort

data class ContainerPort(val containerPort: Int, val hostIP: String? = null, val hostPort: Int? = null, val name: String? = null, val protocol: String? = null)

ContainerPort represents a network port in a single container.

Constructors

Link copied to clipboard
constructor(containerPort: Int, hostIP: String? = null, hostPort: Int? = null, name: String? = null, protocol: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.

Link copied to clipboard
val hostIP: String? = null

What host IP to bind the external port to.

Link copied to clipboard
val hostPort: Int? = null

Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.

Link copied to clipboard
val name: String? = null

If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.

Link copied to clipboard
val protocol: String? = null

Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".