Skip to content

Instantly share code, notes, and snippets.

@malagant
Created September 2, 2020 10:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malagant/a1fc2906b60f19b3d7934625d77e898a to your computer and use it in GitHub Desktop.
Save malagant/a1fc2906b60f19b3d7934625d77e898a to your computer and use it in GitHub Desktop.
Setup cert-manager for microk8s
microk8s enable helm3 ingress
microk8s kubectl create namespace cert-manager
microk8s helm3 repo add jetstack https://charts.jetstack.io
microk8s helm3 repo update
microk8s helm3 install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--set installCRDs=true \
--set ingressShim.defaultIssuerName=letsencrypt-production \
--set ingressShim.defaultIssuerKind=ClusterIssuer \
--set ingressShim.defaultIssuerGroup=cert-manager.io
microk8s kubectl apply -f - <<YAML
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-production
spec:
acme:
email: CHANGEME@example.com
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-production-issuer-account-key
solvers:
- selector: {}
http01:
ingress:
class: nginx
YAML
@poggdogg
Copy link

error: unable to recognize "STDIN": no matches for kind "ClusterIssuer" in version "cert-manager.io/v1alpha2"
Works without the Alpha2 as just v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment