apiVersion: v1
kind: Service
metadata:
name: php7-2
namespace: default
spec:
selector:
app: php7-2
release: test
type: NodePort
ports:
- protocol: TCP
port: 9000
targetPort: 9000
nodePort: 30090
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: php7-2
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: php7-2
release: test
template:
metadata:
labels:
app: php7-2
release: test
template:
metadata:
labels:
app: php7-2
release: test
spec:
containers:
- name: php7-2
image: 192.168.0.189:5000/php:58-7.2
ports:
- name: php
containerPort: 9000
volumeMounts:
- name: phpdir
mountPath: /data/www
volumes:
- name: phpdir
nfs:
server: 192.168.0.189
path: /data/nfs/www