I have a react app that is first built and then served using nginx inside the docker container.
The container is running in k8s cluster which is exposed using nginx-ingress controller.
Now I want to setup the ssl certificate for the app, I have already bought ssl certs.
how do I configure it? anyone help me!
I was thinking to enable sal both in nginx inside docker and ingress-controller but that didn't worked. why
This is my nginx-ingress file:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
namespace: devil
annotations:
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- dev.example.com
secretName: devil-tls
rules:
- host: dev.example.com
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: devil-web-service
port:
number: 80
- host: api-example.com
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: devil-api-service
port:
number: 80
This config is not running the app in https mode. Is it the port 80 that's affecting it?