This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
forked from upmc-enterprises/kubeadm-aws
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cert-manager for TLS certificates
- Loading branch information
1 parent
74a5a4e
commit 8b38534
Showing
6 changed files
with
160 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
k8s-app: nginx | ||
name: nginx | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 1 | ||
selector: | ||
matchLabels: | ||
k8s-app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: nginx | ||
spec: | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 100 | ||
podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: "k8s-app" | ||
operator: In | ||
values: | ||
- nginx | ||
topologyKey: "kubernetes.io/hostname" | ||
- weight: 90 | ||
podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: "k8s-app" | ||
operator: In | ||
values: | ||
- nginx | ||
topologyKey: "failure-domain.beta.kubernetes.io/zone" | ||
containers: | ||
- name: nginx | ||
image: nginx:1-alpine | ||
ports: | ||
- name: nginx | ||
containerPort: 80 | ||
livenessProbe: | ||
initialDelaySeconds: 5 | ||
httpGet: | ||
path: / | ||
port: nginx | ||
readinessProbe: | ||
initialDelaySeconds: 5 | ||
httpGet: | ||
path: / | ||
port: nginx | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
k8s-app: nginx | ||
name: nginx | ||
spec: | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: nginx | ||
selector: | ||
k8s-app: nginx | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx-test-ingress | ||
annotations: | ||
kubernetes.io/ingress.class: "nginx" | ||
certmanager.k8s.io/issuer: "letsencrypt-prod" | ||
certmanager.k8s.io/acme-challenge-type: http01 | ||
spec: | ||
tls: | ||
- hosts: | ||
- awesomenginx.mydomain.com | ||
secretName: awesomenginx-https | ||
rules: | ||
- host: awesomenginx.mydomain.com | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: nginx | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: certmanager.k8s.io/v1alpha1 | ||
kind: Issuer | ||
metadata: | ||
name: letsencrypt-prod | ||
spec: | ||
acme: | ||
# The ACME server URL | ||
server: https://acme-v02.api.letsencrypt.org/directory | ||
# Email address used for ACME registration | ||
email: ${cert_manager_email} | ||
# Name of a secret used to store the ACME account private key | ||
privateKeySecretRef: | ||
name: letsencrypt-prod | ||
# Enable the HTTP-01 challenge provider | ||
http01: {} |
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
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