First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Consul Architecture and Deployment Topologies
In a Consul datacenter, which component is responsible for maintaining the authoritative service catalog and running the gossip and RPC layers that agents interact with?
- The DNS forwarding resolver on each host
- The client agent running on each node
- The server agents forming the consensus group Correct answer.
- The consul-template sidecar process
Explanation
Server agents form the consensus group (Raft) that stores the authoritative catalog and KV state, and they participate in both LAN gossip and RPC handling. Client agents forward registrations and queries to servers rather than owning state.
Question 2Consul Architecture and Deployment Topologies
What is the default LAN gossip port used by Consul agents within a datacenter?
- 8500
- 8300
- 8301 Correct answer.
- 8302
Explanation
Consul uses 8301 for LAN gossip (serf) traffic within a datacenter. Port 8300 carries server RPC, 8302 carries WAN gossip between datacenters, and 8500 serves the HTTP API.
Question 3Consul Architecture and Deployment Topologies
Which Consul agent mode is required to participate in the Raft consensus quorum?
- Dev mode
- Proxy mode
- Server mode Correct answer.
- Client mode
Explanation
Only agents started in server mode take part in Raft consensus and hold the replicated state machine. Client agents and proxies interact with servers but never vote in Raft.
Question 4Consul Architecture and Deployment Topologies
A team wants a single Consul datacenter to survive the loss of one server without losing write availability. What is the minimum number of server agents they should deploy?
- 3 Correct answer.
- 5
- 2
- 1
Explanation
Raft requires a majority quorum to commit writes, so three servers tolerate one failure while retaining a 2-of-3 majority. Two servers have no fault tolerance because losing either breaks quorum.
Question 5Consul Architecture and Deployment Topologies
Which Consul feature provides a read-only DNS interface that resolves service names to healthy instance addresses?
- The Serf WAN listener on port 8302
- The built-in DNS server on port 8600 Correct answer.
- The HTTP API on port 8500
- The gRPC xDS server on port 8502
Explanation
Consul's DNS interface listens on port 8600 by default and answers queries for service names, returning only instances that pass health checks. The HTTP API and gRPC endpoints serve different protocols.
Question 6Consul Architecture and Deployment Topologies
What does the Consul `bootstrap_expect` setting control on server agents?
- The maximum number of services per node
- The number of client agents allowed to join
- The number of retry attempts for failed health checks
- The expected server count used to delay Raft bootstrap until quorum is reachable Correct answer.
Explanation
`bootstrap_expect` tells servers how many peers should exist before the cluster self-bootstraps Raft, preventing premature leader election in a partial deployment. It applies to server count, not clients or services.
Question 7Consul Architecture and Deployment Topologies
Which statement best describes Consul's gossip protocol layer?
- It propagates membership and health events among agents using Serf. Correct answer.
- It load-balances DNS queries across datacenters.
- It encrypts all HTTP API traffic with TLS.
- It replicates the KV store across servers using Raft.
Explanation
Consul uses Serf, built on the SWIM protocol, for gossip-based membership and failure detection across LAN and WAN pools. Raft handles state replication, which is a separate layer.
Question 8Consul Architecture and Deployment Topologies
A candidate is designing a Consul deployment and asks which component must be reachable by all agents for service registration to reach the catalog. What should the answer be?
- The web UI asset server
- The local DNS resolver
- The external load balancer
- At least one server agent via RPC Correct answer.
Explanation
Client agents forward registrations and queries to server agents over RPC on port 8300, so servers must be reachable. The UI, load balancer, and DNS resolver are not part of the registration path.
Question 9Consul Architecture and Deployment Topologies
An operator runs three Consul servers and one server fails permanently. What must be done before the cluster can tolerate another server failure?
- Restart the remaining servers with `bootstrap_expect=2`
- Add a replacement server and let it join and catch up via Raft Correct answer.
- Switch the cluster to client-only mode
- Delete the failed server's Raft peer entry and continue with two
Explanation
With three servers, losing one leaves a 2-of-3 quorum that still commits writes but tolerates no further failure. Adding a replacement server restores the three-member quorum and fault tolerance once it catches up.
Question 10Consul Architecture and Deployment Topologies
A company needs Consul service discovery to work across two datacenters with independent failure domains. Which design meets this requirement?
- A single server cluster spanning both sites over a WAN link
- One Consul datacenter per site, federated via WAN gossip Correct answer.
- A single client agent configured with two `data_dir` paths
- Client agents only in one site querying the other site's DNS
Explanation
Consul models independent failure domains as separate datacenters, each with its own servers, joined by WAN gossip for federation. This isolates Raft quorum per site and keeps local queries local.
Question 11Consul Architecture and Deployment Topologies
An operator wants to prevent unauthorized agents from joining the gossip pool. Which configuration achieves this?
- Configure `retry_join` with a static address list
- Set `acl_default_policy` to deny
- Set `encrypt` with a shared gossip key on all agents Correct answer.
- Enable `verify_outgoing` with a CA certificate
Explanation
Gossip encryption with a shared key ensures only agents holding the key can decrypt and participate in the Serf pool. TLS verification protects RPC and HTTP traffic, which is a separate control.
Question 12Consul Architecture and Deployment Topologies
A Consul server is configured with `bootstrap_expect = 3`, but only two servers start. What is the observable result?
- The servers promote a client agent to server to reach quorum
- No leader is elected and the cluster cannot serve writes Correct answer.
- The servers fall back to a single-node bootstrap automatically
- The two servers elect a leader and operate normally
Explanation
Raft bootstrap waits until the expected server count is present; with only two of three servers, no quorum forms and no leader is elected. The cluster stays read-unavailable for catalog writes until the third server joins.
Question 13Consul Architecture and Deployment Topologies
Which endpoint would an operator query to see which server is currently the Raft leader?
- `GET /v1/catalog/services` on a client
- `GET /v1/status/leader` on any agent Correct answer.
- `GET /v1/agent/self` on a client
- `GET /v1/health/service/consul` on any agent
Explanation
The `/v1/status/leader` endpoint returns the address of the current Raft leader and can be served by any agent. Catalog and health endpoints return service data rather than consensus status.
Question 14Consul Architecture and Deployment Topologies
An operator notices that service registrations from a client agent are not appearing in the catalog. Which condition most directly explains this?
- The client cannot reach any server over RPC Correct answer.
- The client's DNS port is blocked
- The client's `data_dir` is on a network filesystem
- The client has `enable_script_checks` disabled
Explanation
Client agents forward registrations to servers over RPC on port 8300; if no server is reachable, registrations cannot reach the catalog. DNS, data directory placement, and script check settings do not block catalog writes.
Question 15Consul Architecture and Deployment Topologies
Which Consul configuration allows a server to be replaced without manually editing the Raft peer set?
- Enabling `autopilot` with `cleanup_dead_servers` Correct answer.
- Adding the new server's address to `retry_join` on the surviving servers
- Manually issuing `consul operator raft remove-peer`
- Setting `raft_protocol` to a higher version
Explanation
Autopilot monitors server health and can automatically remove dead servers and stabilize the quorum when `cleanup_dead_servers` is enabled. Manual peer removal and join lists are alternative but less automated approaches.
Question 16Consul Architecture and Deployment Topologies
A Consul datacenter spans two racks. The operator wants queries to prefer instances in the same rack. Which Consul feature should be configured?
- Network segments
- ACL tokens scoped to racks
- Serf WAN tags
- Prepared queries with `near` parameter Correct answer.
Explanation
Prepared queries support a `near` parameter that sorts results by network round-trip distance, letting callers prefer nearby instances. Network segments isolate gossip pools but do not sort query results.
Question 17Consul Architecture and Deployment Topologies
An operator wants to run Consul servers in Kubernetes but keep Raft state durable across pod restarts. Which practice supports this?
- Setting `bootstrap_expect = 1` for all pods
- Relying on client agents to rebuild server state
- Using `emptyDir` volumes for `data_dir`
- Mounting a persistent volume for each server's `data_dir` Correct answer.
Explanation
Raft state lives in `data_dir`, so each server needs a persistent volume to survive pod rescheduling. Ephemeral volumes lose the Raft log and snapshot, forcing a fresh join and re-sync.
Question 18Consul Architecture and Deployment Topologies
Which statement about Consul's WAN gossip pool is accurate?
- It federates servers across datacenters for cross-site queries Correct answer.
- It carries Raft log replication between servers in the same datacenter
- It stores service catalog entries on client agents
- It replaces the need for TLS on the HTTP API
Explanation
The WAN gossip pool on port 8302 connects server agents across datacenters, enabling federation and cross-datacenter service queries. Raft replication stays within a datacenter's LAN pool.
Question 19Consul Architecture and Deployment Topologies
A team enables ACLs with `acl_default_policy = deny`. A service registration by a client agent fails with permission denied. What is the most likely cause?
- The gossip encryption key is missing
- The agent's DNS port is misconfigured
- The server's `data_dir` is read-only
- The agent's token lacks `service:write` for that service Correct answer.
Explanation
With a deny default policy, every operation requires a token granting the specific capability; registering a service needs `service:write` on that service name. Missing gossip keys or DNS settings produce different failures.
Question 20Consul Architecture and Deployment Topologies
An operator must ensure that Consul servers in a new datacenter do not form a Raft quorum with servers in another datacenter. Which configuration prevents this?
- Enabling `translate_wan_addrs` on all clients
- Setting `server = true` and joining only the local LAN pool Correct answer.
- Setting `disable_keyring_file = true`
- Setting `retry_join_wan` to the remote datacenter's servers
Explanation
Raft quorum forms only among servers in the same LAN gossip pool, so a new datacenter's servers must join their local pool and be federated separately via WAN. Joining remote servers via WAN does not merge Raft groups.
Question 21Consul Architecture and Deployment Topologies
A Consul cluster loses its Raft leader and the remaining servers cannot elect a new one. Which condition best explains this?
- The HTTP API is bound to localhost only
- The DNS interface is disabled on the servers
- The remaining servers number fewer than a majority of the configured peers Correct answer.
- The client agents are running an older Consul version
Explanation
Leader election requires a majority of the Raft peer set to be reachable; if too few servers remain, no candidate can win the vote. Client versions, DNS settings, and API bind addresses do not affect Raft elections.
Question 22Consul Architecture and Deployment Topologies
An operator wants to upgrade a three-server Consul cluster with no downtime. Which approach preserves quorum throughout?
- Upgrade all servers simultaneously to minimize the window
- Downgrade `bootstrap_expect` to 1 during the upgrade
- Stop all servers, upgrade binaries, then restart together
- Upgrade one server at a time, waiting for it to rejoin and become healthy before proceeding Correct answer.
Explanation
Rolling upgrades keep a majority of servers available at all times, so quorum and leader election continue to work. Simultaneous restarts or stopping the whole cluster break quorum and cause unavailability.
Question 23Consul Architecture and Deployment Topologies
A team runs Consul servers behind a load balancer for the HTTP API. What must the load balancer preserve for Raft-related operations to work correctly?
- Round-robin distribution that ignores server role
- TLS termination only, with plaintext to backends
- Sticky sessions keyed on client IP for all requests
- The ability to forward requests to the current leader for write operations Correct answer.
Explanation
Write operations must reach the Raft leader; servers can forward requests internally, but the design must not block that forwarding or misroute writes to non-leaders without forwarding enabled. Preserving leader reachability keeps writes consistent.
Question 24Consul Architecture and Deployment Topologies
An operator observes that a newly joined server never becomes a voting member. Which check is most relevant?
- Whether the server's `data_dir` is on a different filesystem
- Whether the DNS interface is enabled
- Whether the client agents have ACL tokens
- Whether the server appears in `consul operator raft list-peers` as a voter Correct answer.
Explanation
`consul operator raft list-peers` shows each peer's role and voter status; a new server that stays non-voter indicates it has not caught up or was added as non-voter. Data directory placement and client tokens do not determine voter status.
Question 25Consul Architecture and Deployment Topologies
An operator wants cross-datacenter service discovery where a query in datacenter A returns instances in datacenter B when no local instances are healthy. Which mechanism supports this?
- Client agent `retry_join_wan` setting
- `disable_remote_exec` on all agents
- Prepared query with `failover` configuration Correct answer.
- Server `bootstrap_expect` tuning
Explanation
Prepared queries can define failover targets so that when local instances are unhealthy or absent, results come from a remote datacenter. This requires datacenters to be federated via WAN gossip.
Question 26Consul Architecture and Deployment Topologies
In a standard Consul deployment, which port must be reachable on every server agent so that other servers can perform Raft replication and leader election traffic?
- 8301
- 8302
- 8300 Correct answer.
- 8600
Explanation
Consul assigns distinct ports to each traffic class: 8300 carries server Raft and RPC traffic, 8301 carries LAN gossip, 8302 carries WAN gossip, and 8600 serves DNS. Raft replication and leader election occur over the server RPC port, so 8300 must be open between all servers in a datacenter.
Question 27Consul Architecture and Deployment Topologies
An operator is planning a Consul datacenter and wants to know the minimum number of server agents needed to survive the loss of one server while still electing a Raft leader. How many servers should be deployed?
- Two
- Four
- Five
- Three Correct answer.
Explanation
Raft requires a strict majority of voting servers to elect a leader and commit entries, so the quorum for N servers is floor(N/2)+1. With three servers, quorum is two, meaning one server can fail and the remaining two still form a majority. Two servers cannot tolerate any failure because losing one leaves only one of two, which is not a majority.
Question 28Consul Architecture and Deployment Topologies
An operator wants an on-premises Consul datacenter to be able to query services registered in a Consul datacenter running in the cloud. Which statement describes how Consul supports this natively?
- Client agents in one datacenter must register directly against servers in the other datacenter's LAN gossip pool.
- Each datacenter runs its own servers, and servers join a shared WAN gossip pool while catalogs remain local to each datacenter. Correct answer.
- All servers across both datacenters must form a single Raft group so the catalog is replicated synchronously.
- Cross-datacenter discovery requires a federation layer such as an external DNS zone transfer between the two Consul clusters.
Explanation
Consul treats each datacenter as an independent unit with its own servers, Raft group, and catalog, and servers from different datacenters join a shared WAN gossip pool for federation awareness. A query can be forwarded to a remote datacenter's servers over the server RPC port, so no shared Raft group or external federation layer is required. This design keeps failure domains independent while still enabling cross-datacenter lookups.
Question 29Consul Architecture and Deployment Topologies
A platform team runs Consul servers as pods in Kubernetes and wants Raft state to survive pod rescheduling. Which configuration practice supports this requirement?
- Rely on the Consul snapshot restore API at pod startup to rebuild Raft state from the leader.
- Store Raft state in an emptyDir volume so it is recreated cleanly each time the pod restarts.
- Configure the servers to keep Raft state only in memory and rebuild it from gossip on each start.
- Mount a persistent volume for the data directory and reference it through `data_dir` so Raft logs and snapshots persist. Correct answer.
Explanation
Consul servers persist Raft logs, snapshots, and other state under the directory set by `data_dir`, so that path must be backed by durable storage that outlives the pod. A persistent volume mounted at `data_dir` lets a rescheduled server rejoin with its Raft state intact. Ephemeral or in-memory storage forces the server to rejoin as a fresh member and risks quorum loss during rolling restarts.
Question 30Consul Architecture and Deployment Topologies
An operator must ensure that a newly deployed Consul datacenter never joins the Raft peer set of an existing datacenter, while still allowing cross-datacenter service lookups. Which configuration achieves this?
- Set the same `datacenter` value on all servers and use `retry_join` with the WAN addresses of the existing servers.
- Set `bootstrap_expect` equal to the combined server count across both datacenters so a single quorum spans both.
- Set a distinct `datacenter` value and a distinct `encrypt` key on the new servers, and do not add them to the existing Raft peer set. Correct answer.
- Set a distinct `datacenter` value and point `retry_join` at the existing datacenter's server LAN addresses.
Explanation
Raft membership is scoped to a datacenter, and servers only attempt to join a Raft group when they share the `datacenter` value and are introduced as peers. Giving the new servers a distinct `datacenter` label, using their own gossip encryption key, and never adding them to the existing peer set keeps the Raft groups separate. Cross-datacenter lookups still work because servers forward queries to remote datacenters over the server RPC port.
Question 31Cluster Bootstrapping, Server Management, and Upgrades
A Consul server is started with -bootstrap-expect=3 and no existing cluster state. How does the Raft bootstrap process behave when only two servers are running?
- The two servers form a quorum and elect a leader immediately.
- Each server elects itself leader and the cluster splits permanently.
- One server bootstraps alone after a fixed 30-second timeout.
- No leader is elected until all three servers have joined and are reachable. Correct answer.
Explanation
With -bootstrap-expect=N, Consul servers wait until N servers have joined before performing Raft bootstrap; until then no leader is elected and the cluster cannot serve writes. This prevents split-brain scenarios where multiple servers bootstrap independently.
Question 32Cluster Bootstrapping, Server Management, and Upgrades
Which Consul CLI flag or subcommand is used to recover a cluster whose servers have lost quorum and cannot elect a leader?
- consul operator raft remove-peer
- consul operator raft list-peers
- consul force-leave
- consul snapshot restore Correct answer.
Explanation
When quorum is permanently lost (for example, a majority of servers is unrecoverable), the supported recovery path is to restore a snapshot onto a new cluster. Snapshot restore rebuilds Raft state and re-establishes a functioning leader.
Question 33Cluster Bootstrapping, Server Management, and Upgrades
Which command produces a Consul snapshot suitable for restoring cluster state later?
- consul kv export > backup.snap
- consul catalog nodes -detailed > backup.snap
- consul operator raft list-peers > backup.snap
- consul snapshot save backup.snap Correct answer.
Explanation
consul snapshot save writes a point-in-time Raft snapshot containing KV data, service catalog, ACLs, and other state. Restoring it later via consul snapshot restore rebuilds the cluster to that state.
Question 34Cluster Bootstrapping, Server Management, and Upgrades
You are planning a three-server Consul cluster. Which failure tolerance does this configuration provide for Raft quorum?
- Zero failures - all three servers must be online.
- Three server failures while maintaining quorum.
- Two server failures while maintaining quorum.
- One server failure while maintaining quorum. Correct answer.
Explanation
For N servers, Raft needs a majority (floor(N/2)+1) to maintain quorum. Three servers tolerate one failure; two failures leave only one server, which cannot form a majority.
Question 35Cluster Bootstrapping, Server Management, and Upgrades
What is the primary purpose of upgrading Consul servers one at a time rather than all simultaneously?
- To allow clients to keep using the old API version.
- To preserve Raft quorum and leader election throughout the upgrade. Correct answer.
- To reduce disk usage during the upgrade.
- To avoid regenerating gossip encryption keys.
Explanation
A rolling upgrade keeps a majority of servers online at any moment so Raft can maintain quorum and elect a leader. Stopping all servers simultaneously causes an outage and risks election issues on restart.
Question 36Cluster Bootstrapping, Server Management, and Upgrades
After upgrading Consul servers across a major version, what should be done with the gossip encryption key before starting the new servers?
- Remove the key entirely so servers can negotiate one automatically.
- Rotate the key to a new value only on the new servers.
- Keep the same key configured on every server and client during the upgrade. Correct answer.
- Configure the new servers with a different key than the old servers.
Explanation
All agents, servers and clients, must share the same gossip encryption key to communicate over the LAN/WAN gossip pools. Mixing keys during a rolling upgrade causes gossip join failures and breaks the cluster.
Question 37Cluster Bootstrapping, Server Management, and Upgrades
Which Consul configuration parameter controls whether a server participates in Raft as a voting member versus running as a non-voter?
- non_voter Correct answer.
- autopilot.cleanup_dead_servers
- bootstrap_expect
- raft_multiplier
Explanation
Setting non_voter = true starts a server as a Raft non-voter. Non-voters receive log replication but do not vote in elections, useful for read scale-out or safe server additions.
Question 38Cluster Bootstrapping, Server Management, and Upgrades
Autopilot is enabled on a healthy Consul cluster. What happens when a server is marked as failed and remains failed beyond the configured threshold?
- Autopilot automatically removes the dead server from the Raft configuration. Correct answer.
- Autopilot restarts the failed server via the API.
- Autopilot disables Raft and switches to gossip-only mode.
- Autopilot promotes a client to server automatically.
Explanation
Autopilot monitors server health and, when cleanup_dead_servers is enabled, removes servers that remain unhealthy past the threshold from Raft configuration. This keeps quorum healthy without manual intervention.
Question 39Cluster Bootstrapping, Server Management, and Upgrades
A Consul server is being retired. Which command removes it cleanly from the Raft configuration on the current leader?
- consul leave -server
- consul operator raft remove-peer -address=<server-ip> Correct answer.
- consul members -remove <server>
- consul catalog deregister <server>
Explanation
consul operator raft remove-peer removes a specific server from the Raft configuration. Running it on the leader ensures the change is applied to the cluster's consensus membership.
Question 40Cluster Bootstrapping, Server Management, and Upgrades
Which Consul server configuration helps avoid accidental cluster splits when a new server is started with a stale data directory?
- disable_keyring_file = true
- server = false
- verify_outgoing = false
- bootstrap_expect is set consistently across all servers Correct answer.
Explanation
Setting bootstrap_expect to the same value on every server ensures none of them self-bootstraps a new cluster prematurely. A new server with a stale data directory will attempt to join existing peers instead of forming a competing cluster.
Question 41Cluster Bootstrapping, Server Management, and Upgrades
What does the raft_multiplier configuration parameter primarily affect?
- The frequency of snapshots saved to disk.
- The size of Raft log entries.
- The Raft heartbeat and election timeout scaling. Correct answer.
- The number of Raft peers required for quorum.
Explanation
raft_multiplier scales Raft heartbeat and election timeouts, allowing operators to tune for high-latency environments or faster failure detection. It does not change quorum size or log content.
Question 42Cluster Bootstrapping, Server Management, and Upgrades
After a Consul server upgrade, the operator notices new servers are not being elected leader. Which check best explains why?
- The new servers were configured with server = false.
- The new servers were added as non_voter and the cluster needs time or promotion to elect them. Correct answer.
- The new servers have different ACL tokens.
- The new servers have a different datacenter name.
Explanation
Non-voters receive Raft log entries but cannot win elections. If new servers were added with non_voter = true, they will not become leader until promoted to voters.
Question 43Cluster Bootstrapping, Server Management, and Upgrades
Which command verifies that a Consul server has joined the Raft configuration and shows its voter status?
- consul info
- consul members
- consul operator raft list-peers Correct answer.
- consul catalog services
Explanation
consul operator raft list-peers prints the current Raft configuration, including each peer's address, state (Leader/Follower), and voter status. This is the authoritative view of Raft membership.
Question 44Cluster Bootstrapping, Server Management, and Upgrades
Which Consul server parameter controls how often Raft snapshots are taken based on the number of log entries?
- snapshot_threshold Correct answer.
- log_level
- raft_snapshot_retain
- snapshot_interval
Explanation
snapshot_threshold sets how many Raft log entries trigger a snapshot. snapshot_interval controls the time-based snapshot cadence. Both help bound Raft log growth on disk.
Question 45Cluster Bootstrapping, Server Management, and Upgrades
What is the recommended minimum number of Consul servers for a production cluster?
- Five
- Three Correct answer.
- One
- Two
Explanation
Three servers is the minimum production-recommended size because it tolerates one failure while maintaining quorum. Two servers provide no failure tolerance because losing one loses quorum.
Question 46Cluster Bootstrapping, Server Management, and Upgrades
Which command is used to check the health of a Consul server as seen by Autopilot?
- consul monitor -server
- consul health state
- consul operator autopilot get-config
- consul operator autopilot state Correct answer.
Explanation
consul operator autopilot state shows Autopilot's view of server health, including which servers are healthy, which are voters, and any pending promotions or removals.
Question 47Cluster Bootstrapping, Server Management, and Upgrades
A Consul server's data directory is accidentally deleted. What is the safest recovery action?
- Restart the server and let it rejoin; it will resync from peers.
- Delete the data directories on all peers so they resync together.
- Run consul force-leave on the affected server only.
- Restore a recent snapshot into a fresh data directory before starting the agent. Correct answer.
Explanation
A server with an empty data directory cannot simply rejoin as a voter; it lacks Raft state. Restoring a recent snapshot into a fresh data directory rebuilds state before rejoining the cluster.
Question 48Cluster Bootstrapping, Server Management, and Upgrades
Which Consul configuration option must be set on every server to use the same gossip encryption key?
- encrypt_verify_incoming
- key_file
- encrypt Correct answer.
- acl.tokens.agent
Explanation
The encrypt parameter specifies the gossip encryption key (base64-encoded) used by the agent. All agents in the cluster must share the same key to communicate over the gossip pools.
Question 49Cluster Bootstrapping, Server Management, and Upgrades
What is the effect of setting server = true on a Consul agent that was previously a client?
- It promotes the agent to leader immediately.
- It converts the agent to a server participating in Raft consensus. Correct answer.
- It enables gossip encryption on the agent.
- It disables the HTTP API on the agent.
Explanation
Setting server = true makes the agent a Consul server that participates in the Raft consensus protocol. It does not automatically make it leader; leadership is elected by the Raft peers.
Question 50Cluster Bootstrapping, Server Management, and Upgrades
Which Consul command triggers an Autopilot-driven promotion of a non-voter to a voter?
- consul operator raft promote-peer Correct answer.
- consul operator raft add-peer
- consul operator autopilot set-config -server-stabilization-time
- consul operator autopilot state
Explanation
consul operator raft promote-peer promotes a non-voter to a voting member. This is used when adding servers safely as non-voters first, then promoting after they catch up.