CertManagerExtensions
Classstaticnet10.0
Provides extension methods for installing cert-manager into a Kubernetes environment and declaring
ClusterIssuer resources against it. namespace Aspire.Hosting;
public static class CertManagerExtensions{ // ...}7 members
Methods7
Section titled MethodsIResourceBuilder<CertManagerResource> Installs cert-manager into the Kubernetes environment and returns a typed
CertManagerResource that can host issuer resources. IResourceBuilder<CertManagerIssuerResource> Adds a cert-manager
ClusterIssuer to this cert-manager installation. IResourceBuilder<CertManagerIssuerResource> Configures the issuer to use an ACME directory endpoint, such as Let's Encrypt, ZeroSSL, or a private ACME server.
WithAcmeServer(IResourceBuilder<CertManagerIssuerResource>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>) extensionats ignoredIResourceBuilder<CertManagerIssuerResource> Configures the issuer with an ACME directory URL and contact email resolved from parameters at deploy time.
WithExternalAccountBinding(IResourceBuilder<CertManagerIssuerResource>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>) extensionats exportIResourceBuilder<CertManagerIssuerResource> Configures External Account Binding (EAB) with a key identifier and secret HMAC key resolved at deploy time.
IResourceBuilder<CertManagerIssuerResource> 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. WithTls(IResourceBuilder<KubernetesGatewayResource>, IResourceBuilder<CertManagerIssuerResource>) extensionats exportIResourceBuilder<KubernetesGatewayResource> 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.