struct

Kubernetes::ContainerPort

Inherits YAML::Serializable < JSON::Serializable < Kubernetes::Serializable < Struct < Value < Object

ContainerPort represents a network port in a single container.

Constructors

new(pull : ::JSON::PullParser)
new(*, __pull_for_json_serializable pull : ::JSON::PullParser)
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)

Instance methods

container_port

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

Source
container_port=(container_port : Int32 | Nil)

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

Source
host_ip

What host IP to bind the external port to.

Source
host_ip=(host_ip : String | Nil)

What host IP to bind the external port to.

Source
host_port

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.

Source
host_port=(host_port : Int32 | Nil)

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.

Source
name

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.

Source
name=(name : String | Nil)

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.

Source
protocol

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

Source
protocol=(protocol : String | Nil)

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

Source

Macros

field(name, type = nil, **options, &block)

Helper macro for defining fields with automatic camelCase conversion

Source