Search code examples
kubernetesserviceconsul

Restricting communication from a service which is consul connect enabled to non consul connect service through intention?


If we have two service for example

  • Front-end (which is consul-connect enabled)
  • Back-end (which is not consul-connect enabled).

Is it possible to restrict communication between then through intention. Provided we use Consul-Sync from to moved k8s service into consul catalog. Then back-end which is not consul-connect enabled will show in intention. I tried setting deny between Front-end -> Back-end. If not working Front-end is hitting Back-end. I am missing something Or its like Authorization can only happen between two consul-connect enabled service


Solution

  • This question was recently answered in https://stackoverflow.com/a/68432317/12384224.

    Consul intentions are authorization polices that allow you to control access between applications within a service mesh. You must use a sidecar proxy, or natively integrate your application with the mesh, in order to use intentions. They are not applicable if you are only using Consul for service discovery, or your application is not part of the service mesh.