Package org.cdk8s.plus24.k8s
Interface ContainerPort
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ContainerPort.Jsii$Proxy
@Generated(value="jsii-pacmak/1.69.0 (build f656c31)", date="2022-10-05T02:57:36.364Z") @Stability(Stable) public interface ContainerPort extends software.amazon.jsii.JsiiSerializable
ContainerPort represents a network port in a single container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ContainerPort.Builder
A builder forContainerPort
static class
ContainerPort.Jsii$Proxy
An implementation forContainerPort
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ContainerPort.Builder
builder()
Number
getContainerPort()
Number of port to expose on the pod's IP address.default String
getHostIp()
What host IP to bind the external port to.default Number
getHostPort()
Number of port to expose on the host.default String
getName()
If specified, this must be an IANA_SVC_NAME and unique within the pod.default String
getProtocol()
Protocol for port.
-
-
-
Method Detail
-
getContainerPort
@Stability(Stable) @NotNull Number getContainerPort()
Number of port to expose on the pod's IP address.This must be a valid port number, 0 < x < 65536.
-
getHostIp
@Stability(Stable) @Nullable default String getHostIp()
What host IP to bind the external port to.
-
getHostPort
@Stability(Stable) @Nullable default Number getHostPort()
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.
-
getName
@Stability(Stable) @Nullable default String getName()
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.
-
getProtocol
@Stability(Stable) @Nullable default String getProtocol()
Protocol for port.Must be UDP, TCP, or SCTP. Defaults to "TCP".
Default: TCP".
-
builder
@Stability(Stable) static ContainerPort.Builder builder()
- Returns:
- a
ContainerPort.Builder
ofContainerPort
-
-