Courseiva

CCNA Service Mesh With Consul Connect Questions

55 questions · Service Mesh With Consul Connect · All types, answers revealed

1
MCQeasy

A developer is deploying a new service called 'inventory' with a Connect sidecar proxy. They want to verify that the sidecar is running and registered correctly. Which command should they use to check the status of the Connect-enabled service?

A.consul catalog nodes -service=inventory
B.consul health service inventory
C.consul services status inventory
D.consul connect status inventory
AnswerB

The 'consul health service' command displays the health checks associated with a service, including the sidecar proxy if it is registered as a service. For a Connect-enabled service, the sidecar proxy is registered as a separate service named 'inventory-sidecar-proxy'. Running 'consul health service inventory' shows the health of the main service, and you can also check the sidecar proxy's health. This command is the standard way to verify service and proxy status.

Why this answer

To check the status of a Connect-enabled service, you should use 'consul health service' because it returns the health checks for the service and its sidecar proxy. The sidecar proxy is registered as a separate service, so you can also query it directly. Commands like 'consul catalog nodes' only show node placement, not health or proxy status.

Exam trap

The trap here is assuming there is a dedicated 'consul connect status' command or that 'consul services status' exists, when in fact health checks are queried via 'consul health service'.

2
MCQhard

An operator manages a Consul 1.15 cluster where Connect is enabled and mTLS is active. They need to rotate the Connect CA root certificate for the datacenter. The new root must be distributed to all sidecar proxies without dropping existing connections, and the old root must remain trusted during the transition. Which sequence of actions accomplishes this?

A.Disable Connect, replace the CA, re-enable Connect, and re-register all services with new sidecar proxies.
B.Use 'consul connect ca set-config' to update the root certificate and private key, then restart all sidecar proxies to pick up the new root.
C.Generate a new CA, cross-sign the new intermediate with the old root, update the CA configuration with the cross-signed bundle, then allow proxies to rotate leaf certificates via the existing CA provider.
D.Set 'connect.enable_mtls' to false, update the CA, then set it back to true to force proxies to fetch new certificates.
AnswerC

Cross-signing the new intermediate with the old root creates a chain of trust that both old and new proxies can validate. Updating the CA configuration with the bundle lets Consul distribute the new root while the old root remains trusted. Leaf certificates are rotated automatically by the CA provider, so existing connections are not forcibly broken and the transition is seamless.

Why this answer

The safe rotation path uses cross-signing: the new intermediate is signed by the old root so both roots are trusted during the transition. Updating the CA configuration with the cross-signed bundle lets Consul distribute the new root, and leaf certificates rotate automatically through the CA provider. This avoids downtime and preserves existing connections, unlike replacing the root outright or toggling mTLS.

Exam trap

The trap here is thinking that updating the CA root directly is sufficient, when existing proxies would reject the new chain unless the old root remains trusted via cross-signing.

3
MCQmedium

You are configuring a Consul Connect service mesh and need to enable mTLS for all services in the datacenter. Which configuration setting must be enabled in the Consul server agent configuration to turn on Connect and enforce mTLS globally?

A.connect { enabled = true }
B.tls { defaults { verify_incoming = true } }
C.ports { https = 8501 }
D.acl { enabled = true, default_policy = "deny" }
AnswerA

The 'connect' stanza with 'enabled = true' in the Consul agent configuration enables the Connect feature on that agent. When enabled on servers, it allows the datacenter to issue and manage certificates for Connect. This is the correct setting to globally enable Connect and mTLS. Without it, Connect features are not active.

Why this answer

To enable Consul Connect and mTLS globally, the 'connect' stanza with 'enabled = true' must be set in the Consul agent configuration, typically on all servers and clients. This activates the Connect subsystem, allowing services to obtain certificates and use sidecar proxies. Other settings like TLS verification for the agent, HTTPS port, or ACLs do not enable Connect.

Exam trap

The trap here is confusing Consul agent TLS settings with Connect mTLS, assuming that enabling TLS for the agent automatically enables service mesh encryption.

4
Multi-Selecteasy

Which TWO of the following are benefits of using Consul Connect?

Select 2 answers
A.Centralized authorization policies.
B.Automatic mTLS management.
C.Increased application latency.
D.Elimination of firewalls.
E.Automatic database replication.
AnswersA, B

Intentions provide this.

Why this answer

Consul Connect is HashiCorp's service mesh feature, and one of its core benefits is centralized authorization policies (Option A): intentions define which services may communicate with which others, and these policies are managed centrally in Consul and enforced by sidecar proxies, giving consistent, identity-based access control across the mesh. Option B is also correct because Consul Connect automatically manages mTLS: it provides built-in certificate authority functionality that issues, rotates, and distributes certificates to sidecar proxies, so service-to-service traffic is encrypted and mutually authenticated without application changes. Option C is wrong because Connect's sidecar proxies add only minimal overhead and are not intended to increase latency as a benefit.

Option D is wrong because firewalls are still required for network segmentation and host-level security; Connect complements rather than eliminates them. Option E is wrong because Consul Connect is a service mesh for secure service communication, not a database replication tool.

Exam trap

Consul 1.15 often tests the core benefits of Connect versus its operational costs, so candidates might mistakenly select 'elimination of firewalls' as a benefit when it's actually a misconception.

5
MCQmedium

Which command displays all active intentions in the Consul mesh?

A.consul connect intentions
B.consul kv get intentions
C.consul intention list
D.consul services intentions
AnswerC

`consul intention list` queries the intention endpoint directly, returning every active intention across the mesh with source, destination and action. It satisfies the stem's requirement to display all active intentions without filtering by service name, unlike `consul intention check`, which tests a single source-destination pair.

Why this answer

The command 'consul intention list' displays all active intentions in the Consul mesh. Intentions define which services are allowed to communicate with which other services when Connect is enabled. The list command shows the source, destination, action (allow/deny), and precedence.

Exam trap

Consul 1.15 often tests the exact CLI syntax for intentions; candidates may confuse 'consul intention' with 'consul connect' or 'consul services', leading to invalid commands.

How to eliminate wrong answers

Option A is wrong because 'consul connect intentions' is not a valid command; 'consul connect' has subcommands like 'envoy', 'proxy', but not 'intentions'. Option B is wrong because 'consul kv get intentions' would attempt to retrieve a key named 'intentions' from the KV store, which is unrelated to intentions. Option D is wrong because 'consul services intentions' is not a valid command; 'consul services' has subcommands like 'register', 'deregister', but not 'intentions'.

6
Multi-Selecteasy

Which TWO are common use cases for Consul Connect?

Select 2 answers
A.Managing server hardware.
B.Creating virtual machines.
C.Zero-trust networking.
D.Secure service-to-service communication.
E.Configuring network switches.
AnswersC, D

Consul Connect enforces mutual TLS between services, issuing SPIFFE-based identities via its built-in CA, so every connection is authenticated and encrypted regardless of network location. That satisfies zero-trust networking, where trust derives from verified service identity rather than perimeter defences.

Why this answer

Consul Connect is HashiCorp's service mesh feature within Consul, and option C (Zero-trust networking) is correct because Connect enforces identity-based authorization via mutual TLS (mTLS) between services, so no service is trusted by default based on network location. Option D (Secure service-to-service communication) is also correct because Connect provides automatic mTLS encryption, sidecar proxies (Envoy), and intention-based access control for east-west traffic between services. Options A (Managing server hardware), B (Creating virtual machines), and E (Configuring network switches) are incorrect because those are infrastructure provisioning and physical/virtual network device tasks handled by tools like Terraform, hypervisors, or switch management software, not by Consul Connect's service mesh capabilities.

7
MCQeasy

What is the function of the 'consul intention check' command?

A.To list all intentions.
B.To verify if traffic is allowed between two services.
C.To create a new intention.
D.To delete an intention.
AnswerB

The `consul intention check` command evaluates the intention rules governing a connection between a specified source and destination service, returning whether that traffic is permitted or denied. It directly satisfies the stem's requirement to verify authorisation between two services, without modifying any configuration.

Why this answer

The 'consul intention check' command verifies whether traffic is allowed between two services based on the current intentions. It takes a source and destination service and returns whether the connection is allowed or denied, along with the matching intention. This is useful for troubleshooting connectivity issues in the mesh.

Exam trap

Consul 1.15 often tests the difference between 'consul intention check' and other intention subcommands; candidates may confuse it with 'list' or 'create' due to similar naming.

How to eliminate wrong answers

Option A is wrong because listing all intentions is done with 'consul intention list', not 'check'. Option C is wrong because creating a new intention is done with 'consul intention create', not 'check'. Option D is wrong because deleting an intention is done with 'consul intention delete', not 'check'.

8
MCQmedium

A platform team runs Consul 1.15 with Connect enabled. Their service 'api' is registered with a sidecar proxy, and its upstream 'database' is also mesh-enabled. The team wants 'api' to resolve 'database' through the mesh without hard-coding an IP address in the application. Which configuration in the service registration enables the sidecar to expose a stable local listener for the upstream?

A.Define a 'connect' block in the 'database' service registration with a 'sidecar_service' stanza.
B.Create a service-resolver config entry that maps 'database' to a fixed IP address.
C.Add an 'upstreams' block inside api's 'connect.sidecar_service' stanza with a 'destination_name' of 'database'.
D.Register 'database' with a 'tagged_addresses' entry containing a LAN address.
AnswerC

Upstreams are declared on the consuming service's sidecar proxy. Specifying destination_name (and optionally a local_bind_port) instructs the sidecar to open a local listener that forwards to the database through the mesh, so the application uses a stable local address rather than a hard-coded IP.

Why this answer

For a mesh-enabled consumer, upstreams are declared on the consuming service's sidecar proxy. The upstream block names the destination service and optionally sets a local bind port, causing the sidecar to listen locally and forward to the destination over the mesh. This gives the application a stable local address and avoids hard-coded IPs.

Exam trap

The trap here is assuming that the destination service's registration creates the client-side listener, when upstreams must be declared on the consuming service's sidecar.

9
MCQhard

A security team requires that a service 'reporting' only accept connections from services presenting a valid mesh certificate issued by the Connect CA, and that all other traffic be rejected. They have registered reporting with a sidecar proxy. Which combination ensures this behavior?

A.Set 'protocol' to 'tcp' in a service-defaults entry and create a deny intention for all other services.
B.Rely on the default deny behavior of intentions and create allow intentions only for the intended callers.
C.Create a wildcard allow intention for all sources, then use ACLs to restrict which services can obtain a certificate.
D.Disable TLS verification on the sidecar by setting verify_outgoing to false.
AnswerB

Connect uses a default-deny posture for inbound mesh traffic, so a service with a sidecar rejects any connection that is not explicitly authorized by an intention. Creating allow intentions for the specific callers grants exactly the required access. The sidecar also requires mTLS, so callers without a valid Connect certificate cannot complete the handshake in the first place.

Why this answer

Connect's built-in default-deny behavior means a sidecar rejects any inbound connection without a matching allow intention, and mTLS ensures only holders of valid Connect certificates can attempt the handshake. Explicit allow intentions for the intended callers complete the configuration. Protocol settings, agent TLS flags, and wildcard allows do not provide the required selective access.

Exam trap

The trap here is thinking that a deny rule is needed for every unwanted caller, when Connect already denies by default and only allow intentions are required.

10
MCQeasy

A service 'inventory' is registered in Consul 1.15 with Connect enabled. You need to verify that the sidecar proxy for 'inventory' is running and healthy. Which command should you use?

A.consul health service inventory-sidecar-proxy
B.consul connect proxy -sidecar-for inventory
C.consul services status inventory
D.consul intention check inventory
AnswerA

The sidecar proxy for a service named 'inventory' is registered as 'inventory-sidecar-proxy'. The 'consul health service' command queries the health of a specific service, returning checks and node information. This directly verifies that the sidecar proxy is running and healthy, which is the required task.

Why this answer

Consul registers a sidecar proxy for each Connect-enabled service with a naming convention of '<service>-sidecar-proxy'. The 'consul health service' command retrieves the health checks and status for that proxy, confirming it is running and passing checks. This is the standard way to verify sidecar health in Consul.

Exam trap

The trap here is using the service name without the '-sidecar-proxy' suffix, which would check the application service rather than its sidecar proxy.

11
MCQmedium

You are operating a Consul 1.15 cluster with Connect enabled. A service named 'api' is registered with a sidecar proxy. You need to ensure that only the 'web' service can initiate connections to 'api'. You have created an intention that allows 'web' to connect to 'api', but you have not created any other intentions. What is the default behavior for other services trying to connect to 'api'?

A.They are allowed because the default intention behavior is 'allow'.
B.They are allowed only if they have a valid mesh certificate.
C.They are denied only if the 'api' service has a specific intention denying them.
D.They are denied because the default intention behavior is 'deny'.
AnswerD

Consul Connect uses a default-deny model for intentions. When no intention explicitly allows a connection, it is denied. In this scenario, only 'web' is allowed to connect to 'api', so all other services are denied by default. This ensures a secure zero-trust network. The default behavior applies unless overridden by a higher-priority intention or a wildcard allow.

Why this answer

In Consul Connect, intentions are deny by default. When you create an intention allowing 'web' to connect to 'api', that is the only allowed path. All other services are denied because there is no intention permitting them.

This default-deny model is fundamental to Consul's security posture, ensuring that only explicitly authorized services can communicate, which reduces the attack surface.

Exam trap

The trap here is assuming that because one intention allows a connection, other connections are also allowed unless explicitly denied, when in fact the default is deny.

12
MCQeasy

What does the 'kind' field in a service definition specify for a Consul Connect service?

A.The proxy type (e.g., 'connect-proxy').
B.The service version.
C.The datacenter location.
D.The language of the application.
AnswerA

The `kind` field declares the service registration type, with `connect-proxy` marking a sidecar proxy instance rather than a standard service. This satisfies Consul's requirement to distinguish proxy registrations from application services, enabling Connect to route traffic through the correct proxy for mTLS enforcement.

Why this answer

In a Consul Connect service definition, the `kind` field declares the type of service registration — most commonly `connect-proxy` for a sidecar proxy, but also `connect-native`, `terminating-gateway`, `ingress-gateway`, and `mesh-gateway`. It tells Consul how to treat the service in the service mesh, not what version or language it is. This is required for proxies and gateways so Consul can wire them into the mesh correctly.

Exam trap

The trap is assuming `kind` describes metadata like version or environment; it actually declares the service's mesh role, and confusing it with tags or meta causes wrong answers.

How to eliminate wrong answers

Option B is wrong because service version is expressed via `meta` or tags, not `kind`. Option C is wrong because datacenter placement is determined by the agent's `datacenter` configuration, not a service-level field. Option D is wrong because the application language is irrelevant to Consul's service model — Consul is language-agnostic and only cares about the service's role in the mesh.

13
Multi-Selecthard

Which TWO of the following are features of Consul Connect native integration?

Select 2 answers
A.The app handles its own mTLS handshake.
B.The app uses the Consul agent API to obtain certificates.
C.The app must be written in Go.
D.The sidecar proxy is still required for routing.
E.It supports only non-secure traffic.
AnswersA, B

Consul Connect native integration embeds the mTLS handshake directly into the application, which manages its own certificates and identity rather than delegating to a sidecar proxy. This app-managed handshake is the defining feature distinguishing native integration from proxy-based service mesh.

Why this answer

Consul Connect native integration means the application itself participates directly in the service mesh rather than relying on a sidecar proxy, so option A is correct: the app performs its own mTLS handshake to establish mutually authenticated, encrypted connections with other services. Option B is also correct because a natively integrated app uses the Consul agent's local HTTP API (e.g., the /v1/agent/connect/ca/leaf/ endpoint) to obtain its leaf certificate and CA roots for that mTLS handshake. Option C is wrong because native integration is language-agnostic — Consul provides client libraries for multiple languages and the API can be called from any runtime, not just Go.

Option D is wrong because the whole point of native integration is that no sidecar proxy is required for routing or encryption. Option E is wrong because native integration specifically enables secure mTLS traffic, not merely non-secure traffic.

Exam trap

The trap here is confusing native integration with sidecar proxy integration: candidates might think a sidecar is always required or that native integration is language-specific, but the key is that the app itself handles mTLS and uses the Consul API for certificates.

14
Multi-Selecthard

Which THREE factors influence the mTLS handshake in a Consul Connect mesh?

Select 3 answers
A.The identity certificate issued to the service.
B.The CA root certificate.
C.The trust bundle.
D.The intention status.
E.The service health check result.
AnswersA, B, C

The identity certificate, issued by Consul's CA to the service, supplies the client or server leaf credential presented during the TLS exchange. Its embedded SPIFFE URI determines the peer identity verified against intentions, directly shaping the mTLS handshake outcome.

Why this answer

In Consul Connect, the mTLS handshake is driven by the cryptographic material each side presents and validates: option A, the identity certificate issued to the service, is the leaf certificate (with SPIFFE-style URI SAN) that the sidecar proxy presents to prove its service identity, so it directly determines the handshake. Option B, the CA root certificate, is the anchor both proxies use to verify the peer's leaf certificate chain, making it essential to the handshake's trust decision. Option C, the trust bundle, is the set of CA certificates (including roots and any intermediates) that Consul distributes to proxies so they can validate certificates during the handshake, especially across CA rotations.

Option D, the intention status, is enforced by the sidecar proxy as an authorization decision after/around connection establishment and does not alter the TLS handshake cryptography. Option E, the service health check result, affects service discovery and routing but is not part of the mTLS handshake itself.

Exam trap

The trap is confusing authentication (mTLS handshake) with authorization (intentions); candidates may think intentions affect the handshake, but they are evaluated after the TLS connection is established.

15
MCQeasy

A developer needs to see which intentions currently govern traffic between services in a Consul 1.15 datacenter. Which command lists all intentions stored in the catalog?

A.consul connect intentions
B.consul intention check
C.consul intention list
D.consul catalog services -intentions
AnswerC

The consul intention list command queries the intention endpoint and prints every intention in the current datacenter, including source, destination, action, and precedence metadata. It is the direct, read-only way to audit mesh authorization rules. Operators use it to confirm that expected allow or deny rules exist before troubleshooting connectivity.

Why this answer

Intentions are managed through the consul intention command family, and the list subcommand returns all stored rules for the datacenter. Commands that inspect the catalog or test a single source-destination pair do not enumerate the full set of authorization rules. For a complete audit, listing intentions is the correct operation.

Exam trap

The trap here is confusing the intention check command, which evaluates one source-destination pair, with the intention list command that enumerates every stored rule.

16
MCQeasy

Which of the following is a key feature of Consul Connect's intentions?

A.Global load balancing.
B.Certificate rotation.
C.Traffic splitting.
D.Service authorization (allow/deny).
AnswerD

Intentions enforce service-to-service authorisation by evaluating allow or deny rules against the source and destination service identities in a mutual TLS session. This directly satisfies the stem's requirement for service authorization, since Consul Connect uses intentions as its mechanism for permitting or refusing connections between services.

Why this answer

Consul Connect's intentions define which services are allowed to communicate with which other services. They are essentially authorization policies that allow or deny connections based on service identity. Intentions are a core feature for enforcing zero-trust security in a service mesh.

Exam trap

Consul exams often test the distinction between intentions (authorization) and other Connect features like traffic splitting or certificate management, tricking candidates into selecting features that are not part of intentions.

How to eliminate wrong answers

Option A is wrong because global load balancing is a feature of service discovery and traffic management, not intentions. Option B is wrong because certificate rotation is handled by Consul's built-in CA and is not a feature of intentions. Option C is wrong because traffic splitting is a feature of service resolvers and routers in Consul's traffic management, not intentions.

17
MCQmedium

You are configuring Consul Connect for a service named 'payments'. You want to allow incoming connections only from services that present a valid client certificate from a specific CA and also enforce that the source service is 'checkout'. What combination of Consul features should you use?

A.Configure an intention with source 'checkout' and action 'allow', and enable mutual TLS in the mesh.
B.Enable ACLs with a token that has 'service:write' for 'payments' and distribute it only to 'checkout'.
C.Configure a service resolver with a subset that includes only 'checkout' and set the default subset to that.
D.Use a network segment to isolate 'payments' and a firewall rule to allow only 'checkout'.
AnswerA

Intentions enforce service-to-service authorization based on service identity, and mTLS ensures that only services with valid certificates from the Consul CA can establish connections. This combination restricts incoming traffic to 'checkout' while requiring certificate validation, meeting both requirements.

Why this answer

To restrict incoming connections to a specific source service, Consul intentions are the correct mechanism. They define which services are allowed to connect based on service identity. Enabling mTLS ensures that connections are authenticated with certificates issued by Consul's CA, providing encryption and identity verification.

Together, they enforce that only 'checkout' can connect to 'payments' and that the connection is secure.

Exam trap

The trap here is confusing network-level controls (firewalls, segments) or ACLs with service-level authorization, which in Consul Connect is handled by intentions and mTLS.

18
MCQhard

What is the primary benefit of using a Mesh Gateway in a Consul Connect architecture?

A.It enables communication between services in different datacenters.
B.It encrypts traffic at the storage layer.
C.It improves local mTLS performance.
D.It provides load balancing for local services.
AnswerA

Mesh gateways provide a single entry point that routes Consul Connect traffic between datacenters, letting services in separate datacenters reach each other without direct network peering or sidecar-to-sidecar links across WAN boundaries. This satisfies the stem's cross-datacenter communication requirement, unlike ingress gateways, which only expose services within one datacenter.

Why this answer

Mesh gateways provide a single point of ingress/egress for cross-datacenter traffic, reducing the need for direct cross-DC networking.

19
MCQeasy

A developer registers a service called 'web' with a sidecar proxy in a Consul 1.15 datacenter. The service needs to call a backend service named 'api' through the mesh. The developer adds an upstream block to the 'web' service definition pointing to 'api' on port 8080. What does this upstream configuration accomplish for the 'web' sidecar proxy?

A.It configures the 'web' sidecar to accept inbound connections from 'api' on port 8080.
B.It enables mTLS between 'web' and 'api' by generating a shared certificate for both services.
C.It creates a local listener on the 'web' sidecar that forwards traffic to an 'api' proxy instance on port 8080.
D.It registers 'api' as a dependency in the Consul catalog so that 'web' can discover its IP address directly.
AnswerC

An upstream entry causes the web sidecar to open a local port that the web application connects to. The sidecar then forwards that traffic through the mesh to a healthy api proxy instance, using the port specified in the upstream. This decouples the application from service discovery and lets Connect handle mTLS and load balancing.

Why this answer

Upstreams are declared in the calling service's definition and cause its sidecar proxy to open a local listener. The application connects to that local port, and the proxy forwards traffic to a healthy instance of the upstream service through the mesh. This provides service discovery, mTLS, and load balancing without the application knowing backend addresses.

Exam trap

The trap here is reversing the direction, assuming an upstream controls inbound access rather than outbound connectivity from the local service.

20
MCQmedium

A developer notices that the application process in a Connect-enabled pod connects to 127.0.0.1:8080 to reach an upstream, but the sidecar proxy's actual listener was assigned a different port. The application is failing to reach the upstream. Which action should the developer take to provide a predictable local address for the upstream?

A.Change the application to connect to the upstream service's registered LAN address directly.
B.Add a 'port' field to the upstream block that matches the destination service's port.
C.Set 'local_bind_port' in the upstream definition to 8080 and restart the sidecar.
D.Register the application with a 'tagged_addresses' entry pointing to the sidecar's port.
AnswerC

The local_bind_port field fixes the port on which the sidecar listens for that upstream. Assigning 8080 makes the application's hard-coded address valid. After updating the registration and restarting the sidecar, the listener binds to the chosen port and forwards to the upstream over the mesh.

Why this answer

Upstream listeners are configured per consuming sidecar. When no local bind port is specified, Consul chooses an ephemeral port, which breaks applications that assume a fixed address. Explicitly setting local_bind_port to the expected value gives the application a stable local endpoint that the sidecar forwards over the mesh.

Exam trap

The trap here is assuming the sidecar always listens on the destination service's port, when without local_bind_port it picks an ephemeral port instead.

21
MCQhard

You need to perform a canary deployment for a service. What Consul feature should you use?

A.Service splitting via Service Resolver.
B.KV store manual updates.
C.Intentions.
D.Service mesh gateway.
AnswerA

Service splitting uses a service resolver with a splitter configuration to route a defined percentage of traffic to the canary subset while the remainder goes to the stable version, satisfying the gradual, controlled traffic-shifting constraint of a canary deployment.

Why this answer

Consul's service resolver supports service splitting, which allows you to define weighted subsets of service instances for canary deployments. By configuring a service resolver with a split, you can direct a percentage of traffic to a new version (canary) while the rest goes to the stable version. This is the intended feature for gradual rollouts.

Other options like KV store updates, intentions, and mesh gateways do not provide traffic splitting capabilities.

Exam trap

Consul 1.15 often tests the specific features for traffic management, so candidates might choose intentions or gateways thinking they control traffic, but only service resolver provides splitting.

How to eliminate wrong answers

Option B is wrong because manually updating the KV store does not automatically route traffic; it would require custom logic in the application or proxy to read the KV and adjust routing, which is not a built-in feature. Option C is wrong because intentions are for authorization (allowing or denying connections) and do not control traffic distribution. Option D is wrong because a service mesh gateway is for enabling cross-datacenter or external connectivity, not for splitting traffic between versions.

22
Multi-Selecteasy

Which TWO of the following are valid ways to configure Consul Connect?

Select 2 answers
A.Directly modifying the Envoy binary.
B.Modifying the Consul source code.
C.Editing the agent binary.
D.JSON service definition files.
E.Consul HTTP API.
AnswersD, E

Consul accepts JSON service definition files as a first-class configuration method, loaded via the agent's config directory or the /agent/service/register endpoint. This satisfies the stem's requirement for a valid Connect configuration mechanism alongside HCL definitions.

Why this answer

Option D (JSON service definition files) is correct because Consul Connect is configured by declaring a service with a `connect` block (e.g., `"connect": {"sidecar_service": {}}`) inside a service registration JSON file, which the agent reads to enable the sidecar proxy and intentions. Option E (Consul HTTP API) is correct because the same service registration, including the `connect` stanza, can be submitted programmatically via the `/v1/agent/service/register` endpoint, and intentions can be managed through the `/v1/connect/intentions` endpoints. Options A, B, and C are not valid configuration methods: modifying the Envoy binary, the Consul source code, or the agent binary are unsupported hacks that alter the software itself rather than configuring Connect through its documented interfaces, and they would break upgrades and support.

Exam trap

Consul exams often test the supported configuration methods for Connect, tricking candidates into selecting unsupported methods like modifying binaries or source code.

23
MCQhard

A platform team is running Consul Connect with Envoy sidecar proxies. They need to ensure that a service named 'payments' can only be accessed by services in the 'frontend' namespace, and all other access must be denied. They have Consul Enterprise with namespaces enabled. Which intention configuration achieves this requirement with the least administrative overhead?

A.Create an intention that allows 'frontend/*' to 'payments' and set the default intention behavior to deny.
B.Use a service-resolver configuration to restrict access to 'payments' based on the source namespace.
C.Configure the Envoy proxy for 'payments' with a network filter that allows only traffic from the 'frontend' namespace.
D.Create an intention that denies all sources to 'payments', then create individual allow intentions for each service in the 'frontend' namespace.
AnswerA

Using a wildcard source intention for the 'frontend' namespace allows all services within that namespace to access 'payments', while setting the default intention behavior to deny ensures that any other source is blocked. This is efficient because it requires only one intention and a global default, rather than creating individual intentions for every service in the frontend namespace. It leverages Consul Enterprise namespaces to group services logically.

Why this answer

The most efficient way to allow only services from the 'frontend' namespace to access 'payments' is to create a single intention that allows 'frontend/*' to 'payments', and set the default intention behavior to deny. This leverages Consul Enterprise namespaces and wildcard intentions to minimize the number of intentions required. Other options either require many intentions, use the wrong feature, or are not supported.

Exam trap

The trap here is assuming that service-resolver or Envoy filters can enforce authorization, when intentions are the dedicated mechanism for service-to-service access control.

24
MCQeasy

A platform team is deploying a new service 'payments' on a Consul 1.15 cluster with Connect enabled. They want to ensure that only the 'checkout' service can initiate connections to 'payments', and all other services are denied by default. Which intention should they create?

A.An intention from '*' to 'payments' with action 'allow', and an intention from 'checkout' to 'payments' with action 'deny'.
B.An intention from '*' to 'payments' with action 'deny', and an intention from 'checkout' to 'payments' with action 'allow'.
C.An intention from 'payments' to 'checkout' with action 'deny', and an intention from 'checkout' to 'payments' with action 'allow'.
D.An intention from 'checkout' to 'payments' with action 'allow', and no other intentions.
AnswerB

Creating a wildcard deny intention for all sources to 'payments' blocks any service by default. Then a specific allow intention for 'checkout' to 'payments' overrides the deny for that source. Consul evaluates intentions with specificity, so the more specific allow takes precedence. This achieves the desired least-privilege access control.

Why this answer

Consul intentions are evaluated based on specificity, with exact matches taking precedence over wildcards. A wildcard deny intention sets a default deny posture for the destination service, while a specific allow intention grants access to the authorized source. This pattern enforces least privilege and is a common security practice in Consul Connect.

Exam trap

The trap here is forgetting that Consul's default intention behavior is to allow, so a wildcard deny is required to block unauthorized services.

25
MCQhard

A team is running Consul 1.15 with Connect and wants to expose a TCP service through an ingress gateway so external clients can reach it over mTLS. They define the gateway and a listener on port 8443. External clients report TLS handshake failures. The gateway logs show no matching certificate. Which configuration element must be present for the listener to serve TLS?

A.A TLS certificate and private key must be provided for the listener, either inline or via an SDS or file reference.
B.The gateway's service registration must include the 'connect: { gateway: {} }' stanza and a matching intention for the external client.
C.The listener must set 'protocol = "tcp"' and rely on the client to perform mTLS directly to the backend service.
D.The listener must reference a service-resolver that includes a 'tls' subset before it can accept TLS connections.
AnswerA

Ingress gateway listeners that terminate TLS require a server certificate and key. Without them the listener cannot complete the handshake, which matches the observed failures. Consul can source these from inline configuration, a file path, or an external SDS provider such as Vault, and the gateway then presents the certificate to clients.

Why this answer

Ingress gateway listeners that terminate TLS must be given a certificate and private key. Consul supports inline certificates, file-based references, and SDS integrations such as Vault. Without this material the gateway cannot complete the TLS handshake, producing the handshake failures and missing-certificate log entries.

Routing and intention configuration are separate concerns from certificate provisioning.

Exam trap

The trap here is assuming that registering the gateway and defining intentions is sufficient, when TLS termination additionally requires explicit certificate material.

26
MCQhard

When configuring mTLS in Consul Connect, how are certificates distributed to the sidecar proxies?

A.They are hardcoded in the service definition.
B.Via an external secret management service only.
C.The agent fetches them from the server and provides them via the Envoy xDS API.
D.Via a shared disk volume.
AnswerC

Consul's client agent obtains the leaf certificate and key from the server via the Connect CA, then serves them to the local Envoy sidecar through the xDS API. This satisfies the requirement that certificates reach proxies without manual distribution.

Why this answer

In Consul Connect mTLS, the Consul agent on each node acts as the local certificate authority client: it fetches leaf certificates and the CA bundle from the Consul servers and delivers them to the sidecar proxy (Envoy) dynamically through the xDS API. This means certificates are rotated automatically without restarting the proxy or editing service definitions.

Exam trap

Consul 1.15 often tests the mTLS distribution path — the trap is assuming certificates are configured statically or via an external vault, when in fact the agent-to-Envoy xDS/SDS channel is the native mechanism.

How to eliminate wrong answers

Option A is wrong because hardcoding certificates in a service definition would break automatic rotation and expose private keys in config files, which Consul Connect explicitly avoids. Option B is wrong because while external secret managers can be integrated, Consul Connect's native mTLS does not require or default to an external secrets service — the built-in CA handles issuance. Option D is wrong because sharing certificates via a disk volume is insecure and not how Connect distributes identities; each proxy gets its own SPIFFE-based leaf cert delivered over the local agent's xDS stream.

27
MCQmedium

You have a service that needs to talk to a service in a different datacenter. What configuration is required?

A.Direct VPC peering.
B.An external service definition.
C.A global intention.
D.A mesh gateway deployment.
AnswerD

Cross-datacenter service-to-service traffic traverses the WAN through mesh gateways, which proxy Consul's mTLS connections between datacenters. Deploying a mesh gateway in each datacenter is required so the local sidecar can reach the remote service without direct network peering.

Why this answer

To allow services in different datacenters to communicate over Consul's service mesh, you must deploy a mesh gateway in each datacenter. Mesh gateways proxy mTLS traffic between datacenters, enabling sidecar proxies to reach services in remote datacenters without direct network peering. Without a mesh gateway, cross-datacenter service-to-service traffic cannot traverse the WAN through Consul's mesh.

Exam trap

The trap here is confusing authorization (intentions) with connectivity (mesh gateways); candidates often pick 'global intention' because it sounds like it enables cross-datacenter communication, but intentions only permit or deny traffic that already has a path.

How to eliminate wrong answers

Option A is wrong because VPC peering is a network-layer solution that does not integrate with Consul's identity-based mTLS mesh and is not required by Consul itself. Option B is wrong because an external service definition registers a service that lives outside Consul, not a mechanism for cross-datacenter mesh traffic. Option C is wrong because a global intention controls authorization between services across datacenters but does not provide the data path; you still need a mesh gateway for the traffic to flow.

28
MCQhard

If you are using SPIRE for certificate management, how does this interact with Consul Connect?

A.Consul Connect can delegate CA operations to an external provider like SPIRE.
B.Only static certificates can be used.
C.Consul must be disabled.
D.SPIRE replaces the Consul agent.
AnswerA

Consul Connect's CA interface is pluggable, so it can delegate certificate signing and issuance to an external provider such as SPIRE rather than using the built-in CA. This lets SPIRE-issued identities secure service mesh mTLS without replacing Connect.

Why this answer

Consul Connect supports pluggable CA providers, and SPIRE is one of the supported external CA integrations. When configured, Consul delegates certificate signing and issuance for service mesh identities to SPIRE, allowing organizations already standardized on SPIFFE/SPIRE to unify workload identity across Consul and non-Consul workloads.

Exam trap

The trap is thinking external CA integration replaces Consul components — candidates assume SPIRE substitutes for the Consul agent or disables Consul, when it only swaps out the certificate authority function.

How to eliminate wrong answers

Option B is wrong because Connect uses short-lived, auto-rotated certificates issued by the CA — static certificates are not the model, and SPIRE integration specifically enables dynamic issuance. Option C is wrong because Consul must be running to provide the mesh data plane and service registry; SPIRE only replaces the CA function, not Consul itself. Option D is wrong because SPIRE does not replace the Consul agent — the agent still runs on each node to register services, perform health checks, and configure Envoy sidecars; SPIRE only supplies identities.

29
MCQmedium

You are deploying a new service 'api' in a Consul Connect mesh. You want to ensure that all incoming connections to 'api' are logged for auditing purposes. Which Consul feature should you configure?

A.Use Consul's built-in traffic capture feature to record all connections to 'api'.
B.Set the intention action to 'allow' and enable audit logging in Consul's ACL system.
C.Enable access logs on the sidecar proxy for 'api'.
D.Configure a service mesh gateway to log all traffic passing through it.
AnswerC

Sidecar proxies can be configured to emit access logs that record each incoming connection, including source service identity and timestamp. This provides the necessary audit trail for connections to 'api'. Configuring access logs on the proxy is the standard way to achieve connection logging in Consul Connect.

Why this answer

To log incoming connections to a service in Consul Connect, you should enable access logs on the sidecar proxy. The proxy handles all incoming traffic and can be configured to write logs that include details such as the source service, destination, and timestamp. This is the correct approach for auditing service-to-service communication.

Exam trap

The trap here is thinking that ACL audit logging or mesh gateways can provide connection-level auditing, when actually the sidecar proxy's access logs are the correct source.

30
Multi-Selecthard

Which TWO of the following are valid ways to monitor Consul Connect performance?

Select 2 answers
A.Envoy stats endpoint.
B.Modifying Consul log levels to 'debug'.
C.Prometheus metrics.
D.Checking the system RAM.
E.Directly querying the database.
AnswersA, C

Envoy's `/stats` endpoint exposes per-sidecar metrics for every proxied connection, including request rates, latency histograms and upstream health. Since Consul Connect injects Envoy as the data-plane proxy, scraping these endpoints directly satisfies the requirement to monitor service-mesh performance at the connection level.

Why this answer

Option A (Envoy stats endpoint) is correct because Consul Connect uses Envoy sidecar proxies for its service mesh data plane, and each Envoy proxy exposes a /stats endpoint (typically on port 19000 via the admin interface) that reports detailed metrics such as upstream request counts, latency histograms, and connection errors, making it a valid way to monitor Connect performance. Option C (Prometheus metrics) is correct because Consul and Envoy both expose metrics in Prometheus format — Consul's /v1/agent/metrics endpoint and Envoy's /stats/prometheus endpoint — which can be scraped to monitor Connect proxy and mesh health. Option B is not a valid monitoring method because changing Consul log levels to 'debug' only increases log verbosity for troubleshooting; it does not provide performance metrics.

Option D is not specific to Consul Connect, as checking system RAM is a generic host resource check rather than a Connect performance monitoring technique. Option E is incorrect because Consul Connect does not involve directly querying a database; it is a service mesh feature for securing service-to-service communication.

Exam trap

The trap is selecting log-level changes or host resource checks as 'monitoring' — the exam expects you to distinguish between observability mechanisms (metrics endpoints) and troubleshooting aids (debug logs).

31
MCQeasy

Which component acts as the default sidecar proxy for Consul Connect?

A.Nginx
B.HAProxy
C.Envoy
D.Linkerd
AnswerC

Envoy is the default sidecar proxy that Consul Connect injects alongside services, handling mTLS and L4 authorisation between them. It satisfies the stem because Consul ships Envoy as the built-in proxy, though the interface allows alternative proxies to be registered.

Why this answer

Envoy is the default and recommended sidecar proxy for Consul Connect.

32
MCQmedium

What is the purpose of the 'upstreams' block in a service definition?

A.To set the service's health check interval.
B.To limit the total number of connections.
C.To define the ingress rules.
D.To configure the outbound dependencies of the service.
AnswerD

The upstreams block declares a service's outbound dependencies, letting Consul register each remote service as a local listener that load-balances across healthy instances. This satisfies the stem's requirement to define what the service calls out to, distinct from service registration or health checking.

Why this answer

It defines the targets that the sidecar proxy should be allowed to proxy requests to.

33
MCQeasy

You are deploying a Consul Connect service mesh in a Consul 1.15 datacenter. You want to ensure that all service-to-service traffic is encrypted and authenticated. What is the default behavior for intentions when no intention is defined between two services?

A.Traffic is denied only if the Consul ACL system is enabled.
B.Traffic is denied by default, and mTLS is enforced for allowed connections.
C.Traffic is allowed only if both services have mTLS enabled.
D.Traffic is allowed by default, and mTLS is still enforced.
AnswerB

Consul Connect follows a default-deny model for intentions. If no intention explicitly allows traffic between two services, the connection is denied. For connections that are allowed, mTLS is automatically enforced by the sidecar proxies. This ensures a secure Zero Trust network.

Why this answer

Consul Connect uses a default-deny model for intentions. If no intention explicitly allows traffic between two services, the connection is denied. For allowed connections, mTLS is enforced by the sidecar proxies.

This is a fundamental security principle of Consul Connect, ensuring that no unauthorized traffic flows between services.

Exam trap

The trap here is assuming that traffic is allowed by default or that enabling mTLS alone permits connections, but intentions must explicitly allow traffic regardless of mTLS.

34
MCQhard

A service mesh operator is troubleshooting a connectivity issue between two services in a Consul 1.15 datacenter. The sidecar proxy for the 'frontend' service cannot reach the 'backend' upstream. The operator has confirmed that intentions allow the traffic. Which log should they inspect first to diagnose the issue on the sidecar proxy?

A.The systemd journal for the 'backend' service.
B.The Consul agent logs on the node running the frontend service.
C.The Envoy proxy logs for the frontend sidecar.
D.The Consul server logs on the leader.
AnswerC

Envoy proxy logs contain detailed information about connection attempts, including upstream cluster selection, TLS handshakes, and errors such as connection refused or timeout. Since the sidecar proxy is Envoy, its logs are the most direct source for diagnosing why it cannot reach the 'backend' upstream. These logs are typically written to a file or stdout depending on the proxy configuration. Inspecting them first will reveal specific failure reasons.

Why this answer

The Envoy sidecar proxy logs are the most detailed source for diagnosing connectivity issues between services in a Connect mesh. They record upstream connection attempts, TLS errors, and response flags. While Consul agent and server logs can provide context, they lack the granularity needed to pinpoint why a specific proxy cannot reach its upstream.

Checking the proxy logs first is the most efficient troubleshooting step.

Exam trap

The trap here is assuming that Consul agent or server logs contain detailed proxy connection errors, when in fact the Envoy sidecar logs are the primary source for data plane troubleshooting.

35
MCQmedium

When using 'Consul Connect native' integration, how does the application handle mTLS?

A.mTLS is disabled by default for native apps.
B.The application uses the local Consul agent API to fetch identity certificates.
C.The sidecar proxy handles all mTLS.
D.The Consul agent performs the TLS handshake on behalf of the app.
AnswerB

With Consul Connect native integration, the application itself performs mTLS by calling the local Consul agent's API to obtain its leaf identity certificate and CA bundle, then uses those credentials directly for encrypted, authenticated service-to-service communication.

Why this answer

In native integration, the application uses the Consul API to retrieve certificates and handles the mTLS handshake itself.

36
MCQmedium

You are using Consul 1.15 with Connect and want to enable Layer 7 traffic management for a service 'api' to perform HTTP path-based routing. Which configuration is required in the service definition?

A.Set 'protocol' to 'grpc' and configure a service-splitter config entry.
B.Set 'protocol' to 'tcp' and use a service-resolver config entry with subsets.
C.Set 'protocol' to 'http' in the service definition and configure a service-router config entry.
D.Set 'protocol' to 'http' and create an intention with a path-based rule.
AnswerC

To enable L7 features such as path-based routing, the service must declare its protocol as 'http' or 'grpc'. Then a service-router config entry can define routing rules based on HTTP attributes. This combination allows Consul to configure Envoy to inspect HTTP requests and route accordingly, meeting the requirement.

Why this answer

Consul's L7 traffic management requires the service to declare an HTTP-based protocol and use config entries such as service-router, service-splitter, or service-resolver. The service-router specifically supports path-based routing by matching on HTTP path, header, or query parameters. Without the correct protocol, Envoy operates in L4 mode and cannot inspect HTTP requests.

Exam trap

The trap here is confusing intentions with routing config entries; intentions only control access, not traffic routing.

37
MCQeasy

You are troubleshooting a Consul Connect service mesh and need to verify which intentions are currently configured. Which Consul CLI command lists all intentions?

A.consul connect intentions
B.consul intention get -all
C.consul intention list
D.consul catalog intentions
AnswerC

The 'consul intention list' command queries Consul and displays all intentions that have been created. It shows the source and destination services, the action (allow or deny), and other metadata. This is the correct command to verify the current intentions in the mesh. It is a straightforward and commonly used command for auditing Connect authorization.

Why this answer

The correct command to list all intentions is 'consul intention list'. This command retrieves and displays all intentions configured in the Consul datacenter. The other options are either non-existent commands or incorrect syntax.

Being able to quickly list intentions is essential for troubleshooting and auditing Connect authorization.

Exam trap

The trap here is assuming that intentions are managed under the 'consul connect' command, when they are actually a top-level command.

38
MCQeasy

What is the primary role of the Consul Connect 'upstream' configuration?

A.To define the services that a local service can connect to.
B.To set intention priority.
C.To register external services.
D.To define health check ports.
AnswerA

An upstream block declares the service dependencies a local sidecar proxy should establish, generating listeners and intentions for outbound Connect traffic. This satisfies the stem's constraint: defining which services the local service can connect to.

Why this answer

The Consul Connect 'upstream' configuration defines the services that a local service can connect to through the mesh. It specifies the destination service name, optional datacenter, and local port that the sidecar proxy listens on to forward traffic to the upstream. This is the core mechanism for establishing service-to-service connections in Consul Connect.

Exam trap

The trap is confusing upstreams with intentions — upstreams define what a service can connect to, while intentions define whether that connection is allowed; candidates often mix these two Connect concepts.

How to eliminate wrong answers

Option B is wrong because intention priority is not configured through upstreams; intentions are separate ACL-like rules that define whether a connection is allowed, and they do not have a priority field set by upstreams. Option C is wrong because registering external services is done through service definitions with the 'external' or 'external-source' fields, not through upstream configuration. Option D is wrong because health check ports are defined in the service's check block, not in the upstream block, which is about outbound connections.

39
MCQmedium

A security engineer is configuring intentions for a service mesh. They want to allow traffic from 'frontend' to 'backend' only when the connection is encrypted with mTLS and originates from a specific namespace in Consul Enterprise. Which intention attribute should they use to enforce the namespace constraint?

A.SourceNamespace
B.SourcePartition
C.SourceType
D.SourceName
AnswerA

SourceNamespace is the correct attribute to enforce that the source service resides in a specific Consul Enterprise namespace. By setting SourceNamespace to the desired namespace, the intention only matches connections from 'frontend' within that namespace. This provides the granular control needed to restrict traffic based on namespace, which is critical in multi-tenant environments. Other attributes do not capture namespace information.

Why this answer

In Consul Enterprise, intentions support namespace and partition attributes to provide fine-grained authorization. To allow traffic only from a specific namespace, the SourceNamespace attribute must be set. This ensures that only service instances registered in that namespace can establish connections.

Other attributes like SourceName or SourcePartition do not fulfill the namespace-specific requirement.

Exam trap

The trap here is confusing namespace with admin partition or assuming that SourceName includes namespace, when in fact namespaces require a dedicated SourceNamespace field.

40
MCQmedium

What is the correct way to specify a local bind port for an upstream service?

A.service { upstream = { 9000 } }
B.proxy { upstream_port = 9000 }
C.upstream { port = 9000 }
D.upstreams { destination_name = "svc", local_bind_port = 9000 }
AnswerD

The upstreams block inside the service definition accepts destination_name to identify the target service and local_bind_port to fix the loopback port the sidecar listens on. This exact HCL syntax lets the local application reach the upstream at a predictable address.

Why this answer

The correct syntax for defining an upstream service with a local bind port in Consul's service definition is within the 'upstreams' block, specifying 'destination_name' and 'local_bind_port'. This tells the local proxy to listen on the specified port and forward traffic to the destination service. The other options use incorrect block names or syntax that Consul does not recognize.

Exam trap

The trap is mixing up the block names and field names (e.g., 'upstream' vs 'upstreams', 'port' vs 'local_bind_port'), causing candidates to select a syntactically plausible but invalid option.

How to eliminate wrong answers

Option A is wrong because 'service { upstream = { 9000 } }' is not valid HCL syntax for Consul; upstreams must be defined as a list of objects with specific fields. Option B is wrong because 'proxy { upstream_port = 9000 }' is not a valid field; the proxy block does not accept 'upstream_port'. Option C is wrong because 'upstream { port = 9000 }' is missing the destination service name and uses an incorrect block name; the correct block is 'upstreams' (plural) with 'destination_name' and 'local_bind_port'.

41
MCQmedium

A platform team runs Consul 1.15 with Connect enabled in a single datacenter. They register a new service 'payments' with a sidecar proxy, but when the application team tries to reach 'payments' through its local proxy, the connection is refused. Running 'consul intention check web payments' returns 'Result: denied'. No intentions have been created yet. What should the team do to allow the traffic while following Consul's default security model?

A.Modify the 'payments' service definition to include 'connect: { sidecar_service: {} }' under the service stanza and reregister it.
B.Create an intention that allows 'web' to 'payments' and apply it to the datacenter with 'consul intention create web payments'.
C.Set the environment variable CONSUL_ALLOW_INSECURE_TRAFFIC=true on the 'payments' sidecar and restart it.
D.Run 'consul intention create -deny web payments' and then restart the 'web' sidecar proxy.
AnswerB

In Consul 1.15, when no intention matches a service pair, Connect defaults to deny. Explicitly creating an allow intention between the source 'web' and destination 'payments' authorizes the L4 connection and is the intended way to open traffic under the default-deny model.

Why this answer

Connect evaluates intentions for every proxied connection and, absent a match, defaults to deny. The 'consul intention check' output confirms denial. Creating an allow intention between the source service 'web' and destination 'payments' establishes the required authorization.

Environment toggles, re-registration, and explicit deny intentions do not open the path under the default-deny posture.

Exam trap

The trap here is assuming that registering a sidecar proxy automatically permits inbound traffic, when intentions must explicitly allow the source-to-destination pair.

42
MCQhard

A financial services firm requires that all service-to-service traffic inside its Consul 1.15 datacenter be encrypted and that services accept connections only when an explicit intention permits them. An operator enables Connect on all agents but services still accept plaintext traffic from non-mesh clients. Which additional step is required to enforce encryption and deny-by-default for the whole datacenter?

A.Enable TLS on the agents and rely on gossip encryption to protect service traffic.
B.Create a default-deny intention and set 'connect.enabled = true' in the server configuration only.
C.Set 'connect.enabled = true' in the agent configuration and register a default-deny intention, then ensure services only listen on loopback or are reachable solely through their sidecar proxy.
D.Configure the sidecar proxies to bind the service's original port and set a default-deny intention, so all inbound traffic must pass through the proxy.
AnswerC

Connect must be enabled in the agent configuration so proxies can be injected, and a default-deny intention ensures no service is reachable over the mesh without an explicit allow. Restricting the application to loopback or making it reachable only via the proxy forces all inbound traffic through mTLS, so plaintext connections from non-mesh clients are refused.

Why this answer

Enabling Connect provides the mTLS data plane, and a default-deny intention establishes least privilege so every allowed path must be stated explicitly. However, if the application still listens on a routable address, non-mesh clients can connect in plaintext and bypass the proxy entirely. Binding the workload to loopback or exposing it only through the proxy closes that gap, making encryption and deny-by-default enforceable for all traffic.

Exam trap

The trap here is believing that enabling Connect and adding a default-deny intention secures traffic that never enters the mesh in the first place.

43
MCQmedium

A platform team runs a Consul 1.15 datacenter with Connect enabled. They deploy a new service called 'payments' and register it with a sidecar proxy. Security policy requires that only the 'checkout' service may initiate connections to 'payments', and all other services must be denied, even if they present a valid service token. No intentions exist yet for this pair. Which action should the team take to enforce this requirement with the least operational overhead?

A.Configure the 'payments' sidecar proxy with a restrictive upstream and set 'protocol' to 'tcp' in the service registration.
B.Create a deny intention from '*' to 'payments' and a separate allow intention from 'checkout' to 'payments'.
C.Enable ACLs in default-deny mode and grant the 'payments' service token only to 'checkout'.
D.Create an allow intention from 'checkout' to 'payments' and rely on the default deny behavior for all other sources.
AnswerD

Consul's default behavior when no intention matches is to deny the connection. By creating a single allow intention from checkout to payments, only checkout can connect; every other service falls through to the default deny. This is the least overhead because no wildcard deny rule is needed and future services are automatically blocked.

Why this answer

Intentions are the Connect authorization mechanism, and Consul denies any connection that does not match an allow intention. Creating a single allow intention from checkout to payments satisfies the requirement because all other sources are denied by default. Adding a wildcard deny is redundant and complicates the intention set, while ACLs and proxy upstream settings address different concerns.

Exam trap

The trap here is assuming you must explicitly create a deny-all intention, when Consul's default posture already denies unmatched connections.

44
Multi-Selectmedium

A Consul 1.15 operator is configuring a service mesh with Connect and needs to ensure that the sidecar proxy for 'frontend' can establish mTLS connections to the 'backend' service. The operator has already registered both services with Connect sidecars. Which two actions are required to allow this communication? (Choose two.)

Select 2 answers
A.Set the 'connect.enabled' parameter to true in the service definition for both services.
B.Configure the 'frontend' service registration with an upstream stanza pointing to 'backend'.
C.Enable TLS on the Consul agents in both datacenters.
D.Define an intention that allows traffic from 'frontend' to 'backend'.
E.Manually generate and distribute leaf certificates to both services.
AnswersB, D

The upstream stanza in the 'frontend' service registration tells the sidecar proxy to create a local listener that forwards traffic to the 'backend' service. Without this configuration, the frontend application has no local endpoint to send requests to, and the sidecar will not establish the mTLS connection. This stanza is necessary for the proxy to know the destination service and port.

Why this answer

To allow 'frontend' to communicate with 'backend' through Connect, two things are needed: an intention that authorizes the traffic, and an upstream configuration in the 'frontend' service registration so its sidecar knows where to forward requests. Intentions enforce authorization, while the upstream stanza provides the necessary listener and routing information for the sidecar to initiate the mTLS connection.

Exam trap

The trap here is assuming that enabling Connect sidecars alone is sufficient, overlooking that both an intention and an upstream definition are required for service-to-service communication.

45
MCQmedium

How are intentions applied to services in different partitions or namespaces?

A.Intentions only work within the 'default' namespace.
B.You must specify the namespace in the intention definition.
C.Intentions are always global.
D.They must be created via API only.
AnswerB

Intentions are scoped to a namespace, so cross-namespace traffic requires the namespace explicitly named in the intention definition. This satisfies the stem's constraint that source and destination in different namespaces cannot be matched by service name alone.

Why this answer

In Consul Enterprise, intentions are applied to services in different partitions or namespaces by specifying the namespace (and partition, if applicable) in the intention definition. This allows fine-grained control over which services can communicate across these boundaries. Intentions are not limited to the default namespace, nor are they always global.

Exam trap

The trap is assuming that intentions are always global or only work in the default namespace, ignoring the need to specify namespace and partition for cross-boundary communication.

How to eliminate wrong answers

Option A is wrong because intentions can be defined in any namespace, not just the default. Option C is wrong because intentions are not always global; they can be scoped to a namespace and partition. Option D is wrong because intentions can be created via the UI, CLI, or API, not only via API.

46
MCQhard

You are using Consul 1.15 with Connect enabled. A service 'web' needs to communicate with an upstream service 'api' in a different datacenter. You have configured a mesh gateway in each datacenter. The 'web' service's sidecar proxy is configured with an upstream for 'api'. However, traffic is failing. You check the sidecar proxy logs and see 'no healthy upstream'. What is the most likely cause?

A.The 'web' service's sidecar proxy is not configured with the correct CA certificate.
B.The intention between 'web' and 'api' is set to 'deny'.
C.The upstream service 'api' is not registered in the remote datacenter or has no healthy instances.
D.The mesh gateway is not registered as a service in Consul.
AnswerC

The error 'no healthy upstream' indicates that the sidecar proxy cannot find any healthy instances of the upstream service. In a cross-datacenter scenario, the local Consul servers must be able to discover the remote service via the mesh gateway. If 'api' is not registered or has no healthy instances in the remote datacenter, the local proxy will report this error. This is the most likely cause.

Why this answer

The error 'no healthy upstream' means the sidecar proxy cannot find any healthy instances of the upstream service. In a cross-datacenter setup with mesh gateways, this typically occurs when the upstream service is not registered or has no healthy instances in the remote datacenter. Other issues like missing gateway registration or deny intentions would produce different errors.

Exam trap

The trap here is assuming that a deny intention causes 'no healthy upstream', but intentions affect authorization, not service discovery.

47
MCQmedium

You need to deny all traffic between 'service-a' and 'service-b' using intentions. What is the most efficient way to achieve this?

A.consul intention create -allow-none service-a service-b
B.consul intention set -action=drop service-a service-b
C.consul intention create -deny service-a service-b
D.consul intention delete service-a service-b
AnswerC

This command directly creates a deny-type intention.

Why this answer

Intentions can be set to 'deny' explicitly, which overrides any 'allow' rules.

48
MCQmedium

You are deploying a Consul Connect service mesh in a single datacenter. A developer asks how service-to-service authorization is enforced when two services communicate through their sidecar proxies. What is the primary mechanism that controls whether the connection is allowed?

A.Consul intentions define whether a connection between a source and destination service is permitted.
B.Network ACLs on the Consul servers filter traffic between sidecar proxies.
C.mTLS certificates alone determine if a connection is permitted.
D.The Envoy proxy configuration includes a static list of allowed upstream services.
AnswerA

Intentions are the authorization layer in Consul Connect. They evaluate the source identity (from the client certificate) against the destination service and return allow or deny. This is independent of network ACLs or firewall rules, and it is enforced by the sidecar proxies when a connection is established. Therefore, intentions are the correct mechanism for controlling service-to-service authorization.

Why this answer

Consul intentions are the authorization mechanism in Consul Connect. They evaluate the source service identity against the destination service and determine whether the connection is allowed. While mTLS provides authentication and encryption, it is the intention that enforces authorization.

Network ACLs and static proxy configurations do not fulfill this role. Therefore, intentions are the correct answer.

Exam trap

The trap here is confusing authentication (mTLS) with authorization (intentions), assuming that a valid certificate automatically grants access.

49
Multi-Selectmedium

Which THREE of the following are components of a Consul Connect service definition?

Select 3 answers
A.proxy
B.acl_policy
C.kv_store
D.upstreams
E.connect
AnswersA, D, E

The proxy block declares the sidecar or native proxy that mediates inbound and outbound Connect traffic for the service. It is a valid top-level component of a Consul Connect service definition, satisfying the stem's requirement to identify Connect definition components.

Why this answer

Connect services typically use 'proxy', 'upstreams', and 'connect' blocks to define their behavior in the mesh.

50
MCQmedium

A service 'orders' must call an upstream database service through its sidecar proxy. The upstream is registered in the same Consul datacenter and the operator wants the sidecar to discover it dynamically rather than hard-code an address. Which upstream configuration entry in the sidecar_service stanza accomplishes this?

A.A local_bind_port and a destination_name, but with destination_type omitted and datacenter set to a remote value.
B.destination_type set to 'static' with a destination_name equal to the upstream's DNS name.
C.destination_name set to the upstream service name, with no destination_type or fixed address.
D.destination_type set to 'prepared_query' with a destination_name matching the upstream service.
AnswerC

When destination_type is left at its default of service, the sidecar resolves the upstream through Consul's service discovery using destination_name. The proxy watches the catalog for healthy instances and load-balances across them, so IP changes and scaling events are handled automatically. Hard-coding an address would defeat the purpose of dynamic discovery.

Why this answer

Dynamic discovery for a sidecar upstream is achieved by naming the target service and letting the default service destination type drive catalog lookups. The proxy then watches Consul for healthy instances and balances across them. Static addressing, remote datacenter scoping, and prepared queries all change that behavior in ways the scenario does not require.

Exam trap

The trap here is assuming an upstream must specify an address or a special type, when the default service destination type already performs dynamic catalog-based discovery.

51
MCQmedium

What is the function of the 'consul connect envoy' command?

A.To launch and manage the Envoy proxy sidecar for a service.
B.To generate TLS certificates for Envoy.
C.To verify the Envoy binary installation.
D.To update the Envoy configuration via CLI.
AnswerA

The `consul connect envoy` command generates the Envoy bootstrap configuration and starts the sidecar proxy process, registering it with Consul's service mesh. This directly satisfies the stem's requirement by launching and managing the per-service Envoy sidecar, handling its lifecycle and configuration without manual bootstrap files.

Why this answer

This command bootstraps and manages the lifecycle of the Envoy sidecar process.

52
MCQhard

An operator is configuring a Connect sidecar proxy in a service definition so that outbound calls to a dependency are routed through the mesh. The dependency is registered as 'redis' in the same datacenter, listening on port 6379. The application expects to reach it at localhost:6379. Which upstream block in the sidecar_service definition achieves this?

A.upstreams = [{ destination_name = "redis", datacenter = "dc1", local_bind_port = 6379 }]
B.upstreams = [{ destination_name = "redis", local_bind_port = 6379 }]
C.upstreams = [{ destination_name = "redis", destination_port = 6379 }]
D.upstreams = [{ service = "redis", port = 6379 }]
AnswerB

The upstreams block names the destination service and the local port the sidecar listens on. Binding local port 6379 lets the application connect to localhost:6379, and the sidecar transparently forwards to the 'redis' service through mTLS, satisfying the application's expectation without code changes.

Why this answer

Upstreams in a sidecar_service definition require a destination_name and a local_bind_port. The local_bind_port is what the application dials on localhost, and the sidecar handles discovery, mTLS, and load balancing to the destination. Fields such as destination_port or service/port are not valid in this context, and a datacenter field is only needed for cross-datacenter upstreams.

Exam trap

The trap here is confusing the destination's service port with the sidecar's local listening port, which must be specified as local_bind_port.

53
MCQhard

When troubleshooting a service that fails to start its Envoy proxy, which service definition field should you check for incorrect configuration?

A.proxy
B.checks
C.meta
D.tags
AnswerA

The `proxy` block configures the sidecar's Envoy settings, including upstreams, listeners and bootstrap options. Incorrect values here directly prevent the proxy from starting, so it is the field to inspect first when diagnosing startup failure.

Why this answer

The proxy field in a Consul service definition configures the Envoy sidecar, including upstreams, protocol, and the sidecar's port and configuration. If Envoy fails to start, the proxy stanza is the first place to inspect for malformed upstream definitions, invalid protocol values, or missing sidecar service registration.

Exam trap

The trap is blaming health checks or tags for proxy failures — candidates conflate service health or discovery metadata with the actual Envoy bootstrap configuration, which lives exclusively in the proxy block.

How to eliminate wrong answers

Option B is wrong because checks define health check behavior (HTTP, TCP, TTL, gRPC) and affect service health status, not Envoy startup — a bad check marks the service unhealthy but does not prevent the proxy from launching. Option C is wrong because meta holds arbitrary key-value metadata for filtering and external tooling; it has no bearing on Envoy configuration. Option D is wrong because tags are used for service discovery filtering and intention matching, not for proxy bootstrap; incorrect tags affect routing eligibility, not Envoy process startup.

54
MCQeasy

A team runs Consul 1.15 with Connect. They want to observe which services are allowed to communicate with a specific service named 'inventory' and confirm whether a particular source is permitted, without sending real traffic. Which command should they use to query the effective intention decision for a source and destination?

A.consul catalog nodes -service inventory
B.consul intention list -destination inventory
C.consul intention check -source billing -destination inventory
D.consul connect envoy -sidecar-for inventory --dry-run
AnswerC

The intention check subcommand evaluates the effective authorization decision between a source and destination, reporting whether the connection is allowed or denied. It accounts for matching intentions and the default policy, making it the right tool to verify permissions without generating actual mesh traffic.

Why this answer

The intention check subcommand evaluates the effective decision for a source and destination pair, factoring in matching intentions and the default policy. It is the direct way to verify whether a source is permitted to reach a destination without generating real traffic, which is exactly what the team needs.

Exam trap

The trap here is confusing listing intentions with evaluating the effective decision, since a list does not resolve wildcard and default-policy interactions for a specific pair.

55
MCQmedium

What is the 'Consul Connect proxy' kind used for?

A.To define a gateway.
B.To mark a service definition as a sidecar proxy.
C.To define the service that the proxy runs in front of.
D.To enable mTLS for the service.
AnswerB

Registering a service with kind = "connect-proxy" and a proxy destination identifies it as the sidecar that fronts another service, so Consul wires the proxy's listeners and upstreams to that target rather than treating it as an ordinary service.

Why this answer

It defines a service that is explicitly a sidecar proxy.

Ready to test yourself?

Try a timed practice session using only Service Mesh With Consul Connect questions.