44 lines
751 B
YAML
44 lines
751 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
labels:
|
||
|
run: nginx
|
||
|
name: nginx-deploy-czerwony
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
run: nginx-czerwony
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
run: nginx-czerwony
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx-czerwony
|
||
|
image: nginx
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
volumeMounts:
|
||
|
- name: html-czerwony
|
||
|
mountPath: /usr/share/nginx/html
|
||
|
volumes:
|
||
|
- name: html-czerwony
|
||
|
configMap:
|
||
|
name: czerwony-html
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: nginx-deploy-czerwony
|
||
|
labels:
|
||
|
app: nginx
|
||
|
spec:
|
||
|
# type: ClusterIP
|
||
|
ports:
|
||
|
- port: 80
|
||
|
protocol: TCP
|
||
|
selector:
|
||
|
run: nginx-czerwony
|