I got a kubernetes cluster running and I would like to expose a service. I have a TestApplication that runs on port TestPort 3000. How do I configure Traefik to act as an ingress provider? in the documentation I don't understand where do I have to specify
providers:
kubernetesIngress: {}
source: https://doc.traefik.io/traefik/providers/kubernetes-ingress/
Is that enough to specify that it has to act as a kubernetes ingress?
kind: Deployment
apiVersion: apps/v1
metadata:
name: traefik-deployment
labels:
app: traefik
spec:
replicas: 1
selector:
matchLabels:
app: traefik
template:
metadata:
labels:
app: traefik
spec:
serviceAccountName: traefik-account
containers:
- name: traefik
image: traefik:v3.2
args:
- --api.insecure
- --providers.kubernetesingress
ports:
- name: web
containerPort: 80
- name: dashboard
containerPort: 8080
The "Getting Started with Kubernetes" walks through the process. For traefik to act as an Ingress provider, you need:
The easiest way to get all this set up is by using the official helm chart. Using helm, installing traefik looks like:
You can also run
helm template traefik/traefik
to generate the manifests on stdout if you want to inspect them.