When traffic redirection is not working as expected
1. Confirm the pod has the Envoy sidecar container injected
The application pod should be injected with the Envoy proxy sidecar for traffic redirection to work as expected. Confirm this by ensuring the application pod is running and has the Envoy proxy sidecar container in ready state.
2. Confirm OSM’s init container has finished runnning successfully
OSM’s init container osm-init
is responsible for initializing individual application pods in the service mesh with traffic redirection rules to proxy application traffic via the Envoy proxy sidecar. The traffic redirection rules are set up using a set of iptables
commands that run before any application containers in the pod are running.
Confirm OSM’s init container has finished running successfully by running kubectl describe
on the application pod, and verifying the osm-init
container has terminated with an exit code of 0. The container’s State
property provides this information.
When outbound IP range exclusions are configured
By default, all traffic using TCP as the underlying transport protocol are redirected via the Envoy proxy sidecar container. This means all TCP based outbound traffic from applications are redirected and routed via the Envoy proxy sidecar based on service mesh policies. When outbound IP range exclusions are configured, traffic belonging to these IP ranges will not be proxied to the Envoy sidecar.
If outbound IP ranges are configured to be excluded but being subject to service mesh policies, verify they are configured as expected.
1. Confirm outbound IP ranges are correctly configured in the osm-mesh-config
MeshConfig resource
Confirm the outbound IP ranges to be excluded are set correctly:
The output shows the IP ranges that are excluded from outbound traffic redirection, ["1.1.1.1/32","2.2.2.2/24"]
in the example above.
2. Confirm outbound IP ranges are included in init container spec
When outbound IP range exclusions are configured, OSM’s osm-injector
service reads this configuration from the osm-mesh-config
MeshConfig
resource and programs iptables
rules corresponding to these ranges so that they are excluded from outbound traffic redirection via the Envoy sidecar proxy.
Confirm OSM’s osm-init
init container spec has rules corresponding to the configured outbound IP ranges to exclude.
In the example above, the following iptables
commands are responsible for explicitly ignoring the configured outbound IP ranges (1.1.1.1/32 and 2.2.2.2/24
) from being redirected to the Envoy proxy sidecar.
When outbound port exclusions are configured
By default, all traffic using TCP as the underlying transport protocol are redirected via the Envoy proxy sidecar container. This means all TCP based outbound traffic from applications are redirected and routed via the Envoy proxy sidecar based on service mesh policies. When outbound port exclusions are configured, traffic belonging to these ports will not be proxied to the Envoy sidecar.
If outbound ports are configured to be excluded but being subject to service mesh policies, verify they are configured as expected.
1. Confirm global outbound ports are correctly configured in the osm-mesh-config
MeshConfig resource
Confirm the outbound ports to be excluded are set correctly:
The output shows the ports that are excluded from outbound traffic redirection, [6379,7070]
in the example above.
2. Confirm pod level outbound ports are correctly annotated on the pod
Confirm the outbound ports to be excluded on a pod are set correctly:
The output shows the ports that are excluded from outbound traffic redirection on the pod, 8080
in the example above.
3. Confirm outbound ports are included in init container spec
When outbound port exclusions are configured, OSM’s osm-injector
service reads this configuration from the osm-mesh-config
MeshConfig
resource and from the annotations on the pod, and programs iptables
rules corresponding to these ranges so that they are excluded from outbound traffic redirection via the Envoy sidecar proxy.
Confirm OSM’s osm-init
init container spec has rules corresponding to the configured outbound ports to exclude.
In the example above, the following iptables
commands are responsible for explicitly ignoring the configured outbound ports (6379, 7070 and 8080
) from being redirected to the Envoy proxy sidecar.
When network interface exclusions are configured
By default, all traffic using TCP as the underlying transport protocol are redirected via the Envoy proxy sidecar container. This means all TCP based outbound traffic from applications are redirected and routed via the Envoy proxy sidecar based on service mesh policies. When network interface exclusions are configured, traffic belonging to these network interfaces will not be proxied to the Envoy sidecar.
If you have network interfaces that are subjected to mesh policies, verify their configuration to ensure they are properly excluded.
1. Confirm network interfaces are correctly configured in the osm-mesh-config
MeshConfig resource
Confirm the network interfaces to be excluded are set correctly:
The output shows the network interfaces that are excluded from outbound traffic redirection, ["net1","net2"]
in the example above.
2. Confirm network interfaces are included in init container spec
When network interface exclusions are configured, OSM’s osm-injector
service reads this configuration from the osm-mesh-config
MeshConfig
resource and programs iptables
rules corresponding to these ranges so that they are excluded from traffic redirection via the Envoy sidecar proxy.
Confirm OSM’s osm-init
init container spec has rules corresponding to the configured network interfaces to exclude.
In the example above, the following iptables
commands are responsible for explicitly ignoring the configured network interfaces (net1 and net2
) from being redirected to the Envoy proxy sidecar.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.