Skip to content
Docs Try Aspire

ContainerPortV1 Properties

Class Properties 5 members
Represents the configuration for a container port in Kubernetes.
Gets or sets the port number on the container where the application is running.
public Int32OrStringV1? ContainerPort { get; set; }
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.
Represents the host IP address to which the port is bound.
public string HostIp { get; set; }
Gets or sets the port number on the host machine that is mapped to the container's port. This enables external access to the container's service.
public Int32OrStringV1? HostPort { get; set; }
Gets or sets the name of the container port. This property serves as an identifier for the port and can be used for mapping or referencing purposes in the Kubernetes configuration.
public string Name { get; set; }
Gets or sets the protocol used by the port. Common protocols include "TCP" and "UDP".
public string Protocol { get; set; }