Service Mesh
AuthenticationPolicy defines authentication policy. It can be set fordifferent scopes (mesh, service …), and the most narrow scope withnon-INHERIT value will be used.Mesh policy cannot be INHERIT.
Certificate
Certificate configures the provision of a certificate and its key.Example 1: key and cert stored in a secret{ secretName: galley-certsecretNamespace: istio-systemdnsNames:- galley.istio-system.svc- galley.mydomain.com}Example 2: key and cert stored in a directory{ dnsNames:- pilot.istio-system- pilot.istio-system.svc- pilot.mydomain.com}
Field | Type | Description | Required |
---|---|---|---|
secretName | string | Name of the secret the certificate and its key will be stored into.If it is empty, it will not be stored into a secret.Instead, the certificate and its key will be stored into a hard-coded directory. | No |
dnsNames | string[] | The DNS names for the certificate. A certificate may containmultiple DNS names. | No |
ConfigSource
ConfigSource describes information about a configuration store inside amesh. A single control plane instance can interact with one or more datasources.
Field | Type | Description | Required |
---|---|---|---|
address | string | Address of the server implementing the Istio Mesh Configurationprotocol (MCP). Can be IP address or a fully qualified DNS name.Use fs:/// to specify a file-based backend with absolute path to the directory. | No |
tlsSettings | TLSSettings | Use the tls_settings to specify the tls mode to use. If the MCP serveruses Istio mutual TLS and shares the root CA with Pilot, specify the TLSmode as ISTIO_MUTUAL. | No |
subscribedResources |
| Describes the source of configuration, if nothing is specified default is MCP | No |
LocalityLoadBalancerSetting
Locality-weighted load balancing allows administrators to control thedistribution of traffic to endpoints based on the localities of where thetraffic originates and where it will terminate. These localities arespecified using arbitrary labels that designate a hierarchy of localities in{region}/{zone}/{sub-zone} form. For additional detail refer toThe following example shows how to setup locality weights mesh-wide.
Given a mesh with workloads and their service deployed to “us-west/zone1/”and “us-west/zone2/”. This example specifies that when traffic accessing aservice originates from workloads in “us-west/zone1/”, 80% of the trafficwill be sent to endpoints in “us-west/zone1/”, i.e the same zone, and theremaining 20% will go to endpoints in “us-west/zone2/”. This setup isintended to favor routing traffic to endpoints in the same locality.A similar setting is specified for traffic originating in “us-west/zone2/”.
If the goal of the operator is not to distribute load across zones andregions but rather to restrict the regionality of failover to meet otheroperational requirements an operator can set a ‘failover’ policy instead ofa ‘distribute’ policy.
The following example sets up a locality failover policy for regions.Assume a service resides in zones within us-east, us-west & eu-westthis example specifies that when endpoints within us-east become unhealthytraffic should failover to endpoints in any zone or sub-zone within eu-westand similarly us-west should failover to us-east.
Locality load balancing settings.
Field | Type | Description | Required |
---|---|---|---|
distribute | Distribute[] | Optional: only one of distribute or failover can be set.Explicitly specify loadbalancing weight across different zones and geographical locations.Refer to If empty, the locality weight is set according to the endpoints number within it. | No |
failover | Failover[] | Optional: only failover or distribute can be set.Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.Should be used together with OutlierDetection to detect unhealthy endpoints.Note: if no OutlierDetection specified, this will not take effect. | No |
LocalityLoadBalancerSetting.Distribute
Describes how traffic originating in the ‘from’ zone or sub-zone isdistributed over a set of ‘to’ zones. Syntax for specifying a zone is{region}/{zone}/{sub-zone} and terminal wildcards are allowed on anysegment of the specification. Examples: - matches all localitiesus-west/ - all zones and sub-zones within the us-west regionus-west/zone-1/* - all sub-zones within us-west/zone-1
Field | Type | Description | Required |
---|---|---|---|
from | string | Originating locality, ‘/’ separated, e.g. ‘region/zone/sub_zone’. | No |
to | map<string, uint32> | Map of upstream localities to traffic distribution weights. The sum ofall weights should be == 100. Any locality not assigned a weight willreceive no traffic. | No |
LocalityLoadBalancerSetting.Failover
Specify the traffic failover policy across regions. Since zone and sub-zonefailover is supported by default this only needs to be specified forregions when the operator needs to constrain traffic failover so thatthe default behavior of failing over to any endpoint globally does notapply. This is useful when failing over traffic across regions would notimprove service health or may need to be restricted for other reasonslike regulatory controls.
Field | Type | Description | Required |
---|---|---|---|
from | string | Originating region. | No |
to | string | Destination region the traffic will fail over to when endpoints inthe ‘from’ region becomes unhealthy. | No |
MeshConfig
NOTE: This configuration type should be used for the low-level globalconfiguration, such as component addresses and port numbers. It should notbe used for the features of the mesh that can be scoped by service or bynamespace. Some of the fields in the mesh config are going to be deprecatedand replaced with several individual configuration types (for example,tracing configuration).
Field | Type | Description | Required |
---|---|---|---|
mixerCheckServer | string | Address of the server that will be used by the proxies for policycheck calls. By using different names for mixerCheckServer andmixerReportServer, it is possible to have one set of Mixer servers handlepolicy check calls while another set of Mixer servers handle telemetrycalls.NOTE: Omitting mixerCheckServer while specifying mixerReportServer isequivalent to setting disablePolicyChecks to true. | No |
mixerReportServer | string | Address of the server that will be used by the proxies for policy reportcalls. | No |
disablePolicyChecks | bool | Disable policy checks by the Mixer service. Defaultis false, i.e. Mixer policy check is enabled by default. | No |
policyCheckFailOpen | bool | Allow all traffic in cases when the Mixer policy service cannot be reached.Default is false which means the traffic is denied when the client is unableto connect to Mixer. | No |
sidecarToTelemetrySessionAffinity | bool | Enable session affinity for Envoy Mixer reports so that calls from a proxy willalways target the same Mixer instance. | No |
proxyListenPort | int32 | Port on which Envoy should listen for incoming connections fromother services. | No |
proxyHttpPort | int32 | Port on which Envoy should listen for HTTP PROXY requests if set. | No |
connectTimeout | Duration | Connection timeout used by Envoy. (MUST BE >=1ms) | No |
protocolDetectionTimeout |
| Automatic protocol detection uses a set of heuristics todetermine whether the connection is using TLS or not (on theserver side), as well as the application protocol being used(e.g., http vs tcp). These heuristics rely on the client sendingthe first bits of data. For server first protocols like MySQL,MongoDB, etc., Envoy will timeout on the protocol detection afterthe specified period, defaulting to non mTLS plain TCPtraffic. Set this field to tweak the period that Envoy will waitfor the client to send the first bits of data. (MUST BE >=1ms) | No |
tcpKeepalive | TcpKeepalive | If set then set SOKEEPALIVE on the socket to enable TCP Keepalives. | No |
ingressClass | string | Class of ingress resources to be processed by Istio ingresscontroller. This corresponds to the value of“kubernetes.io/ingress.class” annotation. | No |
ingressService | string | Name of theKubernetes service used for the istio ingress controller. | No |
ingressControllerMode |
| Defines whether to use Istio ingress controller for annotated or all ingress resources. | No |
enableTracing | bool | Flag to control generation of trace spans and request IDs.Requires a trace span collector defined in the proxy configuration. | No |
accessLogFile | string | File address for the proxy access log (e.g. /dev/stdout).Empty value disables access logging. | No |
accessLogFormat | string | Format for the proxy access logEmpty value results in proxy’s default access log format | No |
accessLogEncoding | AccessLogEncoding | Encoding for the proxy access log (text or json).Default value is text. | No |
enableEnvoyAccessLogService | bool | This flag enables Envoy’s gRPC Access Log Service.See for details about Envoy’s gRPC Access Log Service API. | No |
defaultConfig | ProxyConfig | Default proxy config used by the proxy injection mechanism operating in the mesh(e.g. Kubernetes admission controller)In case of Kubernetes, the proxy config is applied once during the injection process,and remain constant for the duration of the pod. The rest of the mesh config can be changedat runtime and config gets distributed dynamically. | No |
outboundTrafficPolicy |
| Set the default behavior of the sidecar for handling outbound trafficfrom the application. If your application uses one or more externalservices that are not known apriori, setting the policy to ALLOW_ANYwill cause the sidecars to route any unknown traffic originating fromthe application to its requested destination. Users are stronglyencouraged to use ServiceEntries to explicitly declare any externaldependencies, instead of using allow_any, so that traffic to theseservices can be monitored. | No |
enableClientSidePolicyCheck | bool | Enables client side policy checks. | No |
sdsUdsPath | string | Unix Domain Socket through which Envoy communicates with NodeAgent SDS to get key/cert for mTLS.Use secret-mount files instead of SDS if set to empty. | No |
configSources | ConfigSource describes a source of configuration data for networkingrules, and other Istio configuration artifacts. Multiple data sourcescan be configured for a single control plane. | No | |
enableAutoMtls | BoolValue | This flag is used to enable mutual TLS automatically for service to service communicationwithin the mesh, default false.If set to true, and a given service does not have a corresponding DestinationRule configured,or its DestinationRule does not have TLSSettings specified, Istio configures client sideTLS configuration appropriately. More specifically,If the upstream authentication policy is in STRICT mode, use Istio provisioned certificatefor mutual TLS to connect to upstream.If upstream service is in plain text mode, use plain text.If the upstream authentication policy is in PERMISSIVE mode, Istio configures clients to usemutual TLS when server sides are capable of accepting mutual TLS traffic.If service DestinationRule exists and has TLSSettings specified, that is always used instead. | No |
trustDomain | string | The trust domain corresponds to the trust root of a system.Refer to | No |
trustDomainAliases | string[] | The trust domain aliases represent the aliases of trust_domain .For example, if we haveAny service with the identity td1/ns/foo/sa/a-service-account , td2/ns/foo/sa/a-service-account ,or td3/ns/foo/sa/a-service-account will be treated the same in the Istio mesh. | No |
defaultServiceExportTo | string[] | The default value for the ServiceEntry.export_to field and servicesimported through container registry integrations, e.g. this applies toKubernetes Service resources. The value is a list of namespace names andreserved namespace aliases. The allowed namespace aliases are:- - All Namespaces. - Current Namespace~ - No NamespaceIf not set the system will use “” as the default value which implies thatservices are exported to all namespaces.‘All namespaces’ is a reasonable default for implementations that don’tneed to restrict access or visibility of services across namespaceboundaries. If that requirement is present it is generally good practice tomake the default ‘Current namespace’ so that services are only visiblewithin their own namespaces by default. Operators can then expand thevisibility of services to other namespaces as needed. Use of ‘No Namespace’is expected to be rare but can have utility for deployments wheredependency management needs to be precise even within the scope of a singlenamespace.For further discussion see the reference documentation for ServiceEntry,Sidecar, and Gateway. | No |
defaultVirtualServiceExportTo | string[] | The default value for the VirtualService.export_to field. Has the samesyntax as ‘default_service_export_to’.If not set the system will use “” as the default value which implies thatvirtual services are exported to all namespaces | No |
defaultDestinationRuleExportTo | string[] | The default value for the DestinationRule.export_to field. Has the samesyntax as ‘default_service_export_to’.If not set the system will use “*” as the default value which implies thatdestination rules are exported to all namespaces | No |
rootNamespace | string | The namespace to treat as the administrative root namespace forIstio configuration. When processing a leaf namespace Istio will search fordeclarations in that namespace first and if none are found it willsearch in the root namespace. Any matching declaration found in the rootnamespace is processed as if it were declared in the leaf namespace.The precise semantics of this processing are documented on each resourcetype. | No |
localityLbSetting | LocalityLoadBalancerSetting | Locality based load balancing distribution or failover settings. | No |
dnsRefreshRate |
| Configures DNS refresh rate for Envoy clusters of type STRICT_DNS | No |
disableReportBatch | bool | The flag to disable report batch. | No |
reportBatchMaxEntries | uint32 | When disable_report_batch is false, this value specifies the maximum numberof requests that are batched in report. If left unspecified, the default valueof report_batch_max_entries == 0 will use the hardcoded defaults ofistio::mixerclient::ReportOptions. | No |
reportBatchMaxTime | Duration | When disable_report_batch is false, this value specifies the maximum elapsedtime a batched report will be sent after a user request is processed. If leftunspecified, the default report_batch_max_time == 0 will use the hardcodeddefaults of istio::mixerclient::ReportOptions. | No |
h2UpgradePolicy |
| Specify if http1.1 connections should be upgraded to http2 by default.if sidecar is installed on all pods in the mesh, then this should be set to UPGRADE.If one or more services or namespaces do not have sidecar(s), then this should be set to DO_NOT_UPGRADE.It can be enabled by destination using the destinationRule.trafficPolicy.connectionPool.http.h2UpgradePolicy override. | No |
inboundClusterStatName | string | Name to be used while emitting statistics for inbound clusters.By default, Istio emits statistics with the pattern inbound| | No |
outboundClusterStatName | string | Name to be used while emitting statistics for outbound clusters.By default, Istio emits statistics with the pattern outbound| | No |
certificates | Certificate[] | Configure the provision of certificates. | No |
MeshConfig.AccessLogEncoding
Name | Description |
---|---|
TEXT | |
JSON |
Default Policy for upgrading http1.1 connections to http2.
MeshConfig.IngressControllerMode
Name | Description |
---|---|
OFF | Disables Istio ingress controller. |
DEFAULT | Istio ingress controller will act on ingress resources that do notcontain any annotation or whose annotations match the valuespecified in the ingress_class parameter described earlier. Use thismode if Istio ingress controller will be the default ingresscontroller for the entireKubernetes cluster. |
STRICT | Istio ingress controller will only act on ingress resources whoseannotations match the value specified in the ingress_class parameterdescribed earlier. Use this mode if Istio ingress controller will bea secondary ingress controller (e.g., in addition to acloud-provided ingress controller). |
MeshConfig.OutboundTrafficPolicy
Field | Type | Description | Required |
---|---|---|---|
mode | Mode | No |
MeshConfig.OutboundTrafficPolicy.Mode
Name | Description |
---|---|
REGISTRY_ONLY | outbound traffic will be restricted to services defined in theservice registry as well as those defined through ServiceEntries |
ALLOW_ANY | outbound traffic to unknown destinations will be allowed, in casethere are no services or ServiceEntries for the destination port |
MeshNetworks
MeshNetworks (config map) provides information about the set of networksinside a mesh and how to route to endpoints in each network. For example
MeshNetworks(file/config map):
Field | Type | Description | Required |
---|---|---|---|
networks | map<string, > | The set of networks inside this mesh. Each network shouldhave a unique name and information about how to infer the endpoints inthe network as well as the gateways associated with the network. | Yes |
Network
Network provides information about the endpoints in a routable L3network. A single routable L3 network can have one or more serviceregistries. Note that the network has no relation to the locality of theendpoint. The endpoint locality will be obtained from the serviceregistry.
Field | Type | Description | Required |
---|---|---|---|
endpoints |
| The list of endpoints in the network (obtained through theconstituent service registries or from CIDR ranges). All endpoints inthe network are directly accessible to one another. | Yes |
gateways | IstioNetworkGateway[] | Set of gateways associated with the network. | Yes |
Network.IstioNetworkGateway
The gateway associated with this network. Traffic from remote networkswill arrive at the specified gateway:port. All incoming traffic mustuse mTLS.
Field | Type | Description | Required |
---|---|---|---|
registryServiceName | string (oneof) | A fully qualified domain name of the gateway service. Pilot willlookup the service from the service registries in the network andobtain the endpoint IPs of the gateway from the serviceregistry. Note that while the service name is a fully qualifieddomain name, it need not be resolvable outside the orchestrationplatform for the registry. e.g., this could beistio-ingressgateway.istio-system.svc.cluster.local. | Yes |
address | string (oneof) | IP address or externally resolvable DNS address associated with the gateway. | Yes |
port | uint32 | The port associated with the gateway. | Yes |
locality | string | The locality associated with an explicitly specified gateway (i.e. ip) | No |
Network.NetworkEndpoints
NetworkEndpoints describes how the network associated with an endpointshould be inferred. An endpoint will be assigned to a network based onthe following rules:
Explicitly:
a. By matching the registry name with one of the “fromRegistry”in the mesh config. A “from_registry” can only be assigned to asingle network.
(2) will override (1) if both are present.
Field | Type | Description | Required |
---|---|---|---|
fromCidr | string (oneof) | A CIDR range for the set of endpoints in this network. The CIDRranges for endpoints from different networks must not overlap. | Yes |
fromRegistry | string (oneof) | Add all endpoints from the specified registry into this network.The names of the registries should correspond to the kubeconfig file nameinside the secret that was used to configure the registry (Kubernetesmulticluster) or supplied by MCP server. | Yes |
ProxyConfig defines variables for individual Envoy instances.
ProxyConfig.InboundInterceptionMode
The mode used to redirect inbound traffic to Envoy.This setting has no effect on outbound traffic: iptables REDIRECT is always used foroutbound connections.
Name | Description |
---|---|
REDIRECT | The REDIRECT mode uses iptables REDIRECT to NAT and redirect to Envoy. This mode losessource IP addresses during redirection. |
TPROXY | The TPROXY mode uses iptables TPROXY to redirect to Envoy. This mode preserves both thesource and destination IP addresses and ports, so that they can be used for advancedfiltering and manipulation. This mode also configures the sidecar to run with theCAP_NET_ADMIN capability, which is required to use TPROXY. |
RemoteService
Field | Type | Description | Required |
---|---|---|---|
address | string | Address of a remove service used for various purposes (access logreceiver, metrics receiver, etc.). Can be IP address or a fullyqualified DNS name. | No |
tlsSettings |
| Use the tls_settings to specify the tls mode to use. If the remote serviceuses Istio mutual TLS and shares the root CA with Pilot, specify the TLSmode as ISTIO_MUTUAL . | No |
tcpKeepalive | TcpKeepalive | If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. | No |
Resource
Resource describes the source of configuration
Name | Description |
---|---|
SERVICE_REGISTRY | Set to only receive service entries that are generated by the platform.These auto generated service entries are combination of services and endpointsthat are generated by a specific platform e.g. k8 |
SDS
SDS defines secret discovery service(SDS) configuration to be used by the proxy.For workload, its values are set in sidecar injector(passed as arguments to istio-proxy container).For pilot/mixer, it’s passed as arguments to istio-proxy container in pilot/mixer deployment yaml files directly.
Field | Type | Description | Required |
---|---|---|---|
enabled | bool | True if SDS is enabled. | No |
k8sSaJwtPath | string | Path of k8s service account JWT path. | No |
Tracing
Tracing defines configuration for the tracing performed by Envoy instances.
Field | Type | Description | Required |
---|---|---|---|
zipkin | Zipkin (oneof) | Use a Zipkin tracer. | Yes |
lightstep |
| Use a LightStep tracer. | Yes |
datadog | Datadog (oneof) | Use a Datadog tracer. | Yes |
stackdriver |
| Use a Stackdriver tracer. | Yes |
Tracing.Datadog
Datadog defines configuration for a Datadog tracer.
Field | Type | Description | Required |
---|---|---|---|
address | string | Address of the Datadog Agent. | No |
Tracing.Lightstep
Defines configuration for a LightStep tracer.
Field | Type | Description | Required |
---|---|---|---|
address | string | Address of the LightStep Satellite pool. | No |
accessToken | string | The LightStep access token. | No |
secure | bool | True if a secure connection should be used when communicating with the pool. | No |
cacertPath | string | Path to the trusted cacert used to authenticate the pool. | No |
Stackdriver defines configuration for a Stackdriver tracer.See Opencensus trace config for details.
Tracing.Zipkin
Zipkin defines configuration for a Zipkin tracer.
Field | Type | Description | Required |
---|---|---|---|
address | Address of the Zipkin service (e.g. zipkin:9411). | No |