ContainerPort class
ContainerPort represents a network port in a single container.
Constructors
- ContainerPort({required int containerPort, String? hostIP, int? hostPort, String? name, String? protocol})
-
Default constructor.
const
-
ContainerPort.fromJson(Map<
String, dynamic> json) -
Creates a ContainerPort from JSON data.
factory
Properties
- containerPort → int
-
Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostIP → String?
-
What host IP to bind the external port to.
final
- hostPort → int?
-
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.
final
- name → String?
-
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.
final
- protocol → String?
-
Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Converts a ContainerPort instance to JSON data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited