当前,我将某项服务设置为负载平衡器时遇到问题。我正在尝试获取docs中所述的源IP保存。但是,当我将externalTrafficPolicy
设置为local时,将丢失该服务的所有流量。我缺少什么导致这种失败的原因吗?
负载均衡器服务:
apiVersion: v1
kind: Service
metadata:
labels:
app: loadbalancer
role: loadbalancer-service
name: lb-test
namespace: default
spec:
clusterIP: 10.3.249.57
externalTrafficPolicy: Local
ports:
- name: example service
nodePort: 30581
port: 8000
protocol: TCP
targetPort: 8000
selector:
app: loadbalancer-example
role: example
type: LoadBalancer
status:
loadBalancer:
ingress:
- ip: *example.ip*