Files
k3s-configs/php-test/k8s/php-deployment.yaml
2026-01-21 13:37:13 +00:00

59 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: php-app
namespace: php-test
spec:
replicas: 2
selector:
matchLabels:
app: php-app
template:
metadata:
labels:
app: php-app
spec:
containers:
- name: php-app
image: registry.u9.net3w.com/php-test:latest
imagePullPolicy: Always
ports:
- containerPort: 80
name: http
volumeMounts:
- name: php-config
mountPath: /var/www/html/config.php
subPath: config.php
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: php-config
configMap:
name: php-config
---
apiVersion: v1
kind: Service
metadata:
name: php-app
namespace: php-test
spec:
type: NodePort
selector:
app: php-app
ports:
- port: 80
targetPort: 80
nodePort: 30080
protocol: TCP
name: http