<p>I have been following <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes" rel="nofollow noreferrer">this guide</a> to create an nginx-ingress which works fine. </p>

<p>Next I want to create a ClusterIssuer object called letsencrypt-staging, and use the Let's Encrypt staging server but get this error.</p>

<pre><code>kubectl create -f staging_issuer.yaml
</code></pre>

<blockquote>
  <p>error: unable to recognize "staging_issuer.yaml": no matches for kind
  "ClusterIssuer" in version "certmanager.k8s.io/v1alpha1"</p>
</blockquote>

<p>I have searched for solutions but can't find anything that works for me or that I can understand. What I found is mostly bug reports.</p>

<p>Here is my yaml file I used to create the ClusterIssuer.</p>

<pre><code>apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
 name: letsencrypt-staging
spec:
 acme:
   # The ACME server URL
   server: https://acme-staging-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-staging
   # Enable the HTTP-01 challenge provider
   http01: {}
</code></pre>

<p>I fixed the problem by running <code>helm del --purge cert-manager</code></p>

<p>and then </p>

<pre><code>helm install --name cert-manager --namespace kube-system stable/cert-manager --set createCustomResource=true
</code></pre>
