I'm trying to setup Auto SSL certs on kubernetes. ...
# typescript
f
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
@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
oh cool! That should give me a start, would you mind posting the pulumi code once you've finished as well?
l
That I can’t unfortunately as it is for contract work under NDA
f
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