If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to
nginx.org.
Commercial support is available at
nginx.com.
Thank you for using nginx.
/ # .. _cce_10_0142__section18134208069: externalTrafficPolicy (Service Affinity) ---------------------------------------- For a NodePort Service, requests are first sent to the node port, then the Service, and finally the pod backing the Service. The backing pod may be not located in the node receiving the requests. By default, the backend workload can be accessed from any node IP address and service port. If the pod is not on the node that receives the request, the request will be redirected to the node where the pod is located, which may cause performance loss. **externalTrafficPolicy** is a configuration parameter of the Service. .. code-block:: apiVersion: v1 kind: Service metadata: name: nginx-nodeport spec: externalTrafficPolicy: local ports: - name: service nodePort: 30000 port: 80 protocol: TCP targetPort: 80 selector: app: nginx type: NodePort If the value of **externalTrafficPolicy** is **local**, requests sent from *Node IP address:Service port* will be forwarded only to the pod on the local node. If the node does not have a pod, the requests are suspended. The other value of **externalTrafficPolicy** is **cluster** (default value), which indicates that requests are forwarded in a cluster. You can set this parameter when creating a Service of the NodePort type on the CCE console. The values of **externalTrafficPolicy** are as follows: - **cluster**: The IP addresses and access ports of all nodes in a cluster can access the workload associated with the Service. Service access will cause performance loss due to route redirection, and the source IP address of the client cannot be obtained. - **local**: Only the IP address and access port of the node where the workload is located can access the workload associated with the Service. Service access will not cause performance loss due to route redirection, and the source IP address of the client can be obtained.