Forum Navigation
You need to log in to create posts and topics.

Create Ingress with wildcard SSL

Problem

User purchased a wildcard domain ( or one domain e.i.: http://www.tracston.com ) and wants to add it to each kubernetes ingress nginx settings

Solution

Create secret containing the SSL

kubectl create secret tls star-tracston-com-ssl --key="server.key" --cert="star_tracston_com.crt"

Create ingress that use the following SSL

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/auth-realm: Authentication Required
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-type: basic
name: prometheus-ingress
namespace: default
spec:
rules:
- host: prom-prod.tracston.com
http:
paths:
- backend:
service:
name: kube-prometheus-stack-prometheus
port:
number: 9090
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- prod.tracston.com
secretName: star-tracston-com-ssl

Uploaded files: