forked from vishnoisuresh/netbox-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 8
/
nginx-all.yaml
51 lines (49 loc) · 1.02 KB
/
nginx-all.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx
labels:
frontend: nginx
spec:
replicas: 2
template:
metadata:
labels:
frontend: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
command: ["nginx"]
args: ["-c", "/etc/netbox-nginx/nginx.conf","-g", "daemon off;"]
volumeMounts:
- name: netbox-static-files
mountPath: /opt/netbox/netbox/static
- name: netbox-nginx-config
mountPath: /etc/netbox-nginx
restartPolicy: Always
volumes:
- name: netbox-static-files
persistentVolumeClaim:
claimName: netbox-static-files
- name: netbox-nginx-config
configMap:
name: nginx-conf
---
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
frontend: nginx
spec:
type: NodePort
ports:
- name: http
port: 80
targetPort: 80
nodePort: 8888
selector:
frontend: nginx