Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.Kubernetes

Official
📦 Aspire.Hosting.Kubernetesv13.6.5-preview.1.26559.7
Import pathapphost/modules/aspire
62Functions
15Types

Handles

Enums

Functions

CertManagerIssuerResource

methodWithAcmeServerbuilder
Configures the issuer to use a custom ACME directory endpoint (e.g., a private ACME server such as ZeroSSL or step-ca).
WithAcmeServer(serverUrl string, email string) CertManagerIssuerResource
methodWithAcmeServerParambuilder
Configures the issuer to use a custom ACME directory endpoint with a parameterized email.
WithAcmeServerParam(serverUrl string, email ParameterResource) CertManagerIssuerResource
methodWithHttp01Solverbuilder
Adds an HTTP-01 ACME challenge solver to the issuer. cert-manager will satisfy the challenge by provisioning a temporary HTTP route at /.well-known/acme-challenge/{token} on the same hostname being validated. This requires the hostname to be publicly reachable on port 80.
WithHttp01Solver() CertManagerIssuerResource
methodWithLetsEncryptProductionbuilder
Configures the issuer to use the Let's Encrypt production ACME endpoint.
WithLetsEncryptProduction(email string) CertManagerIssuerResource
methodWithLetsEncryptProductionParambuilder
Configures the issuer to use the Let's Encrypt production ACME endpoint, with the contact email supplied via a parameter resolved at deploy time.
WithLetsEncryptProductionParam(email ParameterResource) CertManagerIssuerResource
methodWithLetsEncryptStagingbuilder
Configures the issuer to use the Let's Encrypt staging ACME endpoint. Certificates issued from staging are not trusted by browsers, but the endpoint has much higher rate limits, making it the right choice for development and CI workflows.
WithLetsEncryptStaging(email string) CertManagerIssuerResource
methodWithLetsEncryptStagingParambuilder
Configures the issuer to use the Let's Encrypt staging ACME endpoint, with the contact email supplied via a parameter resolved at deploy time.
WithLetsEncryptStagingParam(email ParameterResource) CertManagerIssuerResource

KubernetesEnvironmentResource

methodAddCertManagerbuilder
Installs cert-manager into a Kubernetes environment
AddCertManager(name string, options ...*AddCertManagerOptions) CertManagerResource
methodAddGatewaybuilder
Adds a Kubernetes Gateway API Gateway resource to the application model as a child of the specified Kubernetes environment. The gateway generates a gateway.networking.k8s.io/v1 Gateway resource and one or more HTTPRoute resources in the Helm chart output at publish time.
AddGateway(name string) KubernetesGatewayResource
methodAddHelmChartbuilder
Adds an external Helm chart to be installed in the Kubernetes environment. The chart is installed via helm upgrade --install as a pipeline step after the main application Helm chart is deployed.
AddHelmChart(name string, chartReference string, chartVersion string) KubernetesHelmChartResource
methodAddIngressbuilder
Adds a Kubernetes Ingress resource to the application model as a child of the specified Kubernetes environment. The ingress generates a networking.k8s.io/v1 Ingress resource in the Helm chart output at publish time.
AddIngress(name string) KubernetesIngressResource
methodAddNodePoolbuilder
Adds a named node pool to the Kubernetes environment.
AddNodePool(name string) KubernetesNodePoolResource
methodAddPersistentVolumebuilder
Adds a Kubernetes PersistentVolumeClaim resource
AddPersistentVolume(name string) KubernetesPersistentVolumeResource
methodConfigureDashboardbuilder
Configures the dashboard properties for this Kubernetes environment.
ConfigureDashboard(configure func(obj KubernetesAspireDashboardResource)) KubernetesEnvironmentResource
methodWithDashboardbuilder
Enables the Aspire dashboard for telemetry visualization in this Kubernetes environment.
WithDashboard(options ...*WithDashboardOptions) KubernetesEnvironmentResource
methodWithHelmbuilder
Configures the Kubernetes environment to deploy using Helm charts.
WithHelm(options ...*WithHelmOptions) KubernetesEnvironmentResource
methodWithPropertiesbuilder
Allows setting the properties of a Kubernetes environment resource.
WithProperties(configure func(obj KubernetesEnvironmentResource)) KubernetesEnvironmentResource

KubernetesGatewayResource

methodWithGatewayAnnotationbuilder
Adds a Kubernetes metadata annotation to the generated Gateway resource.
WithGatewayAnnotation(key string, value string) KubernetesGatewayResource
methodWithGatewayAnnotationParambuilder
Adds a Kubernetes metadata annotation with a parameter value that will be resolved at deploy time.
WithGatewayAnnotationParam(key string, value ParameterResource) KubernetesGatewayResource
methodWithGatewayClassbuilder
Sets the GatewayClass name that selects which controller implementation handles this gateway.
WithGatewayClass(className string) KubernetesGatewayResource
methodWithGatewayClassParambuilder
Sets the GatewayClass name using a parameter that will be resolved at deploy time.
WithGatewayClassParam(className ParameterResource) KubernetesGatewayResource
methodWithGatewayHostnameParambuilder
Adds a hostname using a parameter that will be resolved at deploy time.
WithGatewayHostnameParam(hostname ParameterResource) KubernetesGatewayResource
methodWithGatewayHostRoutebuilder
Adds a host-and-path-based routing rule to the gateway. The rule matches traffic for the specified host and path, routing it to the given endpoint's backing Kubernetes service. This generates an HTTPRoute resource with a hostnames filter.
WithGatewayHostRoute(host string, path string, endpoint EndpointReference, options ...*WithGatewayHostRouteOptions) KubernetesGatewayResource
methodWithGatewayPathRoutebuilder
Adds a path-based routing rule to the gateway. The rule matches each hostname configured with WithHostname, or all hosts when no hostname is configured, and routes matching traffic to the endpoint's backing Kubernetes service. This generates an HTTPRoute resource attached to the Gateway.
WithGatewayPathRoute(path string, endpoint EndpointReference, options ...*WithGatewayPathRouteOptions) KubernetesGatewayResource
methodWithGatewayTlsAutobuilder
Configures TLS termination with an auto-generated secret name derived from the gateway name.
WithGatewayTlsAuto() KubernetesGatewayResource
methodWithGatewayTlsIssuerbuilder
Adds an HTTPS listener to the gateway and wires it to the supplied cert-manager ClusterIssuer. This adds the cert-manager.io/cluster-issuer annotation to the generated Gateway resource, causing cert-manager to provision and renew a certificate for each gateway listener hostname.
WithGatewayTlsIssuer(issuer CertManagerIssuerResource) KubernetesGatewayResource
methodWithGatewayTlsParambuilder
Configures TLS termination using a parameter for the secret name.
WithGatewayTlsParam(secretName ParameterResource) KubernetesGatewayResource
methodWithHostnamebuilder
Adds a hostname that this gateway's routes match. Multiple hostnames can be added by calling this method repeatedly. Routes without an explicit host apply to each configured hostname. Hostnames are used as hostnames in generated HTTPRoute resources and as HTTPS listener hostnames when TLS is configured.
WithHostname(hostname string) KubernetesGatewayResource
methodWithTlsbuilder
Configures TLS on a Kubernetes Gateway listener
WithTls(secretName string) KubernetesGatewayResource

KubernetesIngressResource

methodWithDefaultBackendbuilder
Sets the default backend for the ingress. The default backend handles requests that do not match any of the defined routing rules.
WithDefaultBackend(endpoint EndpointReference) KubernetesIngressResource
methodWithHostnamebuilder
Adds a hostname that this ingress matches. Multiple hostnames can be added by calling this method repeatedly. Path rules without an explicit host apply to each configured hostname. If no hostnames are configured, those rules match all hosts.
WithHostname(hostname string) KubernetesIngressResource
methodWithIngressAnnotationbuilder
Adds a Kubernetes metadata annotation to the generated Ingress resource. These are key-value pairs in the metadata.annotations field of the K8S Ingress, commonly used to configure ingress controller-specific behavior.
WithIngressAnnotation(key string, value string) KubernetesIngressResource
methodWithIngressAnnotationParambuilder
Adds a Kubernetes metadata annotation with a parameter value that will be resolved at deploy time.
WithIngressAnnotationParam(key string, value ParameterResource) KubernetesIngressResource
methodWithIngressClassbuilder
Sets the Kubernetes ingress class name that selects which ingress controller handles this ingress resource.
WithIngressClass(className string) KubernetesIngressResource
methodWithIngressClassParambuilder
Sets the Kubernetes ingress class name using a parameter that will be resolved at deploy time.
WithIngressClassParam(className ParameterResource) KubernetesIngressResource
methodWithIngressHostAndPathbuilder
Adds a host-scoped path rule to the ingress. The rule matches traffic for the specified host and path, forwarding it to the given endpoint's backing Kubernetes service.
WithIngressHostAndPath(host string, path string, endpoint EndpointReference, options ...*WithIngressHostAndPathOptions) KubernetesIngressResource
methodWithIngressHostnameParambuilder
Adds a hostname using a parameter that will be resolved at deploy time.
WithIngressHostnameParam(hostname ParameterResource) KubernetesIngressResource
methodWithIngressPathbuilder
Adds a path-based rule to the ingress. The rule matches each hostname configured with WithHostname, or all hosts when no hostname is configured, and forwards matching traffic to the endpoint's backing Kubernetes service.
WithIngressPath(path string, endpoint EndpointReference, options ...*WithIngressPathOptions) KubernetesIngressResource
methodWithIngressTlsAutobuilder
Configures TLS termination with an auto-generated secret name derived from the ingress name.
WithIngressTlsAuto() KubernetesIngressResource
methodWithIngressTlsParambuilder
Configures TLS termination using a parameter for the secret name.
WithIngressTlsParam(secretName ParameterResource) KubernetesIngressResource
methodWithTlsbuilder
Configures TLS for a Kubernetes Ingress using a K8S secret
WithTls(secretName string) KubernetesIngressResource