Skip to content
Docs Try Aspire

ServicePortV1 Properties

Class Properties 6 members
Represents a port configuration for a Kubernetes Service in API version V1.
AppProtocol Section titled AppProtocol string
Gets or sets the application protocol associated with the service port. This property can be used to define custom application layer protocols (e.g., HTTP, HTTPS) for traffic management and service communication.
public string AppProtocol { get; set; }
Gets or sets the name of the service port. This is an optional identifier that can be used to distinguish between ports in cases where there are multiple ports defined. It must be a unique string within the service if specified.
public string Name { get; set; }
NodePort Section titled NodePort nullable int?
Gets or sets the port on the node where the service is exposed. This is used for NodePort services to specify the static port number on which the service is accessible on each selected node. If not set, a port will be automatically assigned from the NodePort range determined by the system.
public int? NodePort { get; set; }
Represents the port number that the service will expose. This value specifies the port on which the service is accessible.
public Int32OrStringV1 Port { get; set; }
Gets or sets the protocol used by the service, such as "TCP" or "UDP".
public string Protocol { get; set; }
Specifies the port on the target container to which traffic should be directed. Typically used in Kubernetes Service definitions to map incoming traffic to the appropriate port of the application running in a pod.
public Int32OrStringV1 TargetPort { get; set; }