Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Docker Interview Questions and Answer Part – 18

If you want to perform maintenance on a node, to what availability should you change it?

  • Ready
  • Down
  • Drain (Ans)
  • Pause
  • Active

Assuming you have a stack called APIS, what is the equivalent of docker service ps for stacks?

  • docker stack deploy
  • docker stack ls
  • docker stack ps APIS (Ans)
  • docker stack services APIS

When a service is updated that requires a change in the running container, what happens to the corresponding task?

  • The existing task is kept and its metadata is updated.
  • A new task is also created. (Ans)
  • The existing task is kept.

What happens when a new node is attached to the cluster that matches the constraints of a pending replicated service?

  • The pending task for the service will be assigned to the new node and a container will be started. (Ans)
  • The existing containers for the service will be rebalanced so that a fair share are placed onto the new node.
  • A new task will be allocated to the new node for the global service.
  • Nothing will run on the new node unless you change the service.

If you don’t want a service to run, but you don’t want to remove it, what’s the safest thing to do?

  • Add constraints that aren’t fulfilled.
  • Scale it to zero. (Ans)
  • Manually mark it pending.

In the “Manager Status” column in the output of docker node ls, what shows for worker nodes?

  • Worker
  • Nothing (Ans)
  • Leader
  • Reachable

Which service mode puts a task and a container on each node in the cluster?

  • Global (Ans)
  • Per Node
  • Replicated

Which of the following would you use to stop a health check that’s running for a long time?

  • timeout (Ans)
  • interval
  • CMD
  • retries

Which node role maintains the state of the cluster?

  • Manager (Ans)
  • Replica
  • Slave
  • Worker

Which service mode allows you to arbitrarily scale your service?

  • Replicated (Ans)
  • Global
  • Per Node

If you want to convert a manager node into a worker node, what do you use?

  • docker node promote
  • docker node demote (Ans)
  • docker swarm manager
  • docker swarm worker
  • docker node rm

How are Docker and rkt container images structured on disk?

  • Each container has access to the host filesystem for common files and then a special directory for apps unique to the container.
  • Images are typically split into readonly layers that can be shared between containers. (Ans)
  • Each container has its own extracted, isolated copy of the filesystem from an image.
  • Images are extracted into a readonly directory that can be shared between containers.

What is the net effect of a separate mount namespace? Each process can have an entirely separate __ .

  • ipc
  • network stack
  • filesystem (Ans)
  • hostname

Virtual Memory is similar to which of the following?

  • Capabilities
  • AppArmor
  • SELinux
  • Namespaces (Ans)
  • Control Groups

Why is networking a concern with containers?

  • Because container networking is a new frontier and is different than how you network VMs and physical machines
  • Because you have to use port forwarding to share the host’s physical network adapter
  • Because you don’t want applications to have port conflicts
  • Because each container usually has its own network namespace that needs configuring (Ans)
  • All of these

What can you use to create persistent storage in a container?

  • Volume (Ans)
  • Share the container host’s (root) mount namespace
  • Root file system
  • Image layers

What is one reason for a top Container Layer added to the underlying image layers when creating the filesystem for a container?

  • Easily provide a filesystem for containers from a pre-built image extracted into the top container layer
  • Easily create a new image by snapshotting the top container layer (Ans)
  • Easily configure the networking stack for a container via the top container layer

What is a host or container host?

  • A process running in the root namespaces on a system (Ans)
  • A process running in a namespace labeled “host”
  • A process running outside of all namespaces

Why do you use mount namespaces?

  • To isolate networking and avoid issues with port conflicts
  • To isolate hostnames to make it appear as if a process is running on a separate machine
  • To isolate the list of processes with which a process can interact
  • To isolate the filesystem and only provide files that a single application needs (Ans)

What cluster component helps you find the IP address of another application?

  • Service Discovery (Ans)
  • Provisioner
  • Scheduler
  • Persistent Storage

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Docker Tutorials: Docker Image – Understanding Dockerfiles instructions & options

Here’s a step-by-step tutorial for Dockerfile, including explanations and examples for each major command. Dockerfile Tutorial A Dockerfile is a text file containing instructions to build a…

Read More

Docker Tutorials: Docker Image – Example and Sample Programs of Dockerfile

Reference Rajesh Kumar I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories…

Read More

Docker Tutorials: Installation and Configurations

Docker Installation in Centos/RHEL Method -1: How to install Docker Community Edition via YUM? Step 1 – Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data…

Read More

Docker Tutorials: How to Install Docker in Ubuntu?

Install Docker Engine in Ubuntu NOTE – All commands you must run as root user or add a current user into a linux group name called “docker”…

Read More

Docker Lab, Excercise & Assignment – 7 – Docker Volume

Below is a very detailed tutorial and lab manual for learning Docker Volumes, using the Ubuntu image for practical, hands-on labs. This covers all major types of…

Read More

Docker Lab, Excercise & Assignment – 4 – Docker Networking

Here’s an in-depth, step-by-step tutorial and lab manual for Docker Networking—starting from basics, covering all core concepts, and providing a hands-on guide to every feature and command….

Read More