Share via


ContainerPortV1.ContainerPort Property

Definition

Gets or sets the port number on the container where the application is running.

[YamlDotNet.Serialization.YamlMember(Alias="containerPort")]
public Aspire.Hosting.Kubernetes.Resources.Int32OrStringV1? ContainerPort { get; set; }
[<YamlDotNet.Serialization.YamlMember(Alias="containerPort")>]
member this.ContainerPort : Aspire.Hosting.Kubernetes.Resources.Int32OrStringV1 with get, set
Public Property ContainerPort As Int32OrStringV1

Property Value

Attributes
YamlDotNet.Serialization.YamlMemberAttribute

Remarks

This property specifies the port inside the container to which the external traffic or internal service communication is directed. It is required to define this property for the proper routing of network traffic within a containerized application.

Applies to