Last active
May 17, 2020 18:22
-
-
Save jmrobles/89d3cb04970bf29c1cf6c16577e9865f to your computer and use it in GitHub Desktop.
Let's Encrypt
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: kuard | |
namespace: app | |
spec: | |
selector: | |
matchLabels: | |
app: kuard | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: kuard | |
spec: | |
containers: | |
- image: gcr.io/kuar-demo/kuard-amd64:1 | |
imagePullPolicy: Always | |
name: kuard | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kuard | |
namespace: app | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
protocol: TCP | |
selector: | |
app: kuard |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: kuard | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
cert-manager.io/issuer: "letsencrypt-staging" | |
spec: | |
tls: | |
- hosts: | |
- yourdomain.com | |
secretName: quickstart-example-tls | |
rules: | |
- host: yourdomain.com | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: kuard | |
servicePort: 80 |
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
apiVersion: cert-manager.io/v1alpha2 | |
kind: Issuer | |
metadata: | |
name: letsencrypt-prod | |
namespace: app | |
spec: | |
acme: | |
# The ACME server URL | |
server: https://acme-v02.api.letsencrypt.org/directory | |
# Email address used for ACME registration | |
email: your@email.com | |
# Name of a secret used to store the ACME account private key | |
privateKeySecretRef: | |
name: letsencrypt-prod | |
# Enable the HTTP-01 challenge provider | |
solvers: | |
- http01: | |
ingress: | |
class: nginx |
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
apiVersion: cert-manager.io/v1alpha2 | |
kind: Issuer | |
metadata: | |
name: letsencrypt-staging | |
namespace: app | |
spec: | |
acme: | |
# The ACME server URL | |
server: https://acme-staging-v02.api.letsencrypt.org/directory | |
# Email address used for ACME registration | |
email: your@email.com | |
# Name of a secret used to store the ACME account private key | |
privateKeySecretRef: | |
name: letsencrypt-staging | |
# Enable the HTTP-01 challenge provider | |
solvers: | |
- http01: | |
ingress: | |
class: nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment