Add docs K8s spec

This commit is contained in:
Garrett Mills 2022-11-29 10:30:27 -06:00
parent 37fcaabdef
commit bbafd54dcc
5 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: extollo

View File

@ -0,0 +1,23 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: docs
namespace: extollo
spec:
selector:
matchLabels:
app: docs
template:
metadata:
name: docs
namespace: extollo
labels:
app: docs
spec:
containers:
- name: docs-www
image: registry.millslan.net/extollo/docs
imagePullPolicy: Always
ports:
- containerPort: 80

View File

@ -0,0 +1,25 @@
---
apiVersion: v1
kind: Service
metadata:
name: docs-service
namespace: extollo
spec:
selector:
app: docs
ports:
- port: 80
targetPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: docs-service-lb
namespace: extollo
spec:
type: LoadBalancer
selector:
app: docs
ports:
- port: 80
targetPort: 80

View File

@ -0,0 +1,13 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: docs-tls
namespace: extollo
spec:
secretName: docs-tls-secret
dnsNames:
- 'extollo.garrettmills.dev'
issuerRef:
name: letsencrypt-ca
kind: ClusterIssuer

View File

@ -0,0 +1,25 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: docs-ingress
namespace: extollo
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: 'false'
spec:
tls:
- hosts:
- extollo.garrettmills.dev
secretName: docs-tls-secret
ingressClassName: nginx
rules:
- host: extollo.garrettmills.dev
http:
paths:
- pathType: Prefix
path: '/'
backend:
service:
name: docs-service
port:
number: 80