# IngressSpecV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [IngressSpecV1](/reference/api/csharp/aspire.hosting.kubernetes/ingressspecv1.md)
- Kind: `Properties`
- Members: `4`

Represents the specification of an Ingress resource in Kubernetes (networking.k8s.io/v1).

## DefaultBackend

- Name: `DefaultBackend`
- Modifiers: `get; set`
- Returns: [IngressBackendV1](/reference/api/csharp/aspire.hosting.kubernetes/ingressbackendv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/IngressSpecV1.cs)

Defines the default backend for a Kubernetes ingress resource.

```csharp
public IngressBackendV1 DefaultBackend { get; set; }
```

## Remarks

The default backend is used to handle requests that do not match any of the defined rules in the ingress configuration. It can specify a service or other resource to respond to unmatched traffic.

## IngressClassName

- Name: `IngressClassName`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/IngressSpecV1.cs)

Specifies the IngressClass associated with the Kubernetes Ingress resource.

```csharp
public string IngressClassName { get; set; }
```

## Remarks

The IngressClassName defines which controller will handle and process the associated ingress rules. If this property is not set, the Ingress resource will not be associated with a specific controller.

## Rules

- Name: `Rules`
- Modifiers: `get`
- Returns: [List<IngressRuleV1>](/reference/api/csharp/aspire.hosting.kubernetes/ingressrulev1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/IngressSpecV1.cs#L48)

Gets the collection of ingress rules associated with the Kubernetes ingress resource.

```csharp
public List<IngressRuleV1> Rules { get; }
```

## Remarks

The `Rules` property defines the routing configuration for incoming network traffic, specified as a list of [IngressRuleV1](/reference/api/csharp/aspire.hosting.kubernetes/ingressrulev1.md) objects. Each rule corresponds to a set of conditions under which the traffic is routed to a specific backend.

## Tls

- Name: `Tls`
- Modifiers: `get`
- Returns: [List<IngressTLSV1>](/reference/api/csharp/aspire.hosting.kubernetes/ingresstlsv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/IngressSpecV1.cs#L58)

Represents the TLS configuration for a Kubernetes ingress resource.

```csharp
public List<IngressTLSV1> Tls { get; }
```

## Remarks

This property defines a collection of TLS settings used to secure ingress traffic. Each entry in the collection specifies a TLS certificate and the associated set of hosts.
