k3s-oci-cluster
k3s-oci-cluster copied to clipboard
Added support for traefik2
Added support for traefik2
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
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.
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?
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
Added variable disable_ingress default to False. So to get traefik2 installed and configured only install_nginx_ingress set to false is needed.
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.
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
@mannp Never mind. I found a problem using the default installation. I will revert the latest commit
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.