-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.yaml
106 lines (103 loc) · 2.24 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apiVersion: apps/v1
kind: Deployment
metadata:
name: twitter-winner
namespace: demo
spec:
selector:
matchLabels:
app: twitter
template:
metadata:
labels:
app: twitter
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: saiyam911/twitter-winner
env:
- name: API_KEY
valueFrom:
secretKeyRef:
name: apikey
key: value
- name: PORT
value: "8080"
imagePullPolicy: Always
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: twitter-winner
namespace: demo
spec:
selector:
app: twitter
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
type: NodePort
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: twitter-demo
namespace: demo
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: [email protected]
# 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: traefik
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: twitter-winner
namespace: demo
spec:
secretName: demo
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
commonName: twitter-winner.e65f444e-e201-40bd-b0f4-7a18c3601d00.k8s.civo.com
dnsNames:
- twitter-winner.e65f444e-e201-40bd-b0f4-7a18c3601d00.k8s.civo.com
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: traefik
name: twitter-app-ingress
namespace: demo
spec:
rules:
- host: twitter-winner.e65f444e-e201-40bd-b0f4-7a18c3601d00.k8s.civo.com
http:
paths:
- backend:
service:
name: twitter-winner
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- twitter-winner.e65f444e-e201-40bd-b0f4-7a18c3601d00.k8s.civo.com
secretName: demo