· ☕ 3 分钟
https://istio.io/latest/docs/ops/configuration/traffic-management/tls-configuration/
Sidecars
Sidecar traffic has a variety of associated connections. Let’s break them down one at a time.

Sidecar proxy network connections
- External inbound traffic This is traffic coming from an outside client that is captured by the sidecar. If the client is inside the mesh, this traffic may be encrypted with Istio mutual TLS. By default, the sidecar will be configured to accept both mTLS and non-mTLS traffic, known as
PERMISSIVEmode. The mode can alternatively be configured toSTRICT, where traffic must be mTLS, orDISABLE, where traffic must be plaintext. The mTLS mode is configured using aPeerAuthenticationresource. - Local inbound traffic This is traffic going to your application service, from the sidecar. This traffic will always be forwarded as-is. Note that this does not mean it’s always plaintext; the sidecar may pass a TLS connection through. It just means that a new TLS connection will never be originated from the sidecar.
- Local outbound traffic This is outgoing traffic from your application service that is intercepted by the sidecar. Your application may be sending plaintext or TLS traffic. If automatic protocol selection is enabled, Istio will automatically detect the protocol. Otherwise you should use the port name in the destination service to manually specify the protocol.
- External outbound traffic This is traffic leaving the sidecar to some external destination. Traffic can be forwarded as is, or a TLS connection can be initiated (mTLS or standard TLS). This is controlled using the TLS mode setting in the
trafficPolicyof aDestinationRuleresource. A mode setting ofDISABLEwill send plaintext, whileSIMPLE,MUTUAL, andISTIO_MUTUALwill originate a TLS connection.
The key takeaways are:
