CompTIA XK0-006 (CompTIA Linux+) Practice Test 45

Question 440

Infrastructure deployment should reconcile against reviewed configuration stored in a Git repository. Which operating model fits?

  1. GitOps reconciliation
  2. cloud-init
  3. Kickstart
  4. Build once, promote the validated artifact
  5. Shift-left security testing

Explanation

Correct Answer

A:

GitOps treats version-controlled declarative definitions as a desired-state source and automatically reconciles observed resources. Change approval can occur through pull requests.

Incorrect Answers

B:

cloud-init processes metadata and user-data at instance initialization to configure supported images; it does not deliver reconciling infrastructure to Git-stored desired state, which is decisive in this scenario.

C:

Kickstart automates installer choices such as partitions, packages and user creation on supported distributions; the evidence calls for reconciling infrastructure to Git-stored desired state, not merely this separate operation.

D:

Promoting one tested artifact avoids rebuilding a different binary between stages; the task involves reconciling infrastructure to Git-stored desired state, whereas this addresses another subsystem.

E:

Shift-left adds security checks in earlier development and CI stages, reducing late discovery; its scope differs from reconciling infrastructure to Git-stored desired state, so it cannot meet the stated requirement.

Question 441

A Kubernetes workload needs a password injected without putting it in a ConfigMap. Which resource is intended?

  1. Kubernetes Secret
  2. Swarm service with replicas
  3. Kubernetes Pod
  4. docker compose up -d

Explanation

Correct Answer

A:

Secrets hold sensitive data for Pod consumption with access controlled by cluster policy. Base64 encoding alone is not encryption; at-rest protection should be enabled.

Incorrect Answers

B:

A swarm service schedules and reconciles tasks across available nodes; the administrator instead needs storing sensitive cluster configuration separately; this option serves a different purpose.

C:

A Pod is Kubernetes' basic scheduling unit and shares network identity among its containers; it answers a neighboring question rather than storing sensitive cluster configuration separately.

D:

Compose reads service definitions and creates related containers, networks and volumes for an application; that changes a different part of the system; the requested outcome is storing sensitive cluster configuration separately.

Question 442

Several containers must share the same Kubernetes network namespace and lifecycle boundary. Which resource groups them?

  1. Kubernetes Pod
  2. Kubernetes Deployment
  3. ConfigMap
  4. Kubernetes Service
  5. docker compose up -d
  6. Swarm service with replicas

Explanation

Correct Answer

A:

A Pod is Kubernetes' basic scheduling unit and shares network identity among its containers. It is not equivalent to a cluster-wide Service.

Incorrect Answers

B:

Deployments manage replica sets and rolling application updates for stateless workloads; using it would leave grouping colocated containers with shared networking unresolved.

C:

ConfigMaps store non-sensitive key/value configuration consumable by Pods; the requirement is grouping colocated containers with shared networking, outside the effect of this choice.

D:

A Service selects matching Pods and exposes a stable networking identity; it does not deliver grouping colocated containers with shared networking, which is decisive in this scenario.

E:

Compose reads service definitions and creates related containers, networks and volumes for an application; the evidence calls for grouping colocated containers with shared networking, not merely this separate operation.

F:

A swarm service schedules and reconciles tasks across available nodes; the task involves grouping colocated containers with shared networking, whereas this addresses another subsystem.

Question 443

An application needs Kubernetes-managed non-secret configuration values separated from its image. Which object suits it?

  1. Kubernetes Secret
  2. ConfigMap
  3. Kubernetes Pod
  4. Swarm service with replicas

Explanation

Correct Answer

B:

ConfigMaps store non-sensitive key/value configuration consumable by Pods. Passwords and tokens should instead use appropriate secret-management controls.

Incorrect Answers

A:

Secrets hold sensitive data for Pod consumption with access controlled by cluster policy; the task involves supplying non-confidential runtime configuration, whereas this addresses another subsystem.

C:

A Pod is Kubernetes' basic scheduling unit and shares network identity among its containers; that is not equivalent to supplying non-confidential runtime configuration.

D:

A swarm service schedules and reconciles tasks across available nodes; the administrator instead needs supplying non-confidential runtime configuration; this option serves a different purpose.

Question 444

Servers should periodically enforce an assigned desired configuration using a client-server agent model. Which platform commonly uses it?

  1. Puppet module
  2. Puppet class
  3. Facter facts
  4. Puppet agent and server

Explanation

Correct Answer

D:

Puppet agents can fetch catalogs and apply declarative resources from a central service. Its architecture differs from SSH-based Ansible execution.

Incorrect Answers

A:

Puppet modules package classes and supporting content into deployable units; that changes a different part of the system; the requested outcome is periodically reconciling declared state on nodes.

B:

Puppet classes organize declared resources and can be assigned through roles or classification; this does not achieve periodically reconciling declared state on nodes on the system described.

C:

Facter exposes system attributes such as OS family for Puppet classification; it will not provide periodically reconciling declared state on nodes under these conditions.

Question 445

An infrastructure tool must associate each declared object with the remotely created instance between runs. Which OpenTofu artifact provides the mapping?

  1. State file
  2. Provider plugin
  3. tofu plan
  4. OpenTofu

Explanation

Correct Answer

A:

State records tracked resource identities and attributes for planning and reconciliation. It may contain sensitive values and requires access controls.

Incorrect Answers

B:

A provider connects the IaC language to an external API and defines resource schemas; the evidence calls for persisting IaC resource-instance mappings, not merely this separate operation.

C:

The plan evaluates configuration against state and provider data to describe proposed operations; the task involves persisting IaC resource-instance mappings, whereas this addresses another subsystem.

D:

OpenTofu interprets configuration through providers and compares desired resources with stored state; its scope differs from persisting IaC resource-instance mappings, so it cannot meet the stated requirement.

Question 446

OpenTofu needs a plugin to manage resources exposed by a cloud platform's API. What component fills that role?

  1. State file
  2. Backend state locking
  3. Provider plugin
  4. OpenTofu

Explanation

Correct Answer

C:

A provider connects the IaC language to an external API and defines resource schemas. It is separate from the local state file.

Incorrect Answers

A:

State records tracked resource identities and attributes for planning and reconciliation; the administrator instead needs interfacing IaC configurations with vendor APIs; this option serves a different purpose.

B:

A backend that supports locking coordinates state mutations to avoid conflicting writes; it answers a neighboring question rather than interfacing IaC configurations with vendor APIs.

D:

OpenTofu interprets configuration through providers and compares desired resources with stored state; this does not achieve interfacing IaC configurations with vendor APIs on the system described.

Question 447

Linux hosts must be configured remotely over SSH without installing a permanent agent on each managed node. Which framework fits?

  1. Ansible ad hoc command
  2. Inventory
  3. Ansible collection
  4. Ansible
  5. Jinja2 template module

Explanation

Correct Answer

D:

Ansible commonly connects to managed Linux hosts using SSH and executes modules without a resident agent. Inventory and credentials still require management.

Incorrect Answers

A:

Ad hoc execution runs a module or command against selected inventory hosts for a short task; using it would leave applying remote configuration without persistent node agents unresolved.

B:

Inventory declares managed hosts and groups and can be static or dynamically generated; the requirement is applying remote configuration without persistent node agents, outside the effect of this choice.

C:

Collections package modules, roles and plugins under namespaces; it does not deliver applying remote configuration without persistent node agents, which is decisive in this scenario.

E:

Ansible's template module renders Jinja2 variables into managed files; the task involves applying remote configuration without persistent node agents, whereas this addresses another subsystem.

Question 448

A running set of Kubernetes Pods must be reached through a stable virtual endpoint while individual Pod IPs change. Which abstraction fits?

  1. Kubernetes Service
  2. docker compose up -d
  3. ConfigMap
  4. Kubernetes Pod

Explanation

Correct Answer

A:

A Service selects matching Pods and exposes a stable networking identity. It separates discovery from individual Pod lifetime.

Incorrect Answers

B:

Compose reads service definitions and creates related containers, networks and volumes for an application; that is not equivalent to providing a stable endpoint to a changing pod set.

C:

ConfigMaps store non-sensitive key/value configuration consumable by Pods; the administrator instead needs providing a stable endpoint to a changing pod set; this option serves a different purpose.

D:

A Pod is Kubernetes' basic scheduling unit and shares network identity among its containers; it answers a neighboring question rather than providing a stable endpoint to a changing pod set.

Question 449

A playbook requires reusable roles and plugins distributed by a vendor as a namespaced bundle. Which Ansible packaging concept helps?

  1. Playbook
  2. Notify a handler
  3. Gathered facts
  4. Ansible collection

Explanation

Correct Answer

D:

Collections package modules, roles and plugins under namespaces. Version pinning supports repeatable automation.

Incorrect Answers

A:

Playbooks describe plays, hosts and ordered tasks in YAML; this does not achieve packaging and versioning Ansible extension content on the system described.

B:

Handlers run when notified by changed tasks, avoiding unnecessary restarts during no-op runs; it will not provide packaging and versioning Ansible extension content under these conditions.

C:

Ansible facts contain discovered host attributes that condition tasks or templates; using it would leave packaging and versioning Ansible extension content unresolved.

Question 450

Puppet needs the installed operating-system family to choose a conditional resource. Which information source commonly supplies it?

  1. Puppet class
  2. Puppet certificate authority workflow
  3. Puppet module
  4. Facter facts

Explanation

Correct Answer

D:

Facter exposes system attributes such as OS family for Puppet classification. Facts inform catalog decisions but are not configuration resources themselves.

Incorrect Answers

A:

Puppet classes organize declared resources and can be assigned through roles or classification; the evidence calls for detecting system attributes for Puppet manifests, not merely this separate operation.

B:

Puppet's PKI can authenticate agents and the primary server using certificates; the task involves detecting system attributes for Puppet manifests, whereas this addresses another subsystem.

C:

Puppet modules package classes and supporting content into deployable units; its scope differs from detecting system attributes for Puppet manifests, so it cannot meet the stated requirement.

CompTIA Linux+ (XK0-006) Practice Tests