Last active
January 12, 2021 18:52
-
-
Save jcmcneal/7547653bebd4f22150d5fd1eda498fbc to your computer and use it in GitHub Desktop.
Be sure to replace CHANGE-ME@example.com with your own email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Derived from https://www.reddit.com/r/kubernetes/comments/g3z5sp/microk8s_with_certmanager_and_letsecncrypt/fxcmq5k?utm_source=share&utm_medium=web2x&context=3 | |
# Setup cert-manager | |
kubectl create namespace cert-manager | |
helm repo add jetstack https://charts.jetstack.io | |
helm repo update | |
helm install cert-manager jetstack/cert-manager \ | |
--namespace cert-manager --version v1.1.0 \ | |
--set installCRDs=true \ | |
--set ingressShim.defaultIssuerName=letsencrypt-production \ | |
--set ingressShim.defaultIssuerKind=ClusterIssuer \ | |
--set ingressShim.defaultIssuerGroup=cert-manager.io | |
# Use letsencrypt | |
kubectl apply -f - <<YAML | |
apiVersion: cert-manager.io/v1 | |
kind: ClusterIssuer | |
metadata: | |
name: letsencrypt-production | |
spec: | |
acme: | |
email: CHANGE-ME@example.com | |
server: https://acme-v02.api.letsencrypt.org/directory | |
privateKeySecretRef: | |
name: letsencrypt-production-issuer-account-key | |
solvers: | |
- selector: {} | |
http01: | |
ingress: | |
class: nginx | |
YAML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment