infctl-cli/vagrant/dev/ubuntu/k8s/nginx-test/deployment.yaml
jon brookes b2b028a16c feat: add Ingress and Service configurations for nginx deployment, and implement MetalLB and Traeik installation scripts
refactor: remove obsolete Traefik installation script

feat: add environment checks and configurations for Vagrant setup, including dnsmasq  MetalLB  and ingress
2025-08-24 17:35:03 +01:00

35 lines
945 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-with-storage
namespace: default
spec:
selector:
matchLabels:
app: nginx-storage
replicas: 1
template:
metadata:
labels:
app: nginx-storage
spec:
initContainers:
- name: init-nginx-content
image: busybox
command: ["sh", "-c", "echo '<html><body><h1>Welcome to nginx!</h1><h2>using MVK</h2><p><a href=\"https://mvk.headshed.dev/\">https://mvk.headshed.dev/</a></p></body></html>' > /usr/share/nginx/html/index.html"]
volumeMounts:
- name: nginx-data
mountPath: /usr/share/nginx/html
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
volumeMounts:
- name: nginx-data
mountPath: /usr/share/nginx/html
volumes:
- name: nginx-data
persistentVolumeClaim:
claimName: nginx-data-pvc