Consul k8s service mesh security

Hi guys,

we are using consul helm with connect inject enabled to configure our service mesh. One of the most important security requirements we have is encryption in transit but also that our services can only be called if the incoming request is authenticated via mTLS. We are also not using native k8s services to ensure that all communication is routed through envoy/consul.

One problem that I observed is that even though all our services call each other through the envoy proxies it is still possible to directly call a service via the IP of the pod. This is a major concern if the service relies on the security provided by consul since an attacker with network access would be able to directly send requests to the service.

Based on what I described my conclusion is that it is not enough to rely on the security provided by the consul which means that every service still needs some kind of authentication on top.

Previously we were using docker swarm and directly built the envoy sidecars into our containers and configured our services to only listen on localhost. This ensured that only the envoy sidecar was reachable from the outside and the service itself was properly isolated.


  1. Is it somehow possible to achieve the same security in k8s while still using connect inject maybe by adding a NetworkPolicy?

  2. Is there a good example how ideally a connect inject enabled pod manifest should look like?

Best regards,

Hi Nico,

On Friday we released a beta version of Consul 1.10 which introduces support for transparent proxying which should address your security concerns. See Release v1.10.0-beta1 · hashicorp/consul · GitHub for a detailed change log and Service Mesh - Kubernetes | Consul by HashiCorp for updated info on deploying the beta with this feature enabled.

Please test this version (in a non-prod environment) and provide us your feedback.



Hi Blake,

that sounds great! I will give it a try

Thanks :slight_smile: