carr.pub live: cert-manager, hello site, DDNS; monitoring + loadtest committed
This commit is contained in:
88
manifests/web/hello-carr-pub.yaml
Normal file
88
manifests/web/hello-carr-pub.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: web
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: hello-index
|
||||
namespace: web
|
||||
data:
|
||||
index.html: |
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head><meta charset="utf-8"><title>carr.pub</title>
|
||||
<style>
|
||||
body { font-family: system-ui, sans-serif; background: #111; color: #eee;
|
||||
display: grid; place-items: center; height: 100vh; margin: 0; }
|
||||
h1 { font-size: 3rem; margin: 0 0 .5rem; }
|
||||
p { color: #888; font-size: 1.2rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align:center">
|
||||
<h1>carr.pub</h1>
|
||||
<p>Served by the planck cluster — 20 Raspberry Pis that finally earn their rack space.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hello-web
|
||||
namespace: web
|
||||
spec:
|
||||
replicas: 6
|
||||
selector:
|
||||
matchLabels: {app: hello-web}
|
||||
template:
|
||||
metadata:
|
||||
labels: {app: hello-web}
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: nginx:1.29-alpine
|
||||
ports: [{containerPort: 80}]
|
||||
resources:
|
||||
requests: {cpu: 10m, memory: 16Mi}
|
||||
limits: {memory: 64Mi}
|
||||
volumeMounts:
|
||||
- {name: html, mountPath: /usr/share/nginx/html}
|
||||
volumes:
|
||||
- name: html
|
||||
configMap: {name: hello-index}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hello-web
|
||||
namespace: web
|
||||
spec:
|
||||
selector: {app: hello-web}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: carr-pub
|
||||
namespace: web
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
tls:
|
||||
- hosts: [carr.pub]
|
||||
secretName: carr-pub-tls
|
||||
rules:
|
||||
- host: carr.pub
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hello-web
|
||||
port: {number: 80}
|
||||
Reference in New Issue
Block a user