JOBSEEKER?

DevOps Interview Questions

Practice for DevOps interviews by solving TestDome questions. Our interview questions are used by more than 7,000 companies and 450,000 individual test takers.

Jobseekers: Certify Your Knowledge

Take a Certification Test

Companies: Use Our Tests for Screening

Buy a Pack Of Candidates

These DevOps interview questions are examples of real tasks used by employers to screen job candidates such as DevOps engineers, developers, and others that require knowledge of the DevOps lifecycle, practices, and tools.

1. DevOps Lifecycle

Easy  
DevOps Practices Life Cycle New Public

Your company has been working to increase its frequency of deployment for new features by optimizing its full development and operating lifecycle. The CEO wants to cut unnecessary phases to deliver new features to the customer.

Which phases are not part of the core DevOps lifecycle?

(Select all acceptable answers.)

Solve Question

2. Container Restart

Easy  
Docker Command Line Arguments Docker Compose New Public

The automation team is testing their background Docker web server containers. They need to cleanly remove the existing containers without leaving any artifacts behind, then start new containers.

Complete the following docker commands to achieve these objectives:

# Gracefully end all processes in the containers
host> docker-compose stop
# Remove the containers and their anonymous volumes
host> docker-compose ____ -v
# Start containers in background
host> docker-compose up ____ apache php mysql
Solve Question

3. Force Checkout

Easy  
Git Command Line Arguments New Public

A developer is experimenting with code on a local copy of a branch. After a while, it is decided that this experiment does not work. So the developer decides to switch back to the master branch. However, the developer's local working copy is different from the HEAD.

Which of these options would allow the developer to successfully check out the master branch?

(Select all acceptable answers.)

Solve Question

4. Incident Response

Easy  
DevOps Practices Reporting New Public

The CEO of your company understands that sometimes things go wrong. No system is perfect, but she wants to ensure that the company is improving.

Which metrics could be used to track the company's incident management?

(Select all acceptable answers.)

Solve Question

5. Saving a Bugfix

Easy  
Git Command Line Arguments Public

Write down a sequence of GIT commands (with no additional arguments) to download a repository, update a file, and save the changes back to the original repository. Assume that other developers didn't modify the file.

  1. Download the master repository to a local directory or repository:
    git _____ https://joe@testdome.com/testdome.git
     
  2. Fix a bug in file test.cpp
     
  3. Mark that file test.cpp has been changed:
    git _____ test.cpp
     
  4. Save the changes to the local repository:
    git _____ -m 'Bug with testing is fixed'
     
  5. Send the changes to the original repository:
    git _____ origin master
Solve Question

6. File Ingress

Easy  
Kubernetes Ingress New Public

Consider the following Ingress controller:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: main-ingress
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          serviceName: main-app
          servicePort: 80
      - path: /files/
        pathType: Prefix
        backend:
          serviceName: file-app
          servicePort: 80
      - path: /files/default.png
        pathType: Exact
        backend:
          serviceName: default-app
          servicePort: 8080

Select all the true statements.

(Select all acceptable answers.)

Solve Question

7. Nginx Deployment

Easy  
Kubernetes Deployment Services New Public

The team responsible for Kubernetes wants to add a Deployment that will deploy 4 nginx Pods which should have port 443 open. Finish the following YAML configuration so that it implements those requirements:

apiVersion: apps/v1
kind: ________________
metadata:
  name: deployment-nginx
  labels:
    web: public
spec:
  replicas: __________
  selector:
    matchLabels:
      web: public
  template:
    metadata:
      labels:
        _______: __________
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - ____________: 443
Solve Question

8. Container Lifecycle

Easy  
Docker Command Line Arguments Life Cycle New Public

As part of a load balancing scheme, your company uses multiple virtual machines which can provision and deprovision Docker containers as demand changes.

Complete the docker commands (with no additional arguments) that manage the lifecycle of a docker image.

  1. When a virtual machine completes startup, it runs the following command to ready the custom container image:
    docker create --name balanced-container company-image
  2. When the load balancer detects high usage, it signals the virtual machine to make the container available for use. The VM runs the following command:
    docker ____ balanced-container
  3. The load balancer detects that a container has been underutilized for more than 15 minutes. It signals the VM to suspend the container to conserve CPU resources. The VM runs the command:
    docker ____ balanced-container
  4. Finding an increased load again, the load balancer signals the VM to awaken the container. The VM runs the command:
    docker ____ balanced-container
  5. After an hour of underutilization, the load balancer signals the VM to gracefully end all processes in the container to conserve RAM resources. The VM runs the command:
    docker ____ balanced-container
Solve Question

If you feel ready, take one of our timed public DevOps Interview Questions tests:
DevOps

AWS DevOps Test (Easy)

Azure DevOps Test (Easy)

Docker and DevOps Online Test (Easy)

Jenkins and DevOps Test (Easy)

Kubernetes and DevOps Online Test (Easy)

Not exactly what you are looking for? Go to our For Jobseekers section.
Dashboard Start Trial Sign In Home Tour Tests Questions Pricing For Jobseekers