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 – 17

If you run docker network ls and do not see a network that you’re looking for, what is the most likely culprit?culprit?

  • That node is not a worker node.
  • That node is not a manager node.
  • You’re not authorized to see the network.
  • That node doesn’t have a container running that uses that network. (Ans)

What does –update-parallelism control?

  • The time between updating tasks
  • The number of tasks updated at the same time (Ans)
  • What to do when an update fails
  • Whether or not to update all tasks at once, or one at a time

Which published port mode would you use to load balance requests across all containers for a service?

  • Host
  • None
  • Ingress
  • Bridge (Ans)
  • LoadBalanced

If you only have a replicated service, what will happen when you add a new node to the cluster?

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

If you want multiple containers for an application, what command is easiest to use to go from a service with one task replicas to two?

  • docker clone …
  • docker service rm; docker service create –replicas 2 …
  • docker service scale …
  • docker service update –replicas 2 … (Ans)
  • docker run …

On a swarm, if a container dies that’s part of a service, and a new container is created, what concept explains this?

  • High Availability
  • Desired State Reconciliation (Ans)
  • Scheduling
  • Service Scaling

What does the “*” mean in the output of docker node ls?

  • The nearest manager
  • The leader
  • A worker node
  • The node you’re connected to (Ans)

Joining a node as a manager by default that node will perform __ role(s).

  • Manager only
  • Leader only
  • Manager and Worker (Ans)
  • Replica only
  • Slave and Replica

Which of the following would you use to decrease the time between health checks?

  • retries
  • CMD
  • timeout
  • interval (Ans)

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

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

What happens to containers on a node that you drain?

  • They’re shut down until you make the node active again.
  • They keep running, just no new work is allowed to be put onto the node.
  • They’re snapshotted and migrated to other nodes.
  • They’re terminated and migrated as new containers on other nodes. (Ans)

Assuming you have a service named web, what will the dns query tasks.web return?

  • The Swarm Load Balancer
  • Individual container IPs for the web service (Ans)
  • The web service’s Virtual IP

What does –update-delay control?

  • What to do when an update fails
  • The number of tasks updated at the same time
  • The time between updating tasks (Ans)
  • Whether or not to update all tasks at once, or one at a time

What command do you use to create containers on a swarm?

  • docker service create (Ans)
  • docker swarm run
  • docker run
  • docker-compose up

Which of the following has a one-to-one relationship with a container?

  • Task (Ans)
  • Service
  • Image
  • Swarm

What can you put in front of a swarm so that end users don’t have to pick a node, nor deal with node failures, to access a service with a published port?

  • Round Robin DNS to all nodes
  • Load Balancer to all nodes (Ans)
  • Single DNS entry to one node

When no nodes in the cluster fulfill the constraints of a service, what is the status of the service?

  • Failed
  • Running
  • Pending (Ans)
  • Started

What does “starting” mean in terms of health checks?

  • The health check has not yet run for a new container. (Ans)
  • This shows each time the health check runs to indicate that it is starting.
  • The health checking service is starting up and is not ready to run health checks.

What happens when Docker Swarm Mode detects an unhealthy container?

  • Restarts the container
  • Shuts the corresponding task down and starts a new one (Ans)
  • Nothing, health checks are not integrated into Swarm Mode.
  • Sends an email to the system operator

Which of the following would you use to avoid recreating a task on a recoverable application failure?

  • retries (Ans)
  • timeout
  • interval
  • CMD

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