You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
911 B

apiVersion: v1
kind: Service
metadata:
labels:
app: eshop
component: frontend
name: frontend
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: eshop
component: frontend
type: LoadBalancer
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: frontend
spec:
template:
metadata:
labels:
app: eshop
component: frontend
spec:
containers:
- name: nginx
image: nginx:1.11.10-alpine
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
lifecycle:
preStop:
exec:
command: ["/usr/sbin/nginx","-s","quit"]
volumeMounts:
- name: config
mountPath: /etc/nginx
volumes:
- name: config
configMap:
name: config-files
items:
- key: nginx-conf
path: nginx.conf