Files
rrr/k8s/app/nginx.yml

50 lines
895 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: rock
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
volumes:
- name: src-rock
hostPath:
path: /rrr/src/legacy_www/rock
- name: nginx-conf
hostPath:
path: /rrr/config/rock/nginx/site.conf
containers:
- name: nginx
image: nginx
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d/site.conf
- name: src-rock
mountPath: /var/www/rock
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: rock-http
namespace: rock
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 8080
targetPort: 8080