Courseiva

HashiCorp Certified: Consul Associate (Consul 1.15) (Consul 1.15) (Consul 1.15) — Questions 151194

194 questions total · 3pages · All types, answers revealed

Page 2

Page 3 of 3

151
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 defines sidecar settings.

Why this answer

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

152
MCQhard

You notice that the KV store is not consistent across datacenters. What is the cause?

A.The Raft protocol is broken.
B.The ACL token lacks the 'write' permission.
C.KV store is datacenter-local by design.
D.The WAN gossip is disabled.
AnswerC

Consul's KV store is not replicated globally between DCs automatically.

Why this answer

Consul does not natively replicate the entire KV store across datacenters by default; it requires separate configuration or manual syncing for state consistency.

153
MCQeasy

Which command line tool can you use to manually trigger a TTL check update for a specific service?

A.consul kv put
B.curl -X PUT http://localhost:8500/v1/agent/check/pass/checkID
C.consul agent -check-update
D.consul health update
AnswerB

This is the documented API call to pass a TTL check.

Why this answer

The 'consul monitor' is for logs, but to update a check via CLI, one typically interacts with the HTTP API or uses the 'consul kv' command if applicable, but specifically for TTL, the HTTP API endpoint '/v1/agent/check/pass' is the standard method.

154
Multi-Selecthard

Which TWO of the following are true regarding the behavior of the Consul KV store?

Select 2 answers
A.Keys can only contain alphanumeric characters
B.All KV writes are synchronous across all nodes
C.The KV store is limited to 1GB of data
D.Stale reads allow for reading from non-leader nodes
E.Values are stored as base64-encoded strings in the API response
AnswersD, E

Stale consistency mode permits non-leader reads.

Why this answer

KV values are stored as base64 encoded strings in the API, and they are eventually consistent for stale reads.

155
MCQeasy

Which configuration file format is preferred by Consul for defining service health checks?

A.JSON
B.XML
C.INI
D.YAML
AnswerA

JSON is a native configuration format for Consul.

Why this answer

Consul supports both JSON and HCL, but JSON is the most common format for service definitions.

156
MCQmedium

Which protocol is used for the control plane communication between the Consul agent and the sidecar proxy?

A.Consul RPC
B.REST
C.gRPC
D.HTTP/1.1
AnswerC

Consul uses the gRPC-based xDS API to push configuration to Envoy.

Why this answer

The Consul agent communicates with the sidecar proxy (Envoy) using the Envoy xDS API.

157
MCQmedium

Which of the following is a valid method to update a TTL health check?

A.Using the 'consul kv' update
B.HTTP PUT to the /agent/check/pass endpoint
C.Consul CLI 'health' command
D.Editing the service definition file
AnswerB

This is the standard way to update TTL checks.

Why this answer

The agent exposes an HTTP API endpoint to update the status of a TTL check manually.

158
MCQmedium

You need to retrieve the session information for a specific session ID. Which endpoint should you query?

A./v1/session/read/:id
B./v1/session/info/:id
C./v1/kv/session/:id
D./v1/session/get/:id
AnswerB

This endpoint retrieves session metadata.

Why this answer

The /v1/session/info/:id endpoint returns the details of a specific session.

159
MCQmedium

When using multiple datacenters, what is the primary role of the 'consul-template' tool?

A.To generate configuration files based on Consul data.
B.To provision infrastructure.
C.To replicate KV stores.
D.To manage the Consul cluster nodes.
AnswerA

This is the primary function of consul-template.

Why this answer

Consul-template is often used to watch for changes in the Consul catalog and update application configurations, which can be useful when reflecting cross-DC service information.

160
MCQhard

If you are running Consul Enterprise, what feature simplifies the management of cross-datacenter secrets?

A.KV Mirroring.
B.Automatic Secret Rotation.
C.Centralized Config.
D.ACL Replication.
AnswerD

ACL replication is a core Enterprise feature for secrets consistency.

Why this answer

Consul Enterprise supports cross-datacenter secret replication for specific ACL tokens and KV pairs, often utilized with the 'enterprise_license_path' features.

161
MCQeasy

Which command is used to check the status of a registered service?

A.consul check
B.consul health service
C.consul status
D.consul list
AnswerB

The 'consul health service' command shows the status of specific instances.

Why this answer

'consul catalog' or 'consul health' commands are used for status inspection.

162
MCQmedium

You are troubleshooting a health check that seems to be hanging. Which flag, if available, would provide more information about the check's execution within the agent logs?

A.-verbose
B.-log-level=debug
C.-monitor-checks
D.-trace
AnswerB

Debug level logs show detailed check activity.

Why this answer

Increasing the agent's log level to 'debug' provides detailed information about check execution and processing.

163
Multi-Selecthard

Which THREE of the following are key components of a service definition?

Select 3 answers
A.Secret Key
B.Node BIOS version
C.Check/Health Check
D.Port
E.Service Name
AnswersC, D, E

Critical for service discovery.

Why this answer

Service definitions include the name, port, and health check requirements.

164
MCQmedium

You are querying the Consul DNS interface for a service. How can you exclude specific tags from the results?

A.Use the '!' character before the tag name.
B.Consul DNS does not support tag exclusion; you must filter via the HTTP API.
C.Add a 'not' parameter to the query.
D.Use regex in the service name.
AnswerB

DNS queries are limited; complex filtering requires the HTTP API.

Why this answer

Consul DNS queries do not support tag exclusion directly in the query string; you filter by including only the desired tags.

165
MCQmedium

You are troubleshooting why a service registered via HTTP API is not showing up in the catalog. Which tool provides the most immediate insight into the registration status?

A.consul kv get
B.consul catalog services
C.consul reload
D.consul members
AnswerB

This command lists all services currently registered in the catalog.

Why this answer

The 'consul catalog' CLI command allows direct inspection of the catalog state.

166
MCQmedium

What is the recommended number of Consul servers per datacenter to ensure high availability?

A.3
B.2
C.1
D.10
AnswerA

3 is the minimum recommended for quorum and HA.

Why this answer

The recommended number for a consensus-based system like Consul is 3 or 5, to tolerate n/2-1 failures.

167
MCQeasy

Which protocol do Consul servers use to maintain the WAN gossip pool?

A.gRPC
B.DNS
C.Serf (SWIM)
D.HTTP
AnswerC

Consul uses Serf/SWIM for membership and gossip.

Why this answer

Consul uses the Serf library, which implements the SWIM-based gossip protocol for both LAN and WAN communication.

168
MCQmedium

Which agent configuration allows you to specify the local address that the Consul agent binds to for performing health checks?

A.advertise_addr
B.client_addr
C.check_addr
D.bind_addr
AnswerD

Used by the agent for internal and health check traffic.

Why this answer

The 'bind_addr' configuration defines the address the agent binds to, which is used for health check traffic initiated by that agent.

169
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

This command runs the Envoy process with the correct Consul configuration.

Why this answer

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

170
MCQhard

When using the HTTP health check type, how can you verify that a specific header is included in the health check request?

A.By appending it to the URL string
B.It is not possible
C.By adding the 'header' object to the check definition
D.By setting the environment variable
AnswerC

The 'header' field is used for this purpose.

Why this answer

The 'header' field within the HTTP check configuration allows specifying custom HTTP headers for the check request.

171
MCQmedium

What is the effect of changing the 'interval' parameter in a service health check?

A.It changes the frequency at which the check runs.
B.It changes the DNS TTL.
C.It changes the weight of the service.
D.It changes the timeout of the check.
AnswerA

Interval determines the check frequency.

Why this answer

The interval defines how often the health check executes.

172
Multi-Selectmedium

Which THREE of the following are benefits of using the Consul DNS interface?

Select 3 answers
A.No application code changes required.
B.Provides advanced traffic shifting.
C.Platform-agnostic discovery.
D.Encrypts all traffic between services.
E.Easy integration with existing service discovery tools.
AnswersA, C, E

DNS is a standard protocol.

Why this answer

Ease of use, platform-agnostic, and no application changes are benefits.

173
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

Errors here directly impact proxy startup.

Why this answer

The 'proxy' configuration block is where all Envoy-specific settings, including ports and upstreams, are defined.

174
Multi-Selectmedium

What components can affect the outcome of a health check? (Select THREE)

Select 3 answers
A.Network connectivity
B.Client browser
C.Application responsiveness
D.Agent configuration
E.Consul server uptime
AnswersA, C, D

Blocks check traffic.

Why this answer

Network, agent configuration, and application responsiveness all affect health check outcomes.

175
Multi-Selectmedium

Which TWO of the following are true regarding intentions?

Select 2 answers
A.They are automatically synced to all datacenters.
B.They operate at the transport layer.
C.They determine allowed service-to-service communication.
D.They require a separate database.
E.They can be managed using the CLI.
AnswersC, E

This is their core purpose.

Why this answer

Intentions are managed via API/CLI and define allowed communication patterns between services.

176
MCQmedium

Which feature allows you to define a health check that depends on the health of another service?

A.Service dependency field
B.Cross-service monitoring
C.Service grouping
D.You must implement this logic in a script check
AnswerD

Custom logic must be handled via script.

Why this answer

Consul does not support direct service-to-service health check dependencies; instead, you would implement this logic within your application or use a custom script.

177
MCQmedium

You want to perform a list operation on a KV prefix to see all keys, but you don't want the values returned. Which API parameter helps reduce payload size?

A.raw=true
B.list=true
C.summarize=true
D.keys=true
AnswerD

The keys parameter returns only the list of keys.

Why this answer

The 'keys' parameter can be used with a prefix to return only the list of key names, not their contents.

178
MCQeasy

Which Consul feature allows you to observe the KV store for changes and run a command in response?

A.KV Hooks
B.Consul Watches
C.Consul Events
D.Consul Connect
AnswerB

Watches trigger actions upon data changes.

Why this answer

Consul Watches are the built-in mechanism for reacting to changes in the KV store.

179
Multi-Selectmedium

Which THREE of the following are supported as sidecar proxy types in Consul?

Select 3 answers
A.HAProxy
B.Envoy
C.Caddy
D.NGINX
E.Traefik
AnswersA, B, D

Supported as an alternative proxy.

Why this answer

Consul natively supports Envoy, and has legacy or plugin support for others like HAProxy.

180
MCQmedium

What is the purpose of the 'check' field inside a 'service' object in a Consul configuration file?

A.To define the health status requirements
B.To provide credentials for the service
C.To enable service discovery
D.To set the service weight
AnswerA

It associates a health check with the lifecycle of the service.

Why this answer

The 'check' field is used to define health checks specifically associated with the service instance, ensuring the service is marked critical if the check fails.

181
Multi-Selectmedium

Which THREE of the following are required to successfully acquire a lock on a KV key?

Select 3 answers
A.A valid session ID
B.A 'write' ACL policy
C.The 'acquire' parameter in the API request
D.A 'wait' parameter
E.The key name to lock
AnswersA, C, E

The session ID is required to identify the locker.

Why this answer

To acquire a lock, you need a session, the key itself, and the acquire parameter in the API call.

182
MCQeasy

What is the consequence of having a service with no health checks registered?

A.The service status is 'passing'
B.The agent will error out
C.The service is ignored by DNS
D.The service is critical
AnswerA

Services without checks are considered healthy.

Why this answer

If no health checks are provided, the service is assumed to be healthy by default as long as the service is registered in the catalog.

183
MCQeasy

Which file path is standard for storing the Consul server configuration, including WAN settings?

A./etc/consul.d
B./tmp/consul
C./opt/consul/bin
D./var/lib/consul
AnswerA

This is the conventional location for configs.

Why this answer

The '/etc/consul.d' directory is the standard location for Consul configuration files on Linux systems.

184
MCQmedium

What happens if a service proxy loses its connection to the local Consul agent?

A.The proxy shuts down automatically.
B.The proxy enters a 'stale' state and uses the last known config.
C.The proxy automatically switches to a local health-check mode.
D.The proxy attempts to connect to a random Consul server.
AnswerB

Envoy retains the last received xDS configuration.

Why this answer

The proxy will be unable to receive configuration updates and health status, potentially leading to service disruption.

185
Multi-Selectmedium

Which of the following conditions can cause a health check to transition to the 'critical' state? (Select TWO)

Select 2 answers
A.The HTTP check times out
B.The script returns a non-zero exit code
C.The service is idle
D.The service returns a 200 OK
E.The disk space is 50% full
AnswersA, B

Timeout indicates failure.

Why this answer

A check transitions to critical if the service fails to respond (timeout) or returns a non-success code (e.g., 500).

186
MCQeasy

What happens if you do not specify an 'interval' for a health check in the configuration?

A.It inherits the agent's check interval
B.The configuration will fail to load
C.It defaults to 10 seconds
D.It runs once and stops
AnswerB

Interval is a mandatory field.

Why this answer

The 'interval' is a required field for periodic health checks; the agent will fail to load the configuration without it.

187
MCQeasy

An administrator wants to register a service using a JSON file. Where should this file be placed on a standard Consul agent installation to ensure automatic loading?

A./var/lib/consul/
B./etc/consul/
C./etc/consul.d/
D./usr/local/bin/
AnswerC

The default configuration directory for Consul is typically /etc/consul.d/.

Why this answer

The Consul agent watches the directory defined by the '-config-dir' flag.

188
Multi-Selecteasy

Which TWO of the following are common use cases for the Consul KV store?

Select 2 answers
A.Traffic routing
B.Distributed locking
C.Service discovery
D.Running custom scripts
E.Distributed configuration management
AnswersB, E

This is a core use case.

Why this answer

KV is primarily used for configuration management and distributed locking.

189
MCQeasy

Which CLI command would you use to check the status of a Connect-enabled service?

A.consul status
B.consul connect status
C.consul proxy check
D.consul health service <name>
AnswerD

This displays the health of the service and its sidecars.

Why this answer

The 'consul catalog services' or 'consul health service' command shows the status, including Connect capabilities.

190
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

This 'kind' identifies the resource as a proxy.

Why this answer

It defines a service that is explicitly a sidecar proxy.

191
Multi-Selecthard

Which THREE of the following are valid Consul health check statuses?

Select 3 answers
A.maintenance
B.warning
C.passing
D.unknown
E.critical
AnswersB, C, E

Degraded state.

Why this answer

Passing, Warning, and Critical are the three standard states.

192
Multi-Selecthard

Which TWO of the following accurately describe Consul's WAN gossip protocol behavior?

Select 2 answers
A.It involves only the server nodes of each datacenter.
B.It relies on a central hub-and-spoke architecture.
C.It is optimized to handle higher latency than LAN gossip.
D.It includes all client nodes in the gossip pool.
E.It is mandatory for service discovery.
AnswersA, C

Only servers participate.

Why this answer

WAN gossip is designed for high latency links and involves only server nodes, not all cluster nodes.

193
MCQeasy

You are deploying a legacy application that does not support HTTP or TCP health checks. Which Consul health check type should you configure to allow the application to signal its own health via a heartbeat API call?

A.TTL check
B.HTTP check
C.TCP check
D.Script check
AnswerA

Requires the application to send heartbeat signals to the agent.

Why this answer

The TTL (Time-To-Live) check requires the application to actively report its health status to the Consul agent, making it the correct choice for applications that cannot be polled externally.

194
MCQmedium

You are configuring a sidecar proxy for a service named 'web'. Which configuration stanza in the service definition correctly defines the proxy's inbound port for Connect traffic?

A.sidecar { port = 8080 }
B.config { inbound_port = 8080 }
C.proxy { local_bind_port = 8080 }
D.service { connect { port = 8080 } }
AnswerC

The local_bind_port correctly specifies where the proxy listens for local traffic.

Why this answer

The 'proxy' configuration block within the service definition allows for the 'local_bind_port' and 'config' keys to define proxy behavior.

Page 2

Page 3 of 3

All pages