Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to redirect to authelia with ingress #1

Open
rajeshvkothari opened this issue Oct 3, 2022 · 2 comments
Open

Not able to redirect to authelia with ingress #1

rajeshvkothari opened this issue Oct 3, 2022 · 2 comments

Comments

@rajeshvkothari
Copy link

Great work.. I found steps to setup authelia on kubernetes. In '8 - authelia' i am using ingress resource with traefik instead of ingressRoute. So here is my ingress yaml file:

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-ingress
  namespace: gin
  annotations:
	traefik.ingress.kubernetes.io/router.middlewares: default-authelia@kubernetescrd
	traefik.ingress.kubernetes.io/router.tls: "true"
	cert-manager.io/cluster-issuer: letsencrypt-prod
	kubernetes.io/ingress.class: traefik
spec:
  tls:
  - hosts:
	- "heimdall.davidapps.dev"
	secretName: demo-cert
  rules:
	- host: heimdall.davidapps.dev
	  http:
		paths:
		  - path: /
			pathType: Prefix
			backend:
			  service:
				name: frontend-prod
				port:
				  number: 80

But while accessing my service at heimdall.davidapps.dev I am not redirecting to auth.davidapps.dev.
Am I doing anything worng here?

@DavidIlie
Copy link
Owner

Hi,

If it doesn't redirect that probably means that you did not register the middleware.yaml file, you can try and check the traefik logs and see if there is any other error regarding the middleware.

Please see command below to apply the middleware and look through that part of the instructions README for authelia in my repo:

kubectl apply -f middleware.yaml

@rajeshvkothari
Copy link
Author

I already registered middleware.yaml file. But while creating ingress resource I found following logs in traffic pod in
kube-system namespace:

   level=error msg="middleware \"default-authelia@kubernetescrd\" does not exist" entryPointName=http routerName=tst-heimdall.davidapps.dev@kubernetes
   level=error msg="middleware \"default-authelia@kubernetescrd\" does not exist" routerName=tst-heimdall.davidapps.dev@kubernetes entryPointName=https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants