Package org.cdk8s.plus25.k8s
Interface ContainerPort
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ContainerPort.Jsii$Proxy
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.483Z") @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 classContainerPort.BuilderA builder forContainerPortstatic classContainerPort.Jsii$ProxyAn implementation forContainerPort
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ContainerPort.Builderbuilder()NumbergetContainerPort()Number of port to expose on the pod's IP address.default StringgetHostIp()What host IP to bind the external port to.default NumbergetHostPort()Number of port to expose on the host.default StringgetName()If specified, this must be an IANA_SVC_NAME and unique within the pod.default StringgetProtocol()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.BuilderofContainerPort
-
-