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

DevOps Practices Life Cycle New Public
   
Easy  

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.)


2. Container Restart

Docker Command Line Arguments Docker Compose New Public
   
Easy  

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

3. Force Checkout

Git Command Line Arguments New Public
   
Easy  

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.)


4. Incident Response

DevOps Practices Reporting New Public
   
Easy  

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.)


5. Saving a Bugfix

Git Command Line Arguments Public
   
Easy  

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

6. File Ingress

Kubernetes Ingress New Public
   
Easy 

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.)


7. Nginx Deployment

Kubernetes Deployment Services New Public
   
Easy  

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

8. Container Lifecycle

Docker Command Line Arguments Life Cycle New Public
   
Easy  

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

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