Commit 2a3e1cad authored by Vũ Hoàng Nam's avatar Vũ Hoàng Nam

Add Ingress for web-app and self TSL cert for loadbalancing trafic

parent 170eeeda
......@@ -26,7 +26,7 @@ SECRET_KEY = 'django-insecure-i+5cy#s&7!o7g!s4c785ztp(*d@@hyxkhrmjafhuz0m@9zg@(*
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["web-app.com"]
# Application definition
......
......@@ -23,7 +23,7 @@ spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag}}"
pullPolicy: IfNotPresent
pullPolicy: Always
envFrom:
- configMapRef:
name: "{{ include "web-app-minio.name" . }}-cm"
......
Create tls command
```
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout tls.key -out tls.crt -subj "/CN=web-app.com" -days 36
```
Create secret tls
```
kubectl create secret tls web-app-tls --cert=tls.crt --key=tls.key
```
\ No newline at end of file
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tls-ingress
spec:
tls:
- hosts:
- web-app.com
secretName: web-app-tls
rules:
- host: web-app.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-app-minio-svc
port:
number: 8000
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment