# Service Constructors

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [Service](/reference/api/csharp/aspire.hosting.kubernetes/service.md)
- Kind: `Constructors`
- Members: `1`

Represents a Kubernetes Service resource in the v1 API version.

## Service

- Name: `Constructor`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Kubernetes/Resources/ServiceV1.cs#L17-L28)

Represents a Kubernetes Service resource in the v1 API version.

```csharp
public sealed class Service
{
    public Service()
    {
        // ...
    }
}
```

## Remarks

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.
