kubernetes config

This commit is contained in:
Jon
2022-02-27 02:11:20 +00:00
parent d80b3a2b46
commit 342271f4b3
8 changed files with 74 additions and 0 deletions

3
Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM nginx
EXPOSE 80
COPY _site/ /usr/share/nginx/html

12
certificate.yaml Normal file
View File

@@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1alpha3
kind: Certificate
metadata:
name: site
spec:
dnsNames:
- site.endofeternity.ca
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
name: letsencrypt-prod
secretName: site-tls-certificate

24
deployment.yaml Normal file
View File

@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: site
labels:
app: site
spec:
replicas: 1
selector:
matchLabels:
app: site
template:
metadata:
labels:
app: site
spec:
containers:
- name: site
image: docker.endofeternity.ca/site:latest
ports:
- containerPort: 80
name: site
protocol: TCP

23
ingress.yaml Normal file
View File

@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: site
annotations:
kubernetes.io/ingress.class: nginx
certmanager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- site.endofeternity.ca
secretName: site-tls-certificate
rules:
- host: site.endofeternity.ca
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: site
port:
number: 80

12
service.yaml Normal file
View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: site
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
selector:
app: site