Hello,
I've deployed an Azure Kubernetes Services, host in MS Azure.
I have my own dns name, with azure public dns.
I try to use traefik as ingress controler and reverse proxy.
Unfortunately, I can't get rid of the default SSL Certificate, even if I succeed in generate a certificate with let's encrypt and cer-manager
I have deployed traefik and cert-manager using Helm chart:
helm install --namespace traefik cert-manager jetstack/cert-manager --version v1.12.2 --set installCRDs=true
helm repo add jetstack https://charts.jetstack.io
Here are the configuration files:
nginx.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
namespace: traefik
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
namespace: traefik
spec:
ports:
- port: 80
protocol: TCP
selector:
app: nginx
ingressroute.yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: nginx
namespace: traefik
spec:
entryPoints:
- web
routes:
- match: Host(`dashboard.***.************.app`)
kind: Rule
services:
- name: nginx
port: 80
middlewares:
- name: https-redirectscheme
tls:
secretName: nginx-cert-staging
middleware.yaml
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: https-redirectscheme
namespace: traefik
spec:
redirectScheme:
permanent: true
scheme: https
issuer.yaml
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-staging
namespace: traefik
spec:
acme:
email: user@mail.fr
server: https://acme-staging-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-issuer-account-key
solvers:
- http01:
ingress:
serviceType: ClusterIP
ingressClassName: traefik
certificate.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nginx-cert-staging
namespace: traefik
spec:
commonName: dashboard.***.************.app
secretName: nginx-cert-staging
dnsNames:
- dashboard.***.************.app
issuerRef:
kind: Issuer
name: letsencrypt-staging
I'm a noob in using kubernetes for the moment, but I don't see where I could have made a mistake in this configuration files.
Thank you for your help