Tips for using traefic

I’m attempting to deploy ingress objects using our existing traefic ingress and garden; however, the ingress objects never get picked up by the ingress controller, and I don’t understand why. The ambassador example (garden/examples/ambassador at 0.12.23 · garden-io/garden · GitHub) and the documentation (Remote Kubernetes - Garden) makes it seem like there’s just a tiny piece I’m not understanding right. What kind of annotations are required for using traefic with garden?

Hi Dave

It would be helpful to see some of your configuration and to know how you’re running K8s (e.g. cloud provider, minikube, etc).

But in general, you should be able to deploy Traefik itself with Garden’s kubernetes module type, using the manifests from their documentation.

As for other resources, you have the choice between using the kubernetes/helm module types or the container module type.

If you’re using the kubernetes or helm module type, there’s not magic going on and Garden essentially “kubectl applies” your manifests or “helm installs” your charts.

If you’re using the container module type, Garden actually creates the K8s manifests (e.g. Ingress and Services resources) for you and you can set Ingress annotations via the ingress field on the service spec. You can also add Service annotations via the annotations field on the service spec.

Does that help?

1 Like

It’s working!!! Thank you!

I added

        annotations:
          kubernetes.io/ingress.class: traefik

under ingresses and traefik picked it right up!

1 Like