struct Kubernetes::ContainerPort

Overview

ContainerPort represents a network port in a single container.

Included Modules

Defined in:

generated/models/io_k8s_api_core_v1.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

def self.new(pull : ::JSON::PullParser) #

def self.new(*, __pull_for_json_serializable pull : ::JSON::PullParser) #

def self.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) #

Macro Detail

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

Helper macro for defining fields with automatic camelCase conversion


Instance Method Detail

def 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.


def 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.


def host_ip : String | Nil #

What host IP to bind the external port to.


def host_ip=(host_ip : String | Nil) #

What host IP to bind the external port to.


def 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.


def 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.


def 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.


def 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.


def protocol : String | Nil #

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


def protocol=(protocol : String | Nil) #

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