Find Interview Questions for Top Companies
Pentagon Interview Questions and Answers
Ques:- There are 9 apples, only 1 of those weigh less, rest all are similar in weight and all 9 are look alike. If given 2 attempts then how will you identify the one weighs lesser.
Right Answer:
Weigh 3 apples against 3 apples. If they balance, the lighter apple is among the remaining 3. If they don't balance, take the lighter group of 3 and weigh 1 apple against 1 apple. If they balance, the lighter apple is the one not weighed. If they don't balance, the lighter side has the lighter apple.
Ques:- What is a remote repository? How do you connect to one?
Right Answer:

A remote repository is a version of your project that is hosted on a server, allowing multiple users to collaborate. You connect to a remote repository using Git commands like `git clone` to copy it to your local machine, or `git remote add <name> <url>` to link your local repository to the remote one.

Ques:- How can you revert a pushed commit?
Right Answer:

To revert a pushed commit, use the command:

“`
git revert <commit-hash>
“`

This creates a new commit that undoes the changes made by the specified commit. After that, push the changes with:

“`
git push
“`

Ques:- What is a commit? What does a commit contain?
Right Answer:

A commit in Git is a snapshot of changes made to the files in a repository. It contains the modified files, a unique identifier (hash), the author's information, a timestamp, and a commit message describing the changes.

Ques:- What is the difference between merge and rebase?
Right Answer:

Merge combines two branches by creating a new commit that includes changes from both, preserving the history of both branches. Rebase, on the other hand, moves or combines a sequence of commits to a new base commit, creating a linear history without a merge commit.

Ques:- How do you monitor and alert on deployed applications? Using tools like Prometheus, Grafana, ELK Stack, Datadog, New Relic, or built-in cloud monitoring.
Right Answer:

To monitor and alert on deployed applications, I would use tools like Prometheus for collecting metrics, Grafana for visualizing those metrics, and set up alerts based on specific thresholds. Additionally, I might use the ELK Stack for logging and searching logs, or Datadog/New Relic for comprehensive monitoring and alerting capabilities. Built-in cloud monitoring services can also be utilized for real-time insights and alerts.

Ques:- What is canary deployment? A canary release rolls out a new version to a small subset of users to monitor before full rollout.
Right Answer:

Canary deployment is a strategy where a new version of software is released to a small group of users first, allowing for monitoring and testing before it is rolled out to the entire user base.

Ques:- . What is the difference between declarative and scripted pipelines in Jenkins?
Right Answer:

Declarative pipelines in Jenkins use a simplified syntax and are designed for ease of use, focusing on the overall structure of the pipeline. Scripted pipelines, on the other hand, use a more complex Groovy-based syntax, allowing for greater flexibility and control over the pipeline's behavior.

Ques:- What is rollback and how do you handle it in CI/CD? Rollback means reverting to a previous stable version. Use versioned artifacts, infrastructure as code, and automation for quick rollback.
Right Answer:

Rollback is the process of reverting to a previous stable version of software. In CI/CD, you handle it by using versioned artifacts, infrastructure as code, and automation to enable quick and reliable rollbacks when needed.

Ques:-  What is Infrastructure as Code (IaC), and how does it fit in CI/CD? IaC (using tools like Terraform, CloudFormation) defines and manages infrastructure through code, allowing it to be versioned, tested, and deployed via pipelines.
Right Answer:

Infrastructure as Code (IaC) is a practice that allows you to define and manage your infrastructure using code. This means you can version, test, and deploy your infrastructure just like application code. In CI/CD, IaC fits in by enabling automated provisioning and management of infrastructure within the continuous integration and continuous deployment pipelines, ensuring consistency and reducing manual errors. Tools like Terraform and CloudFormation are commonly used for this purpose.

Ques:- What is Jenkins, and why is it used?
Right Answer:

Jenkins is an open-source automation server used to automate the building, testing, and deployment of software. It helps developers integrate changes to their projects more easily and enables continuous delivery and continuous integration (CI/CD) practices.

Ques:- What are the key features of Jenkins?
Right Answer:

Key features of Jenkins include:

1. **Continuous Integration/Continuous Deployment (CI/CD)**: Automates the integration and deployment of code changes.
2. **Plugins**: Supports a wide range of plugins to extend functionality.
3. **Pipeline as Code**: Allows defining build pipelines using code (Jenkinsfile).
4. **Distributed Builds**: Supports running builds on multiple machines for scalability.
5. **Easy Installation and Configuration**: Simple setup process and user-friendly interface.
6. **Extensive Community Support**: Large community and extensive documentation.
7. **Integration with Version Control Systems**: Works with Git, SVN, and other VCS.
8. **Monitoring and Reporting**: Provides real-time feedback and build status notifications.

Ques:- How do you integrate Jenkins with version control systems like Git?
Right Answer:

To integrate Jenkins with Git, you need to:

1. Install the Git plugin in Jenkins.
2. Create a new Jenkins job or configure an existing one.
3. In the job configuration, select "Git" as the source code management option.
4. Enter the repository URL and credentials if required.
5. Set up the branch to build and any additional options.
6. Configure build triggers, such as polling the repository or using webhooks.
7. Save the configuration and run the job to test the integration.

Ques:- How do you handle parameters in Jenkins builds?
Right Answer:

In Jenkins, you can handle parameters in builds by using "Parameterized Builds." You can define parameters in the job configuration under the "This project is parameterized" option. You can use different types of parameters like String, Boolean, Choice, etc. Then, you can access these parameters in your build scripts using the syntax `${PARAMETER_NAME}`.

Ques:- Can you describe a challenging Jenkins issue you faced and how you resolved it?
Right Answer:

I faced an issue where Jenkins builds were failing due to a lack of available disk space on the server. To resolve it, I implemented a cleanup strategy by configuring the "Discard Old Builds" option in the job settings to automatically delete older builds after a certain number of days. Additionally, I set up a periodic job to clean up workspace directories and unused artifacts. This freed up space and stabilized the build process.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users