# 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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/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.
