{"id":8991,"date":"2020-01-18T07:02:16","date_gmt":"2020-01-18T07:02:16","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8991"},"modified":"2025-02-01T23:03:13","modified_gmt":"2025-02-01T23:03:13","slug":"docker-interview-questions-and-answer-part-11","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/docker-interview-questions-and-answer-part-11\/","title":{"rendered":"Docker Interview Questions and Answer Part \u2013 11"},"content":{"rendered":"\n<p><strong>Which of the following are the standard secured and unsecured Docker engine daemon ports?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>2375 (unsecured), 2376 (secured) (Ans)<\/strong><\/li><li>4000 (unsecured), 4001 (secured)<\/li><li>3375 (unsecured), 3376 (secured)<\/li><li>80 (unsecured), 443 (secured)<\/li><\/ul>\n\n\n\n<p><strong>Which of the following arguments gets passed to the swarm command to join a node to the Swarm cluster?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>raft-join<\/li><li><strong>join (Ans)<\/strong><\/li><li>swarm-join<\/li><li>cluster-join<\/li><\/ul>\n\n\n\n<p><strong>Which of the following describes what occurs when the primary Swarm Manager that is part of a highly available set of Swarm Managers fails?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A leader election occurs and an administrator selects which of the secondary managers is promoated to primary.<\/li><li>The Swarm cluster enters a split brain configuration.<\/li><li><strong>A leader election occus and a secondary Swarm Manager seamlessly takes over the role of primary. (Ans)<\/strong><\/li><li>The remaining secondary Swarm Managers combine to fill the role of primary.<\/li><\/ul>\n\n\n\n<p><strong>Which of the following technologies allows Docker Swarm to leverage a pluggable discovery service backend?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>libnetwork<\/li><li><strong>libkv (Ans)<\/strong><\/li><li>Consul<\/li><li>godep<\/li><\/ul>\n\n\n\n<p><strong>Which two resources can containers reserve on the nodes they will run on?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>CPU and RAM (Ans)<\/strong><\/li><li>CPU and TCP ports<\/li><li>CPU and IOPS<\/li><li>IOPS and RAM<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is not a standard constraint?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>storagedriver<\/li><li><strong>networkdriver (Ans)<\/strong><\/li><li>executiondriver<\/li><li>operatingsystem<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is the preferred way to get TLS certificates into a Swarm manager container?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Start the Swarm manager container and copy the keys in via SCP.<\/li><li><strong>Mount them in via a data volume. (Ans)<\/strong><\/li><li>Rebuild the swarm image with the certificates baked in via a Dockerfile.<\/li><\/ul>\n\n\n\n<p><strong>Which environment variable can be used to automatically enable TLS for Docker Engine client commands?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DOCKER_TLS_AUTHENTICATE<\/li><li>DOCKER_TLS<\/li><li><strong>DOCKER_TLS_VERITY (Ans)<\/strong><\/li><li>DOCKER_TLS_ENABLE<\/li><\/ul>\n\n\n\n<p><strong>Which of the following filter types allows you to launch new containers on the same node as another container?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Affinity (Ans)<\/strong><\/li><li>Resource<\/li><li>Custom<\/li><li>Node<\/li><\/ul>\n\n\n\n<p><strong>How is the Swarm Discovery Service implemented in a production-grade Swarm cluster?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>As a distributed key-value store (Ans)<\/strong><\/li><li>A flat text file stored on every node in the cluster<\/li><li>As a high-speed relational database<\/li><li>Using Docker Hub as the hosted discovery service<\/li><\/ul>\n\n\n\n<p><strong>Which of the following would be a good design for a Swarm cluster?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Three Swarm managers on separate VMs and separate physical hosts (Ans)<\/strong><\/li><li>Three Swarm managers on separate VMs on a single physical host<\/li><li>Three Swarm managers all on the same VM<\/li><li>Five Swarm managers on separate VMs on a single physical host<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is passed to the swarm command to start a new Swarm Manager process?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>manager<\/li><li>master<\/li><li><strong>manage (Ans)<\/strong><\/li><li>leader<\/li><\/ul>\n\n\n\n<p><strong>Which of the following allows Swarm related components to trust a CA?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The presence of the Swarm component&#8217;s own public key<\/li><li>The presence of the Swarm component&#8217;s own private key<\/li><li><strong>The presence of the CA&#8217;s public key on the Swarm component (Ans)<\/strong><\/li><li>The presence of the CA&#8217;s private key on the Swarm component<\/li><\/ul>\n\n\n\n<p><strong>Which of the following shows the way Docker prefers keys to be named?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ca-cert.pem, swarm-cert.pem, swarm-key.pem<\/li><li>ca-cert.pem, node-cert.pem, node-key.pem<\/li><li><strong>ca.pem, cert.pem, key.pem (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>By default, how does Swarm enforce affinity filters?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Best effort. If the affinity cannot be met the container is still started<\/li><li><strong>Strictly. If an affinity cannot be met the container is not started (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which of the following is true of configuring the Docker Engine daemon for TLS?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The Engine daemon dynamically picks up TLS options.<\/li><li><strong>The Engine daemon must be restarted to pick up TLS options. (Ans)<\/strong><\/li><li>The Engine daemon must be re-installed and compiled with the TLS configuration.<\/li><\/ul>\n\n\n\n<p><strong>Which of the following discovery service backends are supported by Swarm?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>MongaDB, CouchDB, MySQL<\/li><li>MySQL, PostgreSQL, etcd<\/li><li><strong>Consul, etcd, Zookeeper (Ans)<\/strong><\/li><li>Consul, etcd, MySQL<\/li><\/ul>\n\n\n\n<p><strong>Which of the following describes the Swarm manager high availability model?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The Swarm manager service does not support high availability.<\/li><li>Point in time (PiT) copies that can be quickly be promoted to live in the event of failure<\/li><li><strong>A single primary manager with n secondary managers (Ans)<\/strong><\/li><li>Multiple primary managers that are all active<\/li><\/ul>\n\n\n\n<p><strong>Which of the following filter types works with labels\/tags that are applied to Docker engine daemons?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Affinity filters<\/li><li>Standard constraints<\/li><li><strong>Custom constraints (Ans)<\/strong><\/li><li>Resource filters<\/li><\/ul>\n\n\n\n<p><strong>How do Consul agents learn about other agents etc?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Using libkv<\/li><li><strong>Using the Serf gossip protocl (Ans)<\/strong><\/li><li>Using libnetwork<\/li><li>Leveraging the Consul key-value store<\/li><\/ul>\n\n\n\n<p><strong>Which of the following Consul commands allows you to see the status of agents in the Consul cluster?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>consul agent status<\/li><li><strong>consul members (Ans)<\/strong><\/li><li>consul list members<\/li><li>consul status<\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_26584\"><iframe loading=\"lazy\"  id=\"_ytid_41424\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_26584\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Which of the following are the standard secured and unsecured Docker engine daemon ports? 2375 (unsecured), 2376 (secured) (Ans) 4000 (unsecured), 4001 (secured) 3375 (unsecured), 3376 (secured) 80 (unsecured), 443&#8230; <\/p>\n","protected":false},"author":1,"featured_media":9826,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4862],"tags":[567],"class_list":["post-8991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","tag-docker"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=8991"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8991\/revisions"}],"predecessor-version":[{"id":25086,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8991\/revisions\/25086"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/9826"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}