Skip to content
Docs Try Aspire
Docs Try

CertManagerResource

Class sealed net8.0
📦 Aspire.Hosting.Kubernetes v13.4.0-preview.1.26281.18
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
HelmChartget
Gets the underlying Helm chart resource used to install cert-manager. Use this to layer additional Helm values via WithHelmChartValues or to inspect chart metadata. The chart name and version are fixed at construction time and cannot be changed through this property.
Parentget
Gets the parent Kubernetes environment that hosts cert-manager.
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);