Courseiva

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

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

Page 1

Page 2 of 3

Page 3
76
Multi-Selecteasy

Which states can a health check report? (Select THREE)

Select 3 answers
A.passing
B.terminated
C.warning
D.critical
E.pending
AnswersA, C, D

Healthy state.

Why this answer

The three standard states are passing, warning, and critical.

77
MCQmedium

You want to ensure that specific services in a remote datacenter are only accessible to certain local services. How can you achieve this?

A.Use Consul Intentions.
B.Use firewall rules on all nodes.
C.Modify DNS resolution.
D.Use ACL tokens.
AnswerA

Intentions are the correct tool for traffic authorization.

Why this answer

Intentions are the native Consul mechanism to control service-to-service communication, and they work across datacenters when correctly configured.

78
MCQhard

A service in datacenter A needs to call a service in datacenter B. If 'prepared_queries' are not used, how does the service discovery query look?

A.<service>.service.consul
B.<datacenter>.<service>.service.consul
C.remote.<service>.service.consul
D.<service>.service.<datacenter>.consul
AnswerD

Adding the datacenter name is the standard way to cross-DC query.

Why this answer

When not using prepared queries, standard DNS discovery across DCs follows the pattern <service>.service.<datacenter>.consul.

79
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

Mesh gateways act as the entry/exit points for cross-DC traffic.

Why this answer

Mesh gateways are required to route cross-datacenter traffic in a Consul Connect mesh.

80
MCQeasy

Which flag can be used to pass arbitrary metadata to a KV entry?

A.labels
B.metadata
C.flags
D.tags
AnswerC

Flags is the defined field for metadata.

Why this answer

The 'flags' field in the KV API allows users to store an unsigned integer for application-specific metadata.

81
MCQmedium

What is the default port used for WAN gossip between Consul servers?

A.8301
B.8302
C.8500
D.8300
AnswerB

8302 is the correct port for WAN gossip.

Why this answer

The default port for WAN gossip is 8302, distinct from the LAN gossip port 8301.

82
Multi-Selecteasy

Which THREE of the following are standard Consul KV CLI subcommands?

Select 3 answers
A.describe
B.list
C.put
D.delete
E.get
AnswersC, D, E

Used to create/update keys.

Why this answer

'put', 'get', and 'delete' are the standard CLI subcommands for KV.

83
MCQhard

When configuring an ACL policy for cross-datacenter access, what policy rule is necessary to read service information from a remote datacenter?

A.service_prefix "*" { policy = "write" }
B.agent_prefix "" { policy = "read" }
C.acl_prefix "" { policy = "read" }
D.node_prefix "" { policy = "read" }
AnswerD

Reading node/service info requires read access to the namespace.

Why this answer

You need 'service_prefix' or 'node_prefix' policies that explicitly allow reading in the target datacenter.

84
Multi-Selectmedium

Which TWO of the following are valid ways to trigger a KV watch?

Select 2 answers
A.Reading the key
B.Updating the key's value
C.Creating a new session
D.Updating the key's flags
E.Changing the key's TTL
AnswersB, D

Value updates trigger watches.

Why this answer

Watches can be triggered by a change in the KV value or a change in the ModifyIndex (which occurs on any write).

85
Multi-Selectmedium

Which TWO of the following are prerequisites for successful WAN federation?

Select 2 answers
A.All datacenters must share the same 'primary_datacenter' setting.
B.All datacenters must have identical node names.
C.Consul clients must be able to communicate directly with all remote servers.
D.All nodes must be in the same subnet.
E.Consul servers must be able to communicate on the WAN gossip port (8302).
AnswersA, E

This is essential for ACL/federation consistency.

Why this answer

WAN gossip ports must be open between server nodes, and the primary datacenter must be correctly identified.

86
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 supports plugging in external CAs via the CA provider configuration.

Why this answer

SPIRE can act as the CA (Certificate Authority) for Consul, issuing identities to services within the mesh.

87
Multi-Selecthard

Which TWO of the following statements are true about the 'passing' parameter in DNS queries?

Select 2 answers
A.It requires manual service registration.
B.It returns only services with passing health checks.
C.It forces the DNS server to restart.
D.It is a permanent configuration setting.
E.It can be used in the DNS query URL.
AnswersB, E

Correct behavior.

Why this answer

It filters to only healthy instances and is specific to the DNS interface.

88
Multi-Selecthard

Which THREE configuration items are part of a complete WAN gossip setup?

Select 3 answers
A.The 'server' role flag set to true.
B.A list of remote server addresses for the 'join-wan' operation.
C.The 'client_addr' restricted to local only.
D.The 'encrypt' key for securing gossip traffic.
E.The 'ui' configuration set to true.
AnswersA, B, D

Only servers participate in WAN gossip.

Why this answer

WAN setup requires joining the WAN pool, defining the server role, and potentially setting encryption.

89
MCQeasy

What happens to the gossip protocol if the 'encrypt' key is mismatched between two datacenters trying to join via WAN?

A.The join proceeds with warnings.
B.The join fails.
C.The connection defaults to unencrypted.
D.Only metadata is encrypted.
AnswerB

Encryption key mismatch prevents gossip communication.

Why this answer

If the encryption keys do not match, the agents will be unable to decrypt the gossip packets and the join will fail.

90
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

Standard way to see proxy metrics.

Why this answer

Consul exposes metrics via Prometheus and Envoy provides stats through its own API.

91
MCQeasy

When joining a new datacenter to an existing WAN pool, what is the best practice for server versions?

A.The new DC must run a newer version.
B.The new DC must run an older version.
C.Versions should be consistent across all datacenters.
D.Version doesn't matter at all.
AnswerC

Consistency is a best practice for operational stability.

Why this answer

Running different versions of Consul is supported during upgrades, but maintaining consistent versions across the federation is recommended for stability.

92
Multi-Selectmedium

Which THREE of the following fields are typically included in a service metadata (meta) block?

Select 3 answers
A.kernel_version
B.password
C.environment
D.region
E.version
AnswersC, D, E

Common use case.

Why this answer

Meta is used for arbitrary key-value pairs to support application logic.

93
MCQeasy

An administrator needs to query service information. Which DNS record type is commonly used by Consul to return service addresses?

A.TXT
B.MX
C.CNAME
D.SRV
AnswerD

SRV records are the standard for service discovery in DNS.

Why this answer

Consul maps service names to SRV or A records for discovery.

94
MCQmedium

A service has a TTL check configured with a 30-second TTL. If the application crashes and stops sending heartbeats, when will the service status change to 'critical'?

A.After 60 seconds
B.Once the agent restarts
C.Immediately
D.After 30 seconds
AnswerD

The status transitions to critical after the TTL duration.

Why this answer

Consul marks a TTL check as critical if the heartbeat is not received within the specified TTL duration.

95
Multi-Selectmedium

Which TWO of the following can be used to filter services during a DNS query?

Select 2 answers
A.IP Address
B.Datacenter
C.Metadata
D.Tags
E.Node Name
AnswersB, D

Filters services by datacenter.

Why this answer

DNS queries allow filtering by tags and datacenters.

96
Multi-Selectmedium

Which TWO of the following are valid ways to troubleshoot inter-datacenter communication issues?

Select 2 answers
A.Change the datacenter name in the config.
B.Inspect server logs for RPC errors between datacenters.
C.Restart all clients in the datacenter.
D.Use 'consul members -wan' to verify remote server visibility.
E.Use 'consul kv export' to sync data.
AnswersB, D

RPC logs reveal cross-DC connectivity issues.

Why this answer

Verifying WAN gossip members and checking server logs for RPC errors are standard troubleshooting steps.

97
MCQeasy

What is the purpose of the 'service-tag' in a Consul service definition?

A.To provide additional categorization or versioning for services.
B.To define the physical location of the server.
C.To set the priority of the service in DNS.
D.To encrypt communication between services.
AnswerA

Tags are flexible labels for service instances.

Why this answer

Tags are used for filtering and identifying specific instances or versions of a service.

98
MCQhard

A service 'api' is configured with mTLS. You want to rotate the CA root certificate without interrupting existing connections. What is the recommended strategy?

A.Disable mTLS globally, update, and re-enable.
B.Delete the existing CA and restart all agents.
C.Update the CA configuration to include the new root in the 'additional_roots' field.
D.Use the 'consul tls ca create' command with the --rotate flag.
AnswerC

Adding to additional_roots allows for a transition period where both CAs are trusted.

Why this answer

Consul supports a 'prepared_ca' rotation where the new CA is added to the trust bundle before the old one is removed.

99
Multi-Selecthard

Which TWO of the following are true regarding Consul KV watches?

Select 2 answers
A.Watches can only monitor keys that exist
B.Watches use blocking queries internally
C.Watches automatically restart after a script failure
D.Watches can be defined in agent configuration files
E.Watches are only available in the Enterprise edition
AnswersB, D

Watches are implemented using long polling.

Why this answer

Watches can be configured via agent configuration or the API, and they use blocking queries internally.

100
MCQeasy

When defining a TCP health check, what is the primary indicator that the check is 'passing'?

A.The port is listed in netstat
B.The service responds with a specific string
C.The service returns a 200 OK
D.The agent receives a successful TCP handshake
AnswerD

Successful connection implies the service is reachable.

Why this answer

A TCP check is considered passing if the Consul agent can successfully establish a TCP connection to the specified port.

101
MCQhard

What is the function of the 'retry_join_wan' configuration?

A.To sync secondary data.
B.To force a specific leader.
C.To enable persistent WAN connections.
D.To rotate the encryption key.
AnswerC

It ensures the WAN join succeeds over time.

Why this answer

The 'retry_join_wan' configuration allows the agent to repeatedly attempt to join the WAN gossip pool at startup if the initial attempt fails, improving robustness.

102
MCQmedium

You are using a Consul Watch to monitor KV changes. What does the 'handler' field specify?

A.The path to the executable to trigger.
B.The address of the Consul server.
C.The filter criteria for the watch.
D.The KV key to watch.
AnswerA

The handler is the command or script to run.

Why this answer

The handler field specifies the path to an executable that should be triggered when a change is detected.

103
MCQmedium

What is the purpose of the 'datacenter' field in the Consul agent configuration?

A.To limit the number of clients.
B.To segment the cluster into logical datacenters.
C.To enable encryption.
D.To identify the node for metrics.
AnswerB

Consul uses this to organize agents into functional groups.

Why this answer

The datacenter field defines the name of the datacenter the agent belongs to, which is used for service registration and routing.

104
MCQhard

When a health check is failing, which Consul API endpoint would you call to investigate the specific error message provided by the check?

A./v1/agent/services
B./v1/agent/self
C./v1/catalog/nodes
D./v1/health/checks/<service>
AnswerD

Returns the check status including the output field.

Why this answer

The '/v1/health/checks/<service>' endpoint provides detailed information about the status and output of checks for a given service.

105
Multi-Selecthard

Which THREE items are required when configuring ACL replication in Consul?

Select 3 answers
A.The 'acl_replication' configuration block enabled.
B.A global root ACL token on every client node.
C.An 'acl_replication_token'.
D.The 'raft_protocol' version set to 1.
E.The 'primary_datacenter' parameter.
AnswersA, C, E

The mechanism must be turned on.

Why this answer

ACL replication needs a defined primary, a valid token for reading, and the enabled replication flag.

106
MCQeasy

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

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

Envoy is the primary supported proxy for Consul Connect.

Why this answer

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

107
Multi-Selecteasy

Which TWO of the following describe a Consul 'service definition'?

Select 2 answers
A.A configuration that the agent watches for changes.
B.A database-specific configuration.
C.A static, immutable file.
D.A binary file loaded into the server.
E.A JSON or HCL file that describes a service.
AnswersA, E

The agent monitors the config dir.

Why this answer

They are JSON/HCL files and are monitored by the agent.

108
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

Upstreams are the outbound dependencies.

Why this answer

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

109
MCQeasy

You are joining two Consul datacenters via WAN gossip. Which command must be executed on a Consul server in the secondary datacenter to initiate the federation?

A.consul members -wan
B.consul join -wan <remote-server-address>
C.consul reload -wan
D.consul agent -join-wan
AnswerB

The -wan flag is required for cross-datacenter gossip.

Why this answer

The consul join command with the -wan flag is the standard mechanism to introduce a node from one datacenter into the WAN gossip pool of another.

110
MCQmedium

When a session is associated with a lock, what happens to the lock if the session is deleted?

A.The lock remains held by the server.
B.The lock is held until the key is deleted.
C.The lock is released.
D.The lock transfers to a new session.
AnswerC

Session deletion triggers the release of associated locks.

Why this answer

Deleting a session immediately releases any locks associated with that session.

111
Multi-Selectmedium

Which TWO of the following are true about the 'cas' parameter in KV writes?

Select 2 answers
A.It is only available in the CLI
B.It only works for new keys
C.It stands for Check-And-Set
D.It is mandatory for all writes
E.It requires a valid ModifyIndex
AnswersC, E

Correct definition.

Why this answer

The 'cas' parameter stands for Check-And-Set and requires the index to be provided to ensure atomicity.

112
Multi-Selecthard

Which THREE items are included in the metadata shared via WAN gossip?

Select 3 answers
A.Datacenter identification.
B.The health status of the participating server nodes.
C.Server node membership status.
D.The full list of local service definitions.
E.The local KV store contents.
AnswersA, B, C

Needed for cross-DC routing.

Why this answer

WAN gossip shares node membership, datacenter association, and health status for the server nodes.

113
MCQhard

A service is intermittently failing to resolve via DNS because it has multiple health checks, some of which are 'warning'. How do you ensure it is only returned when all checks are 'passing'?

A.Configure 'service_prefix' in DNS settings.
B.Use the 'stale' query parameter.
C.Set 'enable_tag_override' to true.
D.Use the 'passing' query parameter in the DNS request.
AnswerD

The 'passing' parameter forces Consul to return only services with passing status.

Why this answer

Consul DNS returns services if they are not in a 'critical' state by default; enforcing strict 'passing' requires query parameters.

114
MCQhard

What happens to a session if the associated node is marked as 'failed' by the Consul health check?

A.The session stays active.
B.The session is immediately deleted.
C.The session is invalidated when the TTL expires.
D.The session is transferred to another node.
AnswerC

Health check failure triggers the countdown for session invalidation.

Why this answer

When a node fails, the sessions associated with that node are invalidated after the session TTL expires.

115
Multi-Selectmedium

Which THREE features are critical for maintaining ACL consistency across datacenters?

Select 3 answers
A.Disabling ACLs in the primary datacenter.
B.Configuring an ACL replication token.
C.Enabling ACL replication on secondary servers.
D.Designating a primary datacenter.
E.Configuring local KV store mirroring.
AnswersB, C, D

Required for replication.

Why this answer

Consistent ACLs require a primary source, replication tokens, and correctly configured secondary datacenters.

116
Multi-Selectmedium

Which actions can you perform on a TTL check? (Select TWO)

Select 2 answers
A.restart
B.suspend
C.pass
D.warn
E.fail
AnswersC, D

Sets to passing.

Why this answer

You can tell Consul that the check passed or is in a warning state.

117
Multi-Selectmedium

Which THREE of the following are valid ways to categorize services in Consul?

Select 3 answers
A.IP subnets
B.Metadata (meta)
C.Namespaces
D.Tags
E.Port ranges
AnswersB, C, D

Used for custom attributes.

Why this answer

Tags, meta fields, and namespaces are ways to group services.

118
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

Native apps use the Consul secret API to get their identity.

Why this answer

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

119
MCQmedium

You have enabled ACL replication between a primary and secondary datacenter. What is the effect of changing an ACL policy in the primary datacenter?

A.The changes only propagate if the secondary is in maintenance mode.
B.The changes require a manual trigger on secondary servers.
C.The changes are ignored by secondary datacenters.
D.The changes are asynchronously replicated to all secondary datacenters.
AnswerD

ACL replication is an asynchronous process that pushes updates from primary to secondaries.

Why this answer

ACL replication automatically propagates changes from the primary to secondary datacenters to maintain consistency.

120
MCQhard

You observe a 'warning' status for a service. What is the most common reason for this?

A.The agent is restarting
B.The network is down
C.The service is operating but with performance issues
D.The service crashed
AnswerC

Warning signifies degraded health.

Why this answer

A 'warning' status typically occurs when the service is reachable but is reporting a non-critical issue, such as high latency or exceeding a custom defined threshold in a custom script.

121
MCQeasy

What command displays the currently registered services in the local agent?

A.consul catalog services
B.consul show
C.consul agent services
D.consul services list
AnswerA

This lists all services known to the catalog.

Why this answer

'consul catalog services' is the standard way to list services.

122
MCQmedium

You want to perform a blocking query on a KV key to watch for updates. Which parameter must you provide in your request based on the last observed index?

A.consistency
B.wait
C.index
D.timeout
AnswerC

The index parameter specifies the last known index to block on.

Why this answer

The index parameter is used in the query string to inform Consul that you want to wait until the current state index is greater than the provided value.

123
MCQmedium

You have a service that requires specific routing logic based on the environment. How can you distinguish between 'production' and 'staging' instances of the same service name using metadata?

A.Use different service names for every environment.
B.Modify the service's port number.
C.Apply 'production' or 'staging' tags to the service definition.
D.Assign different Consul datacenters.
AnswerC

Tags allow for logical grouping and filtering of services sharing the same name.

Why this answer

Service tags are the standard way to categorize and filter services within the Consul catalog.

124
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

Upstreams define what a service depends on.

Why this answer

Upstreams define the dependencies of a service, allowing the proxy to route to specific services.

125
MCQhard

When using Consul KV for distributed locking, why is it recommended to use a session?

A.It allows for TTL-based automatic lock release.
B.It encrypts the lock data.
C.It allows for multiple lock holders.
D.It speeds up read operations.
AnswerA

This prevents orphaned locks.

Why this answer

Sessions provide a mechanism for TTL-based auto-release, which prevents deadlocks if an application crashes while holding a lock.

126
MCQhard

How does Consul handle service discovery when using the 'prepared query' feature?

A.By pre-compiling the service discovery logic.
B.By automatically creating new services.
C.By disabling health checks.
D.By caching all DNS records in memory.
AnswerA

Prepared queries act as a template for discovery with advanced features.

Why this answer

Prepared queries allow for complex, pre-defined discovery logic including failover.

127
MCQhard

What is the primary difference between a 'script' check and an 'http' check in terms of how they are processed by the Consul agent?

A.Script checks require executing a local process
B.HTTP checks are more secure
C.Only HTTP checks support intervals
D.Script checks are faster
AnswerA

Script checks require host-level execution.

Why this answer

Script checks run an external binary or shell script on the host, while HTTP checks involve the agent making a network request to the service.

128
Multi-Selecthard

Which TWO statements are true regarding Consul Mesh Gateways?

Select 2 answers
A.They replace the need for Consul servers in the secondary datacenter.
B.They increase the latency of LAN gossip.
C.They require a separate Consul Enterprise license.
D.They are required when direct WAN gossip is not possible between datacenters.
E.They operate as L7 proxies for cross-datacenter traffic.
AnswersD, E

This is their primary use case.

Why this answer

Mesh gateways function at Layer 7 and are essential for connectivity between isolated datacenters.

129
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

This is the correct syntax for an upstream definition.

Why this answer

Inside the upstream block, the 'local_bind_port' key sets the port the proxy listens on.

130
Multi-Selecthard

Which of the following are true regarding TTL checks? (Select TWO)

Select 2 answers
A.They require the app to push updates
B.They are automatically removed
C.They are faster than script checks
D.They are the only check without an interval
E.They are polled at a fixed interval
AnswersA, D

Push-based model.

Why this answer

TTL checks do not have an interval and require manual updates.

131
Multi-Selecthard

Where can you define health checks in Consul? (Select THREE)

Select 3 answers
A.Agent configuration files
B.HTTP API
C.Consul UI
D.Consul KV store
E.Service definition files
AnswersA, B, E

Global definitions.

Why this answer

Checks can be defined in configuration files, via the HTTP API, or within a service definition.

132
MCQeasy

An application is using Consul KV to store configuration. You notice that the KV store is becoming large. What is the most efficient way to retrieve only the keys under the prefix "service/web/"?

A.Set the depth parameter to 1.
B.Use the index parameter with value 0.
C.Use the keys parameter with the prefix.
D.Use the recurse=true parameter in the query string.
AnswerD

Recurse=true returns all keys sharing the specified prefix.

Why this answer

The recurse parameter allows the KV API to return all keys with a matching prefix, rather than just the single key specified.

133
MCQhard

If a KV operation returns a 403 Forbidden status, what is the most common cause?

A.The ACL token lacks sufficient permissions.
B.The server is down.
C.The data is too large.
D.The key does not exist.
AnswerA

A 403 indicates a policy violation.

Why this answer

ACLs (Access Control Lists) are enabled, and the client token lacks the 'write' permission for that specific prefix.

134
MCQmedium

How do you enable mTLS globally in a Consul datacenter?

A.Run 'consul tls enable'.
B.Set 'connect { enabled = true }' in the agent configuration.
C.consul config write -enable-mtls
D.There is no global enable setting.
AnswerB

This is the standard agent-level configuration for Connect.

Why this answer

mTLS is enabled by default in modern Consul versions, but can be configured in the agent config via 'connect.enable_connect'.

135
MCQmedium

Which file format is used for Consul configuration?

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

Consul accepts both formats.

Why this answer

Consul supports both HCL (HashiCorp Configuration Language) and JSON for its configuration files.

136
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

Namespaces require explicit scoping in intentions.

Why this answer

Intentions are scoped to the namespace, and cross-namespace intentions require the namespace name.

137
Multi-Selecthard

Which TWO of the following actions occur when a node fails in a Consul cluster?

Select 2 answers
A.All services on the node are marked critical.
B.The node is immediately deleted from the cluster.
C.The node is automatically rebooted.
D.Services on the node are removed from DNS results.
E.The entire cluster shuts down.
AnswersA, D

Health status changes.

Why this answer

The node is marked down, and its services are removed from the catalog.

138
Multi-Selectmedium

Which TWO of the following are true about Consul datacenters?

Select 2 answers
A.Each datacenter must have at least one server node.
B.They are strictly physical locations.
C.They represent a group of nodes with low latency to each other.
D.They must share the same Raft quorum.
E.They allow a single Consul agent to join multiple DCs.
AnswersA, C

Servers are required for consensus.

Why this answer

Datacenters are logical groupings and require independent server quorums.

139
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.

140
MCQhard

You have implemented a leader election mechanism using Consul KV sessions. The session has a TTL of 15 seconds. If the application crashes, how long will it take for the lock to be automatically released?

A.Immediately.
B.60 seconds.
C.The lock is never released until manually deleted.
D.15 seconds.
AnswerD

The session TTL defines the duration after which an un-renewed session is invalidated, releasing associated locks.

Why this answer

When a session has a TTL, the lock is released when the session is invalidated by the health check failure. The default session invalidation is tied to the TTL.

141
Multi-Selectmedium

Which THREE factors influence cross-datacenter service discovery resolution?

Select 3 answers
A.The local server must have knowledge of the remote datacenter's server addresses.
B.All services must be in the same namespace.
C.The existence of a valid WAN gossip link.
D.The local agent must have superuser permissions.
E.The use of the specific datacenter suffix in the DNS query.
AnswersA, C, E

Required for cross-DC communication.

Why this answer

Resolution depends on the ability to query the remote DC, the health status of the remote instances, and the configuration of the local discovery agent.

142
MCQhard

If a Consul agent is configured with 'disable_remote_exec = true', how does this affect the KV store?

A.It forces all KV reads to be consistent.
B.It prevents all KV writes.
C.It disables KV watches.
D.It has no effect on the KV store.
AnswerD

Remote exec and KV store are distinct features.

Why this answer

This setting does not impact the KV store; it only restricts the execution of remote commands via the Consul event system.

143
MCQmedium

You want to run a shell command as a health check. Which field in the service definition specifies the command to execute?

A.check_exec
B.command
C.script
D.action
AnswerC

The 'script' field contains the execution string.

Why this answer

The 'args' or 'script' field is used to define the command the Consul agent executes to perform a script check.

144
Multi-Selecthard

Which THREE of the following are valid session behaviors when a session is invalidated?

Select 3 answers
A.transfer
B.keep
C.delete
D.terminate
E.release
AnswersB, C, E

The lock remains held (if supported by specific implementation logic).

Why this answer

Consul sessions support 'release' (default), 'delete' (deletes the key), and no other behaviors. 'Release' is the standard behavior.

145
MCQhard

You are using Consul Template to observe health status. What happens to a service's health check status if the network segment between the agent and the server is partitioned and the server cannot contact the agent?

A.It is automatically removed from the catalog
B.It remains passing
C.It stays in the last known state
D.It enters a critical state
AnswerD

The server marks the check as critical due to timeout/unreachability.

Why this answer

If a server cannot reach the agent performing the check, the health status becomes unknown or unreachable, often reflected as a critical status for the service until connectivity is restored.

146
Multi-Selecteasy

Which of the following are valid types of health checks in Consul? (Select TWO)

Select 2 answers
A.ICMP
B.TCP
C.UDP
D.SNMP
E.HTTP
AnswersB, E

Valid check type.

Why this answer

Consul natively supports HTTP, TCP, Script, and TTL checks.

147
MCQeasy

Which of the following best describes the 'consul agent -dev' mode in relation to service discovery?

A.It disables DNS interfaces.
B.It forces the service catalog to be stored in Redis.
C.It is suitable for production clusters.
D.It provides a single-node Consul environment for testing.
AnswerD

Dev mode creates a quick, single-node cluster.

Why this answer

Dev mode is for testing and has ephemeral storage.

148
MCQhard

When using 'prepared_queries' for cross-datacenter failover, what does the 'failover' block allow you to specify?

A.The timeout for the WAN gossip.
B.A list of datacenters to attempt for service resolution.
C.The encryption algorithm for failover traffic.
D.The number of retries per node.
AnswerB

This is the primary function of the failover block.

Why this answer

The 'failover' block in a prepared query allows you to define a list of datacenters to try if the local datacenter lookup returns no healthy instances.

149
MCQeasy

Which file format is primarily used for defining services in Consul?

A.YAML
B.TOML
C.JSON
D.XML
AnswerC

JSON is the standard format for Consul configuration.

Why this answer

Consul supports JSON or HCL.

150
MCQeasy

In a Consul health check, what does the 'notes' field provide?

A.The trigger time
B.A human-readable description
C.The expected result
D.The logic for the check
AnswerB

Used for documentation purposes.

Why this answer

The 'notes' field allows operators to add human-readable descriptions of what the health check monitors.

Page 1

Page 2 of 3

Page 3

All pages