Watch Aspire live streamsDocsTry Aspire

CertManagerResource

Classsealednet10.0
📦 Aspire.Hosting.Kubernetes v13.6.0-preview.1.26478.8
Represents a cert-manager installation on a Kubernetes environment.
namespace Aspire.Hosting.Kubernetes;
public sealed class CertManagerResource
: Aspire.Hosting.ApplicationModel.Resource,
Aspire.Hosting.ApplicationModel.IResource,
Aspire.Hosting.ApplicationModel.IResourceWithParent,
Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.Kubernetes.KubernetesEnvironmentResource>
{
// ...
}
ResourceIResourceIResourceWithParentIResourceWithParent<KubernetesEnvironmentResource>

cert-manager is a Kubernetes add-on that provisions and renews X.509 certificates from sources such as Let's Encrypt. Aspire models cert-manager as a typed resource so that issuer resources ( CertManagerIssuerResource) can be parented to it and gateways/ingresses can reference issuers in a strongly-typed way via WithTls(issuer).

Under the covers, CertManagerExtensions.AddCertManager installs cert-manager using a KubernetesHelmChartResource pointed at the upstream oci://quay.io/jetstack/charts/cert-manager chart, with CRDs and Gateway API support enabled. The chart resource is registered in the model under "{name}-chart" (so the cert-manager wrapper itself can keep the natural "{name}" identifier) and is exposed via CertManagerResource.HelmChart for advanced configuration.

View all constructors
View all properties
var aks = builder.AddAzureKubernetesEnvironment("aks");
var certManager = aks.AddCertManager("cert-manager");
var letsencrypt = certManager.AddIssuer("letsencrypt-prod")
.WithLetsEncryptProduction("ops@contoso.com")
.WithHttp01Solver();
aks.AddGateway("gw")
.WithRoute("/api", api.GetEndpoint("http"))
.WithTls(letsencrypt);