💥 add all the files
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: reverse-proxy
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: reverse-proxy
|
||||
namespace: reverse-proxy
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: reverse-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: reverse-proxy
|
||||
spec:
|
||||
nodeName: kube-master
|
||||
containers:
|
||||
- image: nginx:alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: reverse-proxy
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: rp-port-http
|
||||
- containerPort: 443
|
||||
name: rp-port-https
|
||||
volumeMounts:
|
||||
- name: reverse-proxy-conf
|
||||
mountPath: /etc/nginx/conf.d/
|
||||
- name: reverse-proxy-ssl
|
||||
mountPath: /etc/nginx/ssl/
|
||||
- mountPath: /etc/nginx/nginx.conf
|
||||
name: example-volume
|
||||
- name: reverse-proxy-www
|
||||
mountPath: /var/www/certbot/
|
||||
volumes:
|
||||
- name: reverse-proxy-conf
|
||||
hostPath:
|
||||
path: /opt/kubernetes/Reverse_proxy_Nginx/conf.d
|
||||
- name: reverse-proxy-www
|
||||
hostPath:
|
||||
path: /opt/kubernetes/Reverse_proxy_Nginx/certbot/www/
|
||||
- name: reverse-proxy-ssl
|
||||
hostPath:
|
||||
path: /opt/kubernetes/Reverse_proxy_Nginx/certbot/conf/
|
||||
- name: example-volume
|
||||
hostPath:
|
||||
path: /opt/kubernetes/Reverse_proxy_Nginx/nginx.conf # directory location on host
|
||||
type: File # this field is optional
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: reverse-proxy
|
||||
namespace: reverse-proxy
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: rp-port-http
|
||||
protocol: TCP
|
||||
nodePort: 30080
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: rp-port-https
|
||||
protocol: TCP
|
||||
nodePort: 30443
|
||||
|
||||
type: NodePort
|
||||
selector:
|
||||
app: reverse-proxy
|
||||
Reference in New Issue
Block a user