目前我的一个服务设置为负载均衡器存在问题。我试图得到源IP保存像docs中所述。然而,当我将externalTrafficPolicy
设置为本地时,我失去了服务的所有流量。是否有一些我错过的导致这种失败的东西?
负载均衡器服务:
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*