Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker 如何使用Kubernetes服务实现负载平衡-而不是ClientIP策略_Docker_Kubernetes_Load Balancing_Kubernetes Service_Session Affinity - Fatal编程技术网

Docker 如何使用Kubernetes服务实现负载平衡-而不是ClientIP策略

Docker 如何使用Kubernetes服务实现负载平衡-而不是ClientIP策略,docker,kubernetes,load-balancing,kubernetes-service,session-affinity,Docker,Kubernetes,Load Balancing,Kubernetes Service,Session Affinity,我的服务/吊舱在服务后面运行,但我没有入口控制器。 请求来自GTM->LTM->K8s服务->吊舱。在这里,LTM覆盖了clientIP。因此,SessionAffinity与ClientIP策略不起作用 kind: Service metadata: creationTimestamp: null name: active selfLink: /api/v1/namespaces/active spec: externalTrafficPolicy: Cluster por

我的服务/吊舱在服务后面运行,但我没有入口控制器。 请求来自GTM->LTM->K8s服务->吊舱。在这里,LTM覆盖了clientIP。因此,SessionAffinity与ClientIP策略不起作用

kind: Service
metadata:
  creationTimestamp: null
  name: active
  selfLink: /api/v1/namespaces/active
spec:
  externalTrafficPolicy: Cluster
  ports:
  - name: port1
    nodePort: 35010
    port: 80
    protocol: TCP
  selector:
    name: active-pod
  sessionAffinity: ClientIP
  sessionAffinityConfig:
    clientIP:
      timeoutSeconds: 10800
  type: LoadBalancer
status:
  loadBalancer: {}

我的请求中有一个SMCookie。有没有办法在K8s服务中使用cookie实现负载平衡。或者建议一些其他选择。

对不起,我不明白你的意思。请你重新措辞或详细解释一下。对不起,我不明白你的意思。请你重新措辞或详细解释一下好吗。