42_IOT/p2/confs/app1.yaml

33 lines
465 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: app1-deployment
labels:
app: app1
spec:
replicas: 1
selector:
matchLabels:
app: app1
template:
metadata:
labels:
app: app1
spec:
containers:
- name: app1
image: nginx:1.14.2
---
apiVersion: v1
kind: Service
metadata:
name: app1
spec:
type: NodePort
selector:
app: app1
ports:
- port: 80
targetPort: 80
nodePort: 30080