Files
Reverse_proxy_Nginx/Nginx.kube.yaml
T
pi-ux-ce 6009e6a4f7
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 12m2s
add all unstaged files
2025-04-23 10:24:52 +01:00

95 lines
2.2 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: reverse-proxy
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: reverse-proxy
namespace: reverse-proxy
annotations:
reloader.stakater.com/search: "true"
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-randomfile
# mountPath: /etc/nginx/conf.d/random.conf
- name: nginx-sites-terraform
mountPath: /etc/nginx/conf.d/
- name: reverse-proxy-ssl
mountPath: /etc/nginx/ssl/
- mountPath: /etc/nginx/
name: nginx-configfile
- name: proxy-cache-path-volume
mountPath: /tmp/cache/
- name: secret-htpasswd
mountPath: /authentication-htpasswd/
resources:
limits:
cpu: 250m
memory: 250Mi
volumes:
- name: reverse-proxy-ssl
hostPath:
path: /opt/kubernetes/Reverse_proxy_Nginx/certbot/conf/
- hostPath:
path: /opt/kubernetes/Reverse_proxy_Nginx/random.conf
type: File
name: reverse-proxy-conf-randomfile
- name: nginx-configfile
configMap:
name: nginx-config
defaultMode: 0555
- name: nginx-sites-terraform
configMap:
name: sites-terraform
defaultMode: 0555
- name: proxy-cache-path-volume
emptyDir:
medium: Memory
- name: secret-htpasswd
secret:
secretName: htpasswd
---
apiVersion: v1
kind: Service
metadata:
name: reverse-proxy
namespace: reverse-proxy
spec:
externalTrafficPolicy: Local
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