https://pulumi.com logo
#typescript
Title
# typescript
f

future-megabyte-14556

02/03/2020, 8:42 AM
I'm trying to setup Auto SSL certs on kubernetes. I've got my nginx-ingress Helm chart installed and working, but am looking for an example that using a cert-manager Helm Chart. Anyone know of any example repos around?
l

limited-rainbow-51650

02/03/2020, 8:48 AM
@future-megabyte-14556 this is a k8s yaml file which I’m converting to Pulumi as I type this.
Copy code
apiVersion: <http://certmanager.k8s.io/v1alpha1|certmanager.k8s.io/v1alpha1>
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod-ci
spec:
  acme:
    # The ACME server URL
    server: <https://acme-v02.api.letsencrypt.org/directory>
    # Email address used for ACME registration
    email: <your email address here>
    # Name of a secret used to store the ACME account private key
    privateKeySecretRef:
      name: letsencrypt-prod-secret
    solvers:
    # An empty 'selector' means that this solver matches all domains
    - selector: {}
      http01:
        ingress:
          class: addon-http-application-routing
Copy code
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    <http://certmanager.k8s.io/cluster-issuer|certmanager.k8s.io/cluster-issuer>: letsencrypt-prod-ci
    <http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>: addon-http-application-routing
spec:
  tls:
    - hosts:
        - demo.my.host.name
      secretName: my-tls
  rules:
    - host: demo.my.host.name
      http:
        paths:
          - path: /
            backend:
              serviceName: backend
              servicePort: 80
f

future-megabyte-14556

02/03/2020, 8:51 AM
oh cool! That should give me a start, would you mind posting the pulumi code once you've finished as well?
l

limited-rainbow-51650

02/03/2020, 8:52 AM
That I can’t unfortunately as it is for contract work under NDA
f

future-megabyte-14556

02/03/2020, 8:52 AM
ahh no problem
@limited-rainbow-51650 did you manage to get this working? I'm still struggling.
okay got it working. had to create a
ClusterIssuer
class that extends
pulumi.CustomResource