I try to create an ingress with traefik on my aks cluster . The domain name pass by cloudflare and is redirect to https . The problem is that traefik not redirect to my pod.
i use helm for install treafik with this command
helm install traefik stable/traefik --namespace traefik --set kubernetes.ingressClass=traefik --set kubernetes.ingressEndpoint.useDefaultPublishedService=true
kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.12/deploy/manifests/00-crds.yaml --namespace traefik
kubectl label namespace traefik certmanager.k8s.io/disable-validation=true
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager --namespace traefik --version v0.12.0 jetstack/cert-manager --set ingressShim.defaultIssuerName=letsencrypt --set ingressShim.defaultIssuerKind=ClusterIssuer
my ingress yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
namespace: demo
name: ingress-demo
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: demo-devops.myst.com
http:
paths:
- backend:
serviceName: demo-svc
servicePort: 80
i know the service port is 80 but i aslo try 443 and it is the same for the deploy i try 443 for the port
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: demo
name: demo-deploy
labels:
app: demo
spec:
replicas: 1
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- image: demo.azurecr.io/demo:v1
name: demo
resources:
requests:
memory: "1000Mi"
cpu: "1000m"
ports:
- containerPort: 80
name: client
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html
volumes:
- name: wordpress-persistent-storage
persistentVolumeClaim:
claimName: wp-pv-claim
when i try with no https from other dsn provier it work perfectly