Hello,
I don't get the IP address of the loadbalancer in the traefik ingress description, but it works with nginx:
Nginx and Traefik are deployed with helmet without any modifications. The new Cilium LB IPAM is used to allocate the loadbalancer IP
Traefik version: Traefik Proxy v2.9.6
Nginx: ingress-nginx/controller:v1.5.1
Deploy example:
kind: Deployment
apiVersion: apps/v1
metadata:
name: whoami
labels:
app: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami
image: traefik/whoami
ports:
- name: web
containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: whoami
spec:
ports:
- name: web
port: 80
targetPort: web
selector:
app: whoami
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: whoami-ingress-nginx
spec:
rules:
- http:
paths:
- path: /nginx
pathType: Prefix
backend:
service:
name: whoami
port:
name: web
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: whoami-ingress-traefik
spec:
rules:
- http:
paths:
- path: /traefik
pathType: Prefix
backend:
service:
name: whoami
port:
name: web
Result:
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx ingress-nginx-controller LoadBalancer 10.255.125.155 10.255.122.35 80:30803/TCP,443:32182/TCP 13h
traefik traefik LoadBalancer 10.255.125.248 10.255.122.38 80:31240/TCP,443:30864/TCP 25m
kubectl get ingresses
NAME CLASS HOSTS ADDRESS PORTS AGE
whoami-ingress-nginx <none> * 10.255.122.35 80 5m32s
whoami-ingress-traefik <none> * 80 5m32s
kubectl describe ingress whoami-ingress-nginx
Name: whoami-ingress-nginx
Labels: <none>
Namespace: default
Address: 10.255.122.35
Ingress Class: <none>
Default backend: <default>
Rules:
Host Path Backends
---- ---- --------
*
/nginx whoami:web (10.255.130.241:80)
Annotations: kubernetes.io/ingress.class: nginx
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Sync 31s (x26 over 12m) nginx-ingress-controller Scheduled for sync
Normal Sync 31s (x26 over 12m) nginx-ingress-controller Scheduled for sync
kubectl describe ingress whoami-ingress-traefik
Name: whoami-ingress-traefik
Labels: <none>
Namespace: default
Address:
Ingress Class: <none>
Default backend: <default>
Rules:
Host Path Backends
---- ---- --------
*
/traefik whoami:web (10.255.130.241:80)
Annotations: kubernetes.io/ingress.class: traefik
Events: <none>