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

Added support for traefik2 #27

Merged
merged 10 commits into from
Nov 2, 2022
Merged

Added support for traefik2 #27

merged 10 commits into from
Nov 2, 2022

Conversation

garutilorenzo
Copy link
Owner

Added support for traefik2

@garutilorenzo garutilorenzo linked an issue Oct 21, 2022 that may be closed by this pull request
@mannp
Copy link
Contributor

mannp commented Oct 21, 2022

I have tested this with the base config, and it appears stable, although I have done no further testing as yet :)

  install_traefik2          = true
  install_nginx_ingress     = false
  install_certmanager       = false
  install_argocd            = false
  install_longhorn          = false

Also tested as follows with cert manager referring the the nginx-ingress and longhorn fails with the same error every time (unrelated)

  install_traefik2          = true
  install_nginx_ingress     = false
  install_certmanager       = true
  install_argocd            = true
  install_longhorn          = true

@garutilorenzo
Copy link
Owner Author

Hi @mannp,

I think this PR would be useless.
From the doc I read:

If Traefik is not disabled K3s versions 1.20 and earlier will install Traefik v1, while K3s versions 1.21 and later will install Traefik v2 if v1 is not already present.

So from k3s version 1.21 traefik v2 is installed by default.

@mannp
Copy link
Contributor

mannp commented Oct 24, 2022

Hi @garutilorenzo does that mean that the default install works with this Oracle cluster?

I'd understood proxy mode was enabled and a NodePort rather than a LB is used in your PR, as well as routing from the Oracle loadbalancer.

I am not clear if those things are true with the default k3s traefik install?

@garutilorenzo
Copy link
Owner Author

Ok @mannp, now with the last commits:

  • traefik2 will not be installed (installed by default by k3s)
  • traefik2 will be configured in proxy portocol mode
  • traefik2 svc will listen on ingress_controller_http_nodeport and ingress_controller_https_nodeport

@garutilorenzo
Copy link
Owner Author

Added variable disable_ingress default to False.
So to get traefik2 installed and configured only install_nginx_ingress set to false is needed.

@mannp
Copy link
Contributor

mannp commented Oct 24, 2022

  install_nginx_ingress     = false
  install_certmanager       = false
  install_argocd            = true
  install_longhorn          = true

Only metrics, coredns and localpathprovisioner are in kube-system / deployements.

It doesn't appear that any traefik is installed with fresh pull or the repo and pr-27.

@garutilorenzo
Copy link
Owner Author

Fixed

root@inst-xgoau-k3s-servers:~# kubectl get pods -n kube-system
NAME                                      READY   STATUS      RESTARTS   AGE
coredns-d76bd69b-ww8ms                    1/1     Running     0          97s
helm-install-traefik-crd-lzqcr            0/1     Completed   0          97s
helm-install-traefik-mnb5r                1/1     Running     0          43s
local-path-provisioner-6c79684f77-62fkt   1/1     Running     0          97s
metrics-server-7cd5fcb6b7-p7sw8           1/1     Running     0          97s

@garutilorenzo
Copy link
Owner Author

@mannp Never mind. I found a problem using the default installation. I will revert the latest commit

@mannp
Copy link
Contributor

mannp commented Oct 25, 2022

Okay @garutilorenzo, I pulled and then couldn't clear the cluster config with terraform destroy, so never tried.

Are you planning on merging the previous commits or still testing? Basic tests for me had it working fine.

I was unable to route cloudflared directly to traefik2 internal ip, but that was probably outside the scope of your changes.

@garutilorenzo garutilorenzo merged commit 89b47c1 into master Nov 2, 2022
@garutilorenzo garutilorenzo deleted the traefik2 branch November 2, 2022 16:36
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

Successfully merging this pull request may close these issues.

Use Traefik 2 instead of nginx as ingress
2 participants