» connect Stanza

Placement job -> group -> service -> connect

The connect stanza allows configuring various options for Consul Connect. It is valid only within the context of a service definition at the task group level.

 job "countdash" {
   datacenters = ["dc1"]
   group "api" {
     network {
       mode = "bridge"
     }

     service {
       name = "count-api"
       port = "9001"

       connect {
         sidecar_service {}
       }
     }
     task "web" {
         driver = "docker"
         config {
           image = "test/test:v1"
         }
     }
   }
 }

» connect Parameters

» connect Examples

The following example is a minimal connect stanza with defaults and is sufficient to start an Envoy proxy sidecar for allowing incoming connections via Consul Connect.

  connect {
    sidecar_service {}
  }

The following example includes specifying upstreams.

  connect {
     sidecar_service {
       proxy {
         upstreams {
           destination_name = "count-api"
           local_bind_port = 8080
         }
       }
     }
  }

» Limitations

Consul Connect Native services and Nomad variable interpolation are not supported in Nomad 0.10.0.