struct
Kubernetes::ContainerPort
- Kubernetes::ContainerPort
- Struct
- Value
- Object
Overview
ContainerPort represents a network port in a single container.
Included Modules
- JSON::Serializable
- Kubernetes::Serializable
- YAML::Serializable
Defined in:
generated/models/io_k8s_api_core_v1.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .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)
Macro Summary
-
field(name, type = nil, **options, &block)
Helper macro for defining fields with automatic camelCase conversion
Instance Method Summary
-
#container_port : Int32 | Nil
Number of port to expose on the pod's IP address.
-
#container_port=(container_port : Int32 | Nil)
Number of port to expose on the pod's IP address.
-
#host_ip : String | Nil
What host IP to bind the external port to.
-
#host_ip=(host_ip : String | Nil)
What host IP to bind the external port to.
-
#host_port : Int32 | Nil
Number of port to expose on the host.
-
#host_port=(host_port : Int32 | Nil)
Number of port to expose on the host.
-
#name : String | Nil
If specified, this must be an IANA_SVC_NAME and unique within the pod.
-
#name=(name : String | Nil)
If specified, this must be an IANA_SVC_NAME and unique within the pod.
-
#protocol : String | Nil
Protocol for port.
-
#protocol=(protocol : String | Nil)
Protocol for port.
Constructor Detail
Macro Detail
Helper macro for defining fields with automatic camelCase conversion
Instance Method Detail
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
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.
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.
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.
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.
Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".