Skip to content
Docs Try Aspire

Service

Class sealed net8.0
📦 Aspire.Hosting.Kubernetes v13.2.0-preview.1.26170.3
Represents a Kubernetes Service resource in the v1 API version.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class Service
: Aspire.Hosting.Kubernetes.Resources.BaseKubernetesResource
{
// ...
}
The Service class is used to define and configure networking Services within a Kubernetes cluster. It inherits common Kubernetes resource attributes from the BaseKubernetesResource class and provides additional specific configurations through its Spec property, which describes the desired behavior of the Service.