ContainerPortV1
Class sealed net10.0
Represents the configuration for a container port in Kubernetes.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class ContainerPortV1{ // ...} 6 members
Remarks
Section titled Remarks A container port specifies the port mappings and settings used by containers to expose services to the host machine or other containers. This includes the container's port, optional host port, IP bindings, protocol, and an optional name for the port.
Constructors1
Section titled ConstructorsProperties5
Section titled PropertiesContainerPortget; set Gets or sets the port number on the container where the application is running.
HostIpget; setstring Represents the host IP address to which the port is bound.
HostPortget; 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.
Nameget; setstring 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.
Protocolget; setstring Gets or sets the protocol used by the port. Common protocols include "TCP" and "UDP".