Traefik not deploying

I have followed the cookbook and trying to get Traefik deployed but no pods are running under the traefik namespace. The only error I could find: kubectl logs -n flux-system deployment/kustomize-controller | grep -i error
"error":"Kustomization/flux-system/reflector dry-run failed: failed to prune fields: failed to convert merged object to last applied version: .spec.validation: field not declared in schema\nNamespace/traefik created\n"}
"error":"Kustomization/flux-system/reflector dry-run failed: failed to prune fields: failed to convert merged object to last applied version: .spec.validation: field not declared in schema\nNamespace/traefik created\n"}
12 Replies
TechHermitD
TechHermitD6mo ago
That sounds like a mal-formed configmap. On my phone right now so I can’t open the Yaml file but check your indentation.
Don Bish
Don BishOP6mo ago
I removed valuesFrom: from the helmrelease file to test having no config, but get same error if I include it or not
TechHermitD
TechHermitD6mo ago
Oh wait. That looks familiar, can you paste the top of the helm release here in text
Don Bish
Don BishOP6mo ago
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: traefik
namespace: traefik
spec:
chart:
spec:
chart: traefik
version: 10.x
sourceRef:
kind: HelmRepository
name: traefik
namespace: flux-system
interval: 15m
timeout: 5m
releaseName: traefik
valuesFrom:
- kind: ConfigMap
name: traefik-helm-chart-value-overrides
valuesKey: values.yaml # This is the default, but best to be explicit for clarity
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: traefik
namespace: traefik
spec:
chart:
spec:
chart: traefik
version: 10.x
sourceRef:
kind: HelmRepository
name: traefik
namespace: flux-system
interval: 15m
timeout: 5m
releaseName: traefik
valuesFrom:
- kind: ConfigMap
name: traefik-helm-chart-value-overrides
valuesKey: values.yaml # This is the default, but best to be explicit for clarity
TechHermitD
TechHermitD6mo ago
That looks right. There have been some issues in the past with the instructions on the site having a value that is no longer supported but I don’t see that in your config
root
root6mo ago
can you link the instructions you followed? here are the ones I use (mine): https://github.com/faangbait/cluster/blob/main/README.md#configure-traefik and https://github.com/faangbait/cluster/blob/main/_init/10-storage.yaml and https://github.com/faangbait/cluster/blob/main/infrastructure/networking/traefik-values.yaml the thing that's failing is the prune: true line in your Kustomize. Try k delete ns traefik and then apply it again. crazy that somebody's actually recommending kustomize these days though.
Don Bish
Don BishOP6mo ago
Why I use Traefik Ingress Controller - Funky Penguin's Geek Cookbook
Among other advantages, I no longer need to replicate SSL certificate secrets for nginx-ingress-controller to consume, once-per-namespace!
root
root6mo ago
huh. how bout that. it's got gitopos now.
Don Bish
Don BishOP6mo ago
I managed to fix the traefik installation problem. Just reset all configs. @root is the cookbook using Kustomize not a good idea?
root
root6mo ago
It's good to learn flux but man, I would space it out a little more than DP does. traefik is already like fifteen abstractions deeper than tcpdump. using helm to install it? okay, i'll buy that. but using flux to gitops it... i'd just draw the line before that is all. the more complicated things get, the more prone to failure they are. but he's the guy with a 2300 person discord server and i'm just a joker with a keyboard
Don Bish
Don BishOP6mo ago
Thanks for the input. I was installing everything via helm manually but I like the idea of doing it once in a repo and then I can replciated my setup should I make a new cluster in the future.
root
root6mo ago
back in my day, we made things repeatable by writing documentation. if i've learned anything it's that you will never successfully one-click install this into a new cluster after it sits around unmaintained for two years. with documentation, you can see exactly which steps break and fix them as you go. as opposed to some fatal error deep in one of fifty places log lines live.
Want results from more Discord servers?
Add your server