×

Trending Technologies MCQs

GitOps MCQs (Multiple-Choice Questions)

GitOps is a modern approach to managing infrastructure and application deployments using Git repositories as the source of truth. It applies version control, automation, and continuous reconciliation to maintain the desired state of systems.

GitOps MCQs

GitOps uses declarative configuration files stored in Git repositories to describe how applications and infrastructure should operate. Automated controllers monitor these repositories and reconcile the actual system state with the desired state defined in the configuration.

GitOps is widely used in Kubernetes environments and modern DevOps workflows. Tools such as Argo CD and Flux help automate application deployments, configuration management, synchronization, and continuous delivery while providing version history and traceability.

List of GitOps MCQs

The following GitOps MCQs cover fundamental concepts, operating principles, Git repositories, declarative configuration, continuous reconciliation, Kubernetes, deployment automation, security, monitoring, and popular GitOps tools. Each question includes four options, the correct answer, and an explanation.

1. What is GitOps?

  1. A programming language used for developing websites
  2. A practice of managing infrastructure and application deployments through Git-based workflows
  3. A database management system
  4. A tool used only for writing application documentation

Answer: B) A practice of managing infrastructure and application deployments through Git-based workflows

Explanation:

GitOps uses Git repositories as the source of truth for declarative infrastructure and application configurations. Automated systems apply and maintain the desired state in the target environment.

2. What is the primary objective of GitOps?

  1. To eliminate version control systems
  2. To replace all application programming languages
  3. To automate deployments and maintain the desired system state using Git
  4. To increase manual infrastructure configuration

Answer: C) To automate deployments and maintain the desired system state using Git

Explanation:

GitOps automates application and infrastructure management by connecting Git-based configuration changes with deployment and reconciliation processes. It improves consistency, traceability, and operational control.

3. Which system acts as the source of truth in GitOps?

  1. Git repository
  2. Application log file
  3. Local desktop folder
  4. Manual deployment checklist

Answer: A) Git repository

Explanation:

In GitOps, the Git repository stores the desired configuration of applications and infrastructure. Automated controllers use this configuration to determine how the target environment should be configured.

4. What does GitOps stand for?

  1. Global Integration Operations
  2. General Infrastructure Processing
  3. Graphical Internet Operations
  4. Git-based Operations

Answer: D) Git-based Operations

Explanation:

GitOps refers to operational practices that use Git as the central mechanism for managing and tracking infrastructure and application configuration changes.

5. Which version control system is most commonly associated with GitOps?

  1. Subversion only
  2. Git
  3. Microsoft Access
  4. Apache Hadoop

Answer: B) Git

Explanation:

Git is a distributed version control system used to track changes in source code and configuration files. GitOps relies on Git repositories to maintain configuration history and provide a controlled workflow for changes.

6. What is the role of a GitOps controller?

  1. To design application user interfaces
  2. To manage employee records
  3. To monitor configuration changes and reconcile the actual state with the desired state
  4. To replace Git repositories

Answer: C) To monitor configuration changes and reconcile the actual state with the desired state

Explanation:

A GitOps controller continuously observes the target environment and compares its actual state with the desired configuration stored in Git. It takes corrective actions when differences are detected.

7. Which tool is commonly used for GitOps-based continuous delivery in Kubernetes?

  1. Argo CD
  2. Adobe Photoshop
  3. Microsoft Word
  4. VLC Media Player

Answer: A) Argo CD

Explanation:

Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. It monitors Git repositories and synchronizes application configurations with Kubernetes clusters.

8. Which of the following is another popular GitOps tool for Kubernetes?

  1. MySQL Workbench
  2. Figma
  3. Jenkins
  4. Flux

Answer: D) Flux

Explanation:

Flux is an open-source GitOps toolkit for Kubernetes. It uses controllers to automate application deployment and configuration management based on declarative sources.

9. What does declarative configuration mean in GitOps?

  1. Specifying every manual command required to deploy an application
  2. Describing the desired final state of an application or infrastructure
  3. Managing infrastructure without configuration files
  4. Performing all deployments through graphical interfaces

Answer: B) Describing the desired final state of an application or infrastructure

Explanation:

Declarative configuration defines what the system should look like rather than specifying every operation needed to reach that state. GitOps controllers use these definitions to manage the target environment.

10. What is continuous reconciliation in GitOps?

  1. Manually reviewing application screenshots
  2. Deleting configuration files after deployment
  3. Repeatedly comparing actual system state with desired state and correcting differences
  4. Disabling automated deployment processes

Answer: C) Repeatedly comparing actual system state with desired state and correcting differences

Explanation:

Continuous reconciliation is a core GitOps principle. Controllers periodically or eventfully inspect the target environment and work to make it match the configuration stored in the source repository.

11. Which platform is most commonly associated with GitOps deployment workflows?

  1. Kubernetes
  2. Microsoft Excel
  3. Adobe Illustrator
  4. LibreOffice Writer

Answer: A) Kubernetes

Explanation:

Kubernetes is widely used with GitOps because it supports declarative resource definitions and controllers that continuously reconcile actual resources with their desired state.

12. What is the purpose of a GitOps repository?

  1. To store employee payroll information
  2. To manage office inventory
  3. To host application videos
  4. To store version-controlled application and infrastructure configuration

Answer: D) To store version-controlled application and infrastructure configuration

Explanation:

A GitOps repository contains declarative configuration files, manifests, deployment definitions, and related resources. It provides a versioned record of the desired system state.

13. What is a Git commit?

  1. A command that deletes an entire repository
  2. A recorded snapshot of changes in a Git repository
  3. A method for creating cloud virtual machines
  4. A Kubernetes networking resource

Answer: B) A recorded snapshot of changes in a Git repository

Explanation:

A Git commit records changes to files in a repository. In GitOps workflows, commits provide a traceable history of modifications to application and infrastructure configurations.

14. Why are pull requests useful in GitOps?

  1. They automatically remove all infrastructure resources
  2. They disable version control history
  3. They allow configuration changes to be reviewed before merging
  4. They replace deployment controllers

Answer: C) They allow configuration changes to be reviewed before merging

Explanation:

Pull requests provide a structured way to review proposed configuration changes. Team members can inspect modifications, run automated checks, and approve changes before they become part of the desired configuration.

15. What is the purpose of a Git branch?

  1. To support independent development and configuration changes
  2. To replace the Git repository
  3. To store Kubernetes cluster logs permanently
  4. To disable collaboration between developers

Answer: A) To support independent development and configuration changes

Explanation:

Git branches allow developers to work on separate changes without immediately modifying the main branch. In GitOps, branches can be used to prepare and review deployment configuration updates.

16. What is a Kubernetes manifest?

  1. A document containing employee details
  2. A binary application executable
  3. A graphical dashboard for cloud billing
  4. A YAML or JSON file that describes Kubernetes resources and their desired configuration

Answer: D) A YAML or JSON file that describes Kubernetes resources and their desired configuration

Explanation:

Kubernetes manifests define resources such as Deployments, Services, ConfigMaps, and Secrets. GitOps tools can monitor repositories containing these manifests and apply their configurations to clusters.

17. What is the purpose of the Kubernetes Deployment resource?

  1. To manage employee access permissions
  2. To manage replicated application Pods and their rollout updates
  3. To store source code in Git
  4. To monitor cloud provider billing

Answer: B) To manage replicated application Pods and their rollout updates

Explanation:

A Kubernetes Deployment manages application Pods through ReplicaSets. It supports declarative updates, scaling, and controlled rollout of application versions.

18. What does synchronization mean in GitOps?

  1. Copying application files to a personal computer
  2. Deleting all configuration files from Git
  3. Applying the desired configuration from the source repository to the target environment
  4. Disabling cluster monitoring

Answer: C) Applying the desired configuration from the source repository to the target environment

Explanation:

Synchronization brings the target environment into alignment with the desired configuration stored in Git. GitOps tools such as Argo CD can perform this operation automatically or through an approved manual action.

19. What does an OutOfSync status indicate in Argo CD?

  1. The live application state differs from the desired state in Git
  2. The Git repository has been permanently deleted
  3. The Kubernetes cluster has no network connection in every case
  4. The application has been removed from the service catalog

Answer: A) The live application state differs from the desired state in Git

Explanation:

Argo CD reports an application as OutOfSync when the live resources do not match the desired configuration in the repository. Synchronization can be used to apply the required changes.

20. What does a Synced status generally indicate in Argo CD?

  1. The application has no Git repository
  2. The application is permanently stopped
  3. The cluster has no resources
  4. The live application configuration matches the desired configuration in Git

Answer: D) The live application configuration matches the desired configuration in Git

Explanation:

A Synced status indicates that the live resources are aligned with the desired configuration tracked by Argo CD. It does not, by itself, guarantee that the application is healthy or functioning correctly.

21. What is the purpose of automated synchronization in GitOps?

  1. To require manual deployment for every configuration change
  2. To automatically apply approved changes from the Git repository to the target environment
  3. To delete Git history after each deployment
  4. To prevent controllers from checking configuration changes

Answer: B) To automatically apply approved changes from the Git repository to the target environment

Explanation:

Automated synchronization allows GitOps controllers to apply repository changes without requiring a person to initiate each deployment. Depending on the tool and configuration, additional controls such as validation and approval may be used.

22. What is the pull-based deployment model in GitOps?

  1. A model in which developers manually copy files to production servers
  2. A method of deploying applications without configuration files
  3. A model in which an agent or controller inside the target environment retrieves desired configuration from a repository
  4. A system that prevents target environments from accessing Git repositories

Answer: C) A model in which an agent or controller inside the target environment retrieves desired configuration from a repository

Explanation:

In a pull-based GitOps model, a controller running in or associated with the target environment monitors the source repository and applies changes. This reduces the need for external deployment systems to directly access the cluster.

23. What is a push-based deployment model?

  1. An external automation system sends deployment changes to the target environment
  2. A controller inside the cluster retrieves all configurations from Git
  3. A developer manually changes every running container
  4. A repository automatically deletes all previous commits

Answer: A) An external automation system sends deployment changes to the target environment

Explanation:

In a push-based deployment model, an external system initiates deployment operations and sends changes to the target environment. Traditional CI/CD pipelines often use this approach.

24. What is the main security advantage of a pull-based GitOps model?

  1. It removes the need for authentication
  2. It allows all users to access the production cluster
  3. It prevents Git repositories from being protected
  4. It can reduce the need to expose cluster credentials to external deployment systems

Answer: D) It can reduce the need to expose cluster credentials to external deployment systems

Explanation:

In a pull-based model, the controller inside the target environment initiates communication with the repository. This can reduce the number of external systems that require direct access to cluster credentials.

25. What is the role of a CI pipeline in a GitOps workflow?

  1. To permanently replace Git repositories
  2. To build, test, scan, and publish application artifacts or configuration changes
  3. To manage employee payroll information
  4. To disable automated deployment processes

Answer: B) To build, test, scan, and publish application artifacts or configuration changes

Explanation:

Continuous Integration pipelines commonly build and test application code, perform security checks, and publish container images. A subsequent Git change can update the desired image version, which a GitOps controller then deploys.

26. What is the relationship between CI and GitOps?

  1. They are identical processes
  2. GitOps replaces all software testing activities
  3. CI builds and validates artifacts, while GitOps manages deployment through declarative configuration
  4. CI is used only for database administration

Answer: C) CI builds and validates artifacts, while GitOps manages deployment through declarative configuration

Explanation:

CI focuses on integrating and validating code changes. GitOps focuses on maintaining and deploying the desired application and infrastructure state. They work together in many modern software delivery workflows.

27. What is a GitOps reconciliation loop?

  1. A repeated process of observing the system, comparing states, and applying corrective actions
  2. A method of creating unlimited Git branches
  3. A process of deleting application logs
  4. A technique for manually installing operating systems

Answer: A) A repeated process of observing the system, comparing states, and applying corrective actions

Explanation:

The reconciliation loop is the mechanism through which GitOps controllers maintain the desired state. It continuously checks the environment and corrects differences according to the configured reconciliation behavior.

28. What happens when someone manually changes a resource managed by GitOps?

  1. The Git repository is automatically deleted
  2. The application must always be rebuilt
  3. The GitOps controller permanently stops working
  4. The controller may detect the drift and restore the configuration defined in Git

Answer: D) The controller may detect the drift and restore the configuration defined in Git

Explanation:

GitOps controllers compare actual resources with the desired configuration. When manual changes cause drift, the controller can restore the declared state if reconciliation and self-healing behavior are configured.

29. What is self-healing in GitOps?

  1. Automatically repairing application source code errors
  2. Automatically correcting configuration drift to restore the desired state
  3. Replacing all application developers
  4. Deleting Git repositories after deployment

Answer: B) Automatically correcting configuration drift to restore the desired state

Explanation:

Self-healing is a GitOps capability in which controllers detect differences between actual and desired configurations and automatically correct them. It helps maintain consistency in managed environments.

30. Which file format is commonly used for Kubernetes configuration in GitOps repositories?

  1. MP3
  2. JPEG
  3. YAML
  4. PDF

Answer: C) YAML

Explanation:

YAML is commonly used to define Kubernetes resources such as Deployments, Services, ConfigMaps, and Ingress objects. GitOps tools can monitor repositories containing these files and apply their definitions.

31. What is Helm used for in GitOps workflows?

  1. Managing employee access cards
  2. Monitoring physical server temperatures
  3. Replacing Kubernetes entirely
  4. Packaging and managing Kubernetes applications using charts

Answer: D) Packaging and managing Kubernetes applications using charts

Explanation:

Helm is a package manager for Kubernetes. Helm charts define application resources and configurable values, allowing GitOps tools to manage application releases through version-controlled configurations.

32. What is Kustomize commonly used for?

  1. Customizing Kubernetes configuration using reusable bases and overlays
  2. Building desktop graphics applications
  3. Managing database transactions
  4. Replacing Git version control

Answer: A) Customizing Kubernetes configuration using reusable bases and overlays

Explanation:

Kustomize allows users to customize Kubernetes manifests without requiring a template language. It supports reusable bases and environment-specific overlays, making it useful in GitOps repositories.

33. What is a GitOps application definition in Argo CD?

  1. A document describing employee responsibilities
  2. A configuration that identifies the source repository, target cluster, namespace, and deployment path
  3. A database backup file
  4. A container image stored in a registry

Answer: B) A configuration that identifies the source repository, target cluster, namespace, and deployment path

Explanation:

An Argo CD Application resource defines how a repository or configuration source maps to a destination cluster and namespace. It also specifies the desired deployment path and synchronization behavior.

34. What is the purpose of an ApplicationSet in Argo CD?

  1. To store application passwords in plain text
  2. To replace Kubernetes namespaces
  3. To delete all application resources automatically
  4. To generate and manage multiple Argo CD Application resources from templates and generators

Answer: D) To generate and manage multiple Argo CD Application resources from templates and generators

Explanation:

Argo CD ApplicationSet helps manage applications across multiple clusters, environments, or repository paths. It uses templates and generators to create Application resources automatically.

35. What is the purpose of a GitOps repository structure?

  1. To store unrelated personal documents
  2. To replace all infrastructure documentation
  3. To organize application manifests, environment configurations, and deployment definitions
  4. To prevent teams from reusing configuration files

Answer: C) To organize application manifests, environment configurations, and deployment definitions

Explanation:

A well-organized GitOps repository makes configuration easier to understand and maintain. Teams may separate application definitions, environment overlays, infrastructure resources, and shared components into structured directories.

36. What is the purpose of separating development, staging, and production configurations in GitOps?

  1. To support environment-specific settings and controlled promotion of changes
  2. To eliminate configuration versioning
  3. To make all environments use unrelated application versions permanently
  4. To prevent testing before production deployment

Answer: A) To support environment-specific settings and controlled promotion of changes

Explanation:

Different environments may require different resource settings, replicas, endpoints, and security configurations. Separating these settings helps teams test changes before promoting them to production.

37. How can GitOps support rollback?

  1. By permanently deleting previous commits
  2. By disabling the reconciliation controller
  3. By replacing Git with manual configuration
  4. By reverting the repository to a previously approved configuration version

Answer: D) By reverting the repository to a previously approved configuration version

Explanation:

Git maintains a history of configuration changes. Teams can revert a problematic change or restore an earlier approved version, allowing the GitOps controller to reconcile the environment with that configuration.

38. What is the role of container registries in GitOps workflows?

  1. To store employee records
  2. To store and distribute container images used by applications
  3. To replace Git repositories
  4. To manage source code branches

Answer: B) To store and distribute container images used by applications

Explanation:

Container registries store application images that are referenced by Kubernetes manifests or deployment configurations. CI pipelines commonly publish images to registries, while GitOps updates the desired image version in Git.

39. Why are immutable container image tags or digests useful in GitOps?

  1. They automatically remove application dependencies
  2. They eliminate the need for image registries
  3. They help identify the exact image version intended for deployment
  4. They prevent applications from being updated

Answer: C) They help identify the exact image version intended for deployment

Explanation:

Using unique image tags or image digests makes deployments more predictable by identifying a specific image version. This improves traceability and reduces uncertainty that can occur when mutable tags such as `latest` are used.

40. What is the purpose of secret management in GitOps?

  1. To securely handle sensitive values such as passwords, tokens, and API keys
  2. To store all credentials in publicly accessible Git repositories
  3. To disable authentication for Kubernetes clusters
  4. To replace application monitoring

Answer: A) To securely handle sensitive values such as passwords, tokens, and API keys

Explanation:

Secret management protects sensitive information used by applications and infrastructure. GitOps workflows can integrate with external secret managers or encryption solutions to avoid exposing confidential values in plain-text repositories.

41. Which tool can help manage encrypted secrets in GitOps repositories?

  1. Microsoft Paint
  2. Sealed Secrets
  3. VLC Media Player
  4. Google Slides

Answer: B) Sealed Secrets

Explanation:

Sealed Secrets is a Kubernetes-focused tool that allows encrypted secret resources to be stored in Git repositories. A controller in the cluster decrypts the sealed values into Kubernetes Secrets using the corresponding private key.

42. What is the purpose of GitOps monitoring?

  1. To manage employee attendance
  2. To replace source code management
  3. To disable deployment alerts
  4. To track synchronization status, reconciliation errors, application health, and deployment activity

Answer: D) To track synchronization status, reconciliation errors, application health, and deployment activity

Explanation:

Monitoring helps teams understand whether GitOps controllers are operating correctly and whether applications are synchronized and healthy. It also helps identify failed deployments and reconciliation problems.

43. What does a GitOps controller do when it cannot access the source repository?

  1. It may fail to retrieve new configuration changes and report reconciliation errors
  2. It automatically deletes the entire cluster
  3. It permanently removes all application images
  4. It converts the repository into a database

Answer: A) It may fail to retrieve new configuration changes and report reconciliation errors

Explanation:

A GitOps controller needs access to its configured source to retrieve desired state changes. If repository access fails, it may continue running the current workloads but cannot reliably process new configuration updates until connectivity is restored.

44. Which practice improves security in a GitOps environment?

  1. Allowing unrestricted repository access
  2. Storing production credentials in public files
  3. Using access controls, protected branches, and secure secret management
  4. Disabling audit logs and deployment reviews

Answer: C) Using access controls, protected branches, and secure secret management

Explanation:

GitOps security depends on protecting both repositories and deployment environments. Role-based access, branch protection, code reviews, signed commits where appropriate, and secure credential handling help reduce unauthorized changes.

45. What is the main benefit of using GitOps in multi-cluster Kubernetes environments?

  1. It removes the need for Kubernetes namespaces
  2. It enables consistent, version-controlled configuration management across multiple clusters
  3. It requires all clusters to run on the same physical server
  4. It eliminates the need for cluster monitoring

Answer: B) It enables consistent, version-controlled configuration management across multiple clusters

Explanation:

GitOps tools can manage applications and configurations across multiple Kubernetes clusters. Shared repository structures and reusable manifests help maintain consistency while allowing cluster-specific settings.

46. What is the relationship between GitOps and Infrastructure as Code (IaC)?

  1. They are completely unrelated practices
  2. GitOps replaces all infrastructure definitions
  3. IaC is used only for application testing
  4. IaC defines infrastructure through code, while GitOps uses Git-based workflows to manage and reconcile declared configurations

Answer: D) IaC defines infrastructure through code, while GitOps uses Git-based workflows to manage and reconcile declared configurations

Explanation:

Infrastructure as Code provides a way to define infrastructure in machine-readable files. GitOps builds on version-controlled configuration and automated reconciliation to manage how those definitions are applied and maintained.

47. Which of the following is a common GitOps anti-pattern?

  1. Making production changes manually without updating the Git source of truth
  2. Reviewing configuration changes through pull requests
  3. Using declarative Kubernetes manifests
  4. Monitoring reconciliation status

Answer: A) Making production changes manually without updating the Git source of truth

Explanation:

Manual changes outside the GitOps workflow can create configuration drift and make the repository an inaccurate representation of the environment. Changes should generally be recorded and reviewed through the version-controlled workflow.

48. What is the purpose of progressive delivery in a GitOps environment?

  1. To deploy every change to all users immediately
  2. To disable deployment monitoring
  3. To release application changes gradually while evaluating their impact
  4. To remove version control from deployment workflows

Answer: C) To release application changes gradually while evaluating their impact

Explanation:

Progressive delivery gradually introduces application changes using strategies such as canary releases and blue-green deployments. It allows teams to evaluate application behavior before completing a full rollout.

49. Which statement best describes the difference between traditional push-based deployment and pull-based GitOps?

  1. Both approaches always require manual configuration of every resource
  2. Push-based deployment sends changes from an external system, while pull-based GitOps uses a controller to retrieve desired configuration from a source repository
  3. Pull-based GitOps does not use Git repositories
  4. Push-based deployment is supported only by desktop applications

Answer: B) Push-based deployment sends changes from an external system, while pull-based GitOps uses a controller to retrieve desired configuration from a source repository

Explanation:

In push-based deployment, an external pipeline initiates changes in the target environment. In pull-based GitOps, a controller monitors the source repository and retrieves configuration changes to reconcile the target environment.

50. A development team uses GitOps to deploy an application. The desired configuration in Git specifies 5 replicas, but the Kubernetes cluster currently runs only 3 replicas. If the GitOps controller successfully reconciles the configuration, how many replicas should be running afterward?

  1. 3 replicas
  2. 4 replicas
  3. 6 replicas
  4. 5 replicas

Answer: D) 5 replicas

Explanation:

The desired state stored in Git specifies 5 replicas, while the actual cluster state has only 3 replicas.

Difference = 5 - 3 = 2 replicas.

During reconciliation, the GitOps controller detects the difference and applies the required change to reach the desired state.

Therefore, the Kubernetes deployment should have 5 replicas after successful reconciliation.

Comments and Discussions!

Load comments ↻



Copyright © 2026 www.includehelp.com. All rights reserved.