DCA-2 Flashcards
What environment variables must be set to allow client to communicate with UCP via CLI?
DOCKER
DOCKER_HOST
DOCKER_CERT_PATH
DOCKER_PATH
DOCKER_HOST
DOCKER_CERT_PATH
What is the command-line interface used to interact with UCP from a shell?
docker-ucp
docker
docker-ee
docker-ucp-cli
docker
Universal Control Plane (UCP), lets you authorize users to view, edit, and use cluster resources by granting role-based permissions against resource sets.
True
False
True
To authorize access to cluster resources across your organization, which of the following high-level steps must UCP administrators take?
Configure subjects (users, teams, and service accounts).
Define custom roles (or use defaults) by adding permitted operations per type of resource.
Configure resource sets of Swarm collections or Kubernetes namespaces.
Create grants by combining subject + role + resource set
Configure subjects (users, teams, and service accounts).
Define custom roles (or use defaults) by adding permitted operations per type of resource.
Configure resource sets of Swarm collections or Kubernetes namespaces.
Create grants by combining subject + role + resource set
Which of the statements best describes “Subjects” in the Access Control Model?
A subject represents a user, team, organization
A subject does not represent a service account.
A subject can be granted a role that defines permitted operations against one or more resource sets.
A subject represents a service account.
A subject represents a user, team, organization
A subject can be granted a role that defines permitted operations against one or more resource sets.
A subject represents a service account.
A group of teams that share a specific set of permissions forms a collection.
True
False
False
Which of the statements best describe “Roles” in the Access Control Model?
Roles define what operations are allowed on a resource.
A role is a set of permitted operations against a type of resource, like a container or volume, which can only be assigned to individual users.
Most organizations use multiple roles to fine-tune appropriate access to users and teams.
All of the above
Roles define what operations are allowed on a resource.
Most organizations use multiple roles to fine-tune appropriate access to users and teams.
Which of the statements best describe “Resource sets” in Access Control Model?
A collection of resources in Docker Swarm
A collection in Kubernetes
A namespace in Kubernetes
A namespace in Docker Swarm
A collection of resources in Docker Swarm
A namespace in Kubernetes
Which of the statements best describe “Grants” in the Access Control Model?
Grants define which users can access what resources in what way.
A grant is made up of a role and a resource set.
A grant is made up of a subject, a role, and a resource set.
Grants are effectively Access Control Lists (ACLs) which provide comprehensive access policies for an entire organization when grouped together.
Grants define which users can access what resources in what way.
A grant is made up of a subject, a role, and a resource set.
Grants are effectively Access Control Lists (ACLs) which provide comprehensive access policies for an entire organization when grouped together.
Only an administrator can manage grants, subjects, roles, and access to resources.
True
False
True
Docker Enterprise Edition provides … , where in we can create users and group them into teams which are nothing but group of users and tie them up with an organization.
DTR
UCP
UCP Agent
RBAC
RBAC
Which of the following is a common workflow for RBAC in Docker EE is
Create users, teams, and organization
Create custom roles with a set of permissions
Combine resources sets using a collection
Create users, teams, and organization
Create custom roles with a set of permissions
Combine resources sets using a collection
The … allows you to authorize a remote Docker engine to a specific user account managed in Docker EE, absorbing all associated RBAC controls in the process
DTR
UCP
Client bundle
RBAC
Client Bundle
A client bundle is a group of certificates downloadable directly from the Docker Trusted Registry (DTR) user interface within the admin section for “My Profile”
True
False
False
Using …. in Docker EE we can control who can access and make changes to your cluster and applications.
DTR
UCP
Client bundle
RBAC
RBAC
What are the minimum hardware requirements to install UCP?
4GB RAM, 2vCPUs and 10GB disk space for the /var partition for manager nodes, 2GB RAM and 500MB disk space for the /var partition for worker nodes
8GB RAM, 2vCPUs and 10GB disk space for the /var partition for manager nodes, 4GB RAM and 500MB disk space for the /var partition for worker nodes
8GB RAM, 2vCPUs and 10GB disk space for the /var/lib/docker partition for manager nodes, 4GB RAM and 500MB disk space for the /var/lib/docker partition for worker nodes
4GB RAM, 2vCPUs and 10GB disk space for the /var/lib/docker partition for manager nodes, 2GB RAM and 500MB disk space for the /var/lib/docker partition for worker nodes
8GB RAM, 2vCPUs and 10GB disk space for the /var partition for manager nodes, 4GB RAM and 500MB disk space for the /var partition for worker nodes
What are the features of Docker Trusted Registry (DTR)?
Built-in Access Control
Image and Job Management
Automated image builds
Security Scanning
Dockerfile management in SCM
Image Signing
Built-in Access Control
Image and Job Management
Security Scanning
Image Signing
A group of teams that share a specific set of permissions forms a collection.
True
False
False
When using the built-in authentication mechanism, you can create users to grant them fine-grained permissions.
Which of the following statements best describes managing users in DTR?
Users are shared across UCP and DTR.
When you create a new user in UCP, that user becomes available in DTR and vice versa.
Check the Trusted Registry admin option, if you want to grant permissions for the user to be a UCP and DTR administrator.
Users are not shared across UCP and DTR
Users are shared across UCP and DTR.
When you create a new user in UCP, that user becomes available in DTR and vice versa.
Check the Trusted Registry admin option, if you want to grant permissions for the user to be a UCP and DTR administrator.
When a user creates a repository, by default other users will also have permissions to make changes to the repository.
True
False
False
By default, DTR has one organization called ‘docker-datacenter’, that is shared between DTR and UCP.
True
False
True
What is the command to pull the docker repository owned by an organization?
docker get DTR-DOMAIN-NAME/ORG/REPOSITORY:TAG
docker pull DTR-DOMAIN-NAME/ORG/REPOSITORY:TAG
docker download DTR-DOMAIN-NAME/ORG/REPOSITORY:TAG
docker fetch DTR-DOMAIN-NAME/ORG/REPOSITORY:TAG
docker pull DTR-DOMAIN-NAME/ORG/REPOSITORY:TAG
Which of the following is the docker image addressing convention?
Registry-Address/Image-or-Repository-Name/User-Or-Account-Name
Registry-Address/User-Or-Account-Name/Image-or-Repository-Name
User-Or-Account-Name/Image-or-Repository-Name/Registry-Address
Image-or-Repository-Name/User-Or-Account-Name/Registry-Address
Registry-Address/User-Or-Account-Name/Image-or-Repository-Name
If we do not specify a registry information then it is assumed to be the default registry at docker hub at the address docker.io.
True
False
True
DTR only supports creating private repositories.
True
False
False
By default, when pushing an image to DTR, it automatically creates a new repository if one does not already exist by that name.
True
False
False
You cannot configure DTR to allow pushing to repositories that don’t exist yet.
True
False
False
We can use the CLI to enable pushing to repositories that don’t exist yet.
True
False
True
DTR is a vulnerability scanner that analyzes container images for security vulnerabilities triggered by a manual request only.
True
False
False
In which service does DTR image scanning occur?
A service known as the dtr-jobrunner container
A service known as the dtr-registry container
A service known as the dtr-api container
A service known as the dtr-runner container
A service known as the dtr-jobrunner container
Extracts a copy of the image layers from backend storage.
Extracts the files from the layer into a working directory inside the dtr-jobrunner container.
Executes the scanner against the files in this working directory, collecting a series of scanning data.
Once the scanning data is collected, the working directory for the layer will remain on the job-runner until garbage collection is initiated.
All of the above
Extracts a copy of the image layers from backend storage.
Extracts the files from the layer into a working directory inside the dtr-jobrunner container.
Executes the scanner against the files in this working directory, collecting a series of scanning data.
In which of the following will image scanning look for known vulnerabilities
OS packages
Suspicious user accounts
Libraries
IP Tables rules that are not required
Other dependencies that are defined in a container image
All of the above
OS packages
Libraries
Other dependencies that are defined in a container image
You may also configure DTR to initiate scans automatically when an image is pushed.
True
False
True
Once the scan is complete, a report shows all the vulnerabilities detected categorized as __________.
Major
Minor
Warning
Critical
INFO
All of the above
Major
Minor
Critical
With Docker Trusted Registry you can promote an existing image, based on a policy, to be pushed to a new environment.
True
False
True
With Docker Trusted Registry, we need to rebuild the image in each stage to promote to different environments (e.g. Dev, Test, Stage, and Prod)
True
False
False
A promotion can only be configured to another repository within the same registry.
True
False
False
Which statement best describes Garbage Collection in DTR?
Automatically removes unused image layers to save disk space at a scheduled interval.
Garbage Collection setting is available under the system -> garbage collection section.
By default, garbage collection is enabled.
All of the above
Automatically removes unused image layers to save disk space at a scheduled interval.
Garbage Collection setting is available under the system -> garbage collection section.
You may configure garbage collection to run at a specific interval.
True
False
True
Under the hood, each image stored in DTR is made up of multiple files, what are they?
A list of image layers that are unioned which represents the image filesystem
A configuration file that contains the architecture of the image and other metadata
A manifest file containing the list of all layers and configuration file for an image
A list of image layers that are unioned which represents the image filesystem
A configuration file that contains the architecture of the image and other metadata
A manifest file containing the list of all layers and configuration file for an image
DTR ships with Notary built-in so that you can use Docker Content Trust (DCT) to sign and verify images.
True
False
True
What are the key components of Docker Trusted Registry (DTR) for signing an image?
Notary Server
Notary Signer
Docker Hub
Universal Control Plane (UCP)
Notary Server
Notary Signer
Which statements best describe Notary?
Notary is a tool for publishing and managing trusted collections of content.
The official Docker Hub Notary servers are located at https://docker.io
With Notary anyone can provide trust over arbitrary collections of data.
Notary uses Globally Unique Names (GUNs) to identify trust collections.
Notary is a tool for publishing and managing trusted collections of content.
With Notary anyone can provide trust over arbitrary collections of data.
Notary uses Globally Unique Names (GUNs) to identify trust collections.
DCT is integrated with the Docker CLI, and allows you to _____________________.
Configure repositories
Add signers
Sign images using the docker trust command
Configure repositories
Add signers
Sign images using the docker trust command
You are required to configure your environment to prevent untrusted images from being deployed on the cluster. What approach would you choose to ensure images deployed in the cluster are secure and trusted?
Configure RBAC and provide access to repositories to privileged users only
Enable vulnerability scanning on images on push
Configure UCP to Run only signed images. And enforce image signing for all images using DCT
Configure UCP to Run only signed images. And enforce image signing for all images using DCT
In a Docker swarm cluster, when a failed node is brought back online it is ready to accept new workloads and existing workloads are automatically rebalanced.
True
False
False
What is the command to rebalance the docker swarm cluster workloads if absolutely necessary?
docker service update SERVICE-NAME
docker service update –force SERVICE-NAME
docker update service SERVICE-NAME
docker update service –force SERVICE-NAME
docker service update –force SERVICE-NAME
A swarm cluster runs with 5 manager and 5 worker nodes with 10 replicas of an application running across all worker nodes. Which of the below statements are true when 3 manager nodes do go down at the same time.
Since 2 manager nodes are available the cluster continues to operate normally
Cluster operates in a degraded mode with no management functionalities
The applications continue to work as normal without impacting users
Applications are killed and users are impacted
Cluster operates in a degraded mode with no management functionalities
The applications continue to work as normal without impacting users
We could add a new node to the cluster as a manager but we cannot promote an existing worker node to be the manager.
True
False
False
You should have at least 3 managers in the swarm cluster to support manager node failures.
True
False
True
Which statement best describes Quorum?
Quorum is the minimum number of nodes that must be available for the cluster to function properly.
In case of 3 manager nodes, the quorum is 3
It is recommended to maintain an odd number of managers to withstand network-wide outages.
In case of 5 manager nodes, the quorum is 3
Quorum is the minimum number of nodes that must be available for the cluster to function properly.
It is recommended to maintain an odd number of managers to withstand network-wide outages.
In case of 5 manager nodes, the quorum is 3
Which of the below configurations can tolerate 3 manager node failures?
4 Manager 2 Worker Node Cluster 5 Manager 5 Worker Node Cluster 6 Manager 5 Worker Node Cluster 7 Manager 3 Worker Node Cluster 7 Manager 5 Worker Node Cluster 8 Manager 6 Worker Node Cluster 8 Manager 2 Worker Node Cluster
7 Manager 3 Worker Node Cluster
7 Manager 5 Worker Node Cluster
8 Manager 6 Worker Node Cluster
8 Manager 2 Worker Node Cluster
For any given number of N nodes, What is the quorum value?
Total number of nodes divided by 3 + 1 (Quorum = (N/3)+1)
Total number of nodes divided by 2 + 1 (Quorum = (N/2)+1)
Total number of nodes divided by 2 – 1 (Quorum = (N/2)-1)
Total number of nodes divided by 3 – 1 (Quorum = (N/3)-1)
Total number of nodes divided by 2 + 1 (Quorum = (N/2)+1)
What is the command to forcefully create a cluster from its current state?
docker swarm init
docker swarm init –force
docker swarm init –force-cluster
docker swarm init –force-new-cluster
docker swarm init –force-new-cluster
What is the command to promote a node to manager in docker swarm cluster?
docker promote node NODENAME
docker node promote NODENAME
docker promote worker node NODENAME
docker node promote worker NODENAME
docker node promote NODENAME
Which of the following statements are true? Select all the answers that apply.
On every docker host, docker stores data about the object it manages under the /var/lib/docker directory.
On a swarm manager node, it stores data about the swarm cluster in the /var/lib/docker/swarm directory.
On every docker host, docker stores data about the object it manages under the /var/run/docker directory.
On a swarm manager node, it stores data about the swarm cluster in the /var/run/docker/swarm directory.
On every docker host, docker stores data about the object it manages under the /var/lib/docker directory.
On a swarm manager node, it stores data about the swarm cluster in the /var/lib/docker/swarm directory.
The RAFT DB helps in restoring the services and any other configuration in a swarm cluster.
True
False
True
What are the steps that we need to follow to backup the swarm database?
Create a tar backup of the swarm data at /var/lib/docker/swarm and restart the docker service.
Stop docker service, create a tar backup of the swarm data at /var/lib/docker/swarm, start the docker.
Stop docker service, create a tar backup of the docker data at /var/lib/docker, start the docker
None of the above
Stop docker service, create a tar backup of the swarm data at /var/lib/docker/swarm, start the docker.
It is recommended to perform a backup on the swarm leader node.
True
False
False
What is the command to enable automatic locking of managers with an encryption key?
docker swarm init –lock=true
docker swarm init –autolock=true
docker swarm init –autounlock=false
docker swarm init –unlock=false
docker swarm init –autolock=true
What is the command to disable auto lock for a docker swarm cluster that has it enabled already?
docker swarm update –autolock=false
docker update swarm –autolock=false
docker swarm update –auto-unlock=true
docker update swarm –auto-unlock=true
docker swarm update –autolock=false
The auto lock key is required when the cluster is restored, so it must be kept safe in an external password manager.
True
False
True
The auto lock key is backed up along with the Swarm backup.
True
False
False
What are the prerequisites for restoring swarm?
You must use the same IP as the node from which you made the backup.
You must restore the backup on the same Docker Engine version.
If auto-lock was enabled on the old Swarm, the unlock key is required to perform the restore.
You can find the list of manager IP addresses in state.json in the zip file
You must use the same IP as the node from which you made the backup.
You must restore the backup on the same Docker Engine version.
If auto-lock was enabled on the old Swarm, the unlock key is required to perform the restore.
You can find the list of manager IP addresses in state.json in the zip file
Which of the following steps are required on each manager node to restore data to a new swarm?
Shut down the Docker Engine on the node you selected for the restore
Uninstall Docker on the node
Remove the /var/lib/docker directory on the new Swarm if it exists.
Remove the contents of the /var/lib/docker/swarm directory on the new Swarm if it exists.
Restore the /var/lib/docker/swarm directory with the contents of the backup
Install Docker on the node
Start Docker on the new node. Unlock the swarm if necessary
Re-initialize the swarm so that the node does not attempt to connect to nodes that were part of the old swarm, and presumably no longer exist.
Shut down the Docker Engine on the node you selected for the restore
Remove the contents of the /var/lib/docker/swarm directory on the new Swarm if it exists.
Restore the /var/lib/docker/swarm directory with the contents of the backup
Start Docker on the new node. Unlock the swarm if necessary
Re-initialize the swarm so that the node does not attempt to connect to nodes that were part of the old swarm, and presumably no longer exist.
To take a backup of UCP, which docker image would you need to run with the backup command?
docker/ucp-backup
docker/ucp
docker/backup
docker/backup-ucp
docker/ucp
You can only take backup of UCP via CLI.
True
False
False
In order to take a backup of UCP, you need to backup each UCP manager node.
True
False
False
Which of the following statements are true about UCP backup?
Backups can be utilized for restoring clusters on a cluster with a newer version of Docker Enterprise.
More than one backup at the same time is supported.
For crashed clusters, backup capability is not guaranteed.
UCP backup includes swarm workloads.
UCP backup includes Kubernetes workloads.
For crashed clusters, backup capability is not guaranteed.
UCP backup includes Kubernetes workloads.
Which of the following ways a UCP backup can be created?
CLI
GUI
API
CLI
GUI
API
To restore an existing UCP installation from a backup, you need to uninstall UCP from the swarm by using the uninstall-ucp command.
True
False
True
Which of the following are included in a UCP backup?
User, Team and Organization details
Docker Swarm Services
Kubernetes Namespaces
Certificates and Keys
Access Control Details
Overlay Networks
Docker Images
Docker Swarm Secrets
User, Team and Organization details
Kubernetes Namespaces
Certificates and Keys
Access Control Details
Which of the following data does Docker Trusted Registry maintain?
Configurations
Notary Data
Certificates and Keys
Access Control to repos and Images
Configurations
Notary Data
Certificates and Keys
Access Control to repos and Imagesk
What is the command to perform a backup of DTR node?
Run the docker/dtr backup command
Run the docker/dtr-backup command
Run the docker/backup-dtr command
Run the docker/backup dtr command
Run the docker/dtr backup command
To create a backup of DTR, you don’t need to backup the DTR metadata, only backing up image content is enough.
True
False
False
Since you need your DTR replica ID during a backup, which of the following covers a few ways for you to determine your replica ID?
UCP web interface
UCP client bundle
SSH Access
UCP web interface
UCP client bundle
SSH Access
What is the command to restore the DTR from a backup tar (e.g dtr-metadata-backup.tar) ?
docker run -i –rm docker/dtr-restore < dtr-metadata-backup.tar
docker run -i –rm docker/dtr restore < dtr-metadata-backup.tar
docker run -i –rm docker/restore-dtr < dtr-metadata-backup.tar
docker run -i –rm docker/restore dtr < dtr-metadata-backup.tar
docker run -i –rm docker/dtr restore < dtr-metadata-backup.tar
What is the recommended approach of taking a backup of images stored by Docker Trusted Registry?
Store image data on local disk and backup image and DTR metadata together into a tarball
Store image data on a shared network storage and use supported backup mechanisms available for that network storage
Store image data on a shared network storage and use supported backup mechanisms available for that network storage
What is the command to restore the DTR from a backup tar (e.g dtr-metadata-backup.tar) ?
docker run -i –rm docker/dtr-restore < dtr-metadata-backup.tar
docker run -i –rm docker/dtr restore < dtr-metadata-backup.tar
docker run -i –rm docker/restore-dtr < dtr-metadata-backup.tar
docker run -i –rm docker/restore dtr < dtr-metadata-backup.tar
docker run -i –rm docker/dtr restore < dtr-metadata-backup.tar
Which of the following are included in a UCP backup?
User, Team and Organization details
Docker Swarm Services
Kubernetes Namespaces
Certificates and Keys
Access Control Details
Docker Images
User, Team and Organization details
Kubernetes Namespaces
Certificates and Keys
Access Control Details
The auto lock key is required when the cluster is restored, so it must be kept safe in an external password manager.
True
False
True
To create a backup of DTR, you don’t need to backup the DTR metadata, only backing up image content is enough.
True
False
False
What are the prerequisites for restoring a swarm?
You must use the same IP as the node from which you made the backup.
You must restore the backup on the same Docker Engine version.
If auto-lock was enabled on the old Swarm, the unlock key is required to perform the restore.
You must use the same IP as the node from which you made the backup.
You must restore the backup on the same Docker Engine version.
If auto-lock was enabled on the old Swarm, the unlock key is required to perform the restore.
What are the recommended hardware requirements to install DTR in a production environment?
- 16GB RAM, 4vCPUs and 25 - 100 of free disk space
- 16GB RAM, 2vCPUs and 100GB of free disk space
- 8GB RAM, 2vCPUs and 100GB of free disk space
- 8GB RAM, 4vCPUs and 25 - 100GB of free disk space
16GB RAM, 4vCPUs and 25 - 100 of free disk space
Which of the below is a recommended best practice while taking backups of a swarm cluster?
- Perform the backup operations from a swarm worker node
- Perform the backup operations from a swarm manager node that is not a leader
- Perform the backup operations from a swarm manager node that is a leader
- Perform the backup operations from a swarm manager node that is not a leader
What will happen if the container consumes more memory than its limit?
The container will be killed with an Out of Memory exception
Which component is responsible for performing all of these operations: Maintaining the layered architecture, creating a write-able layer, moving files across layers to enable Copy-OnWrite etc?
Storage drivers
What are the different access modes configurable on a persistent volume?
ReadOnlyMany,ReadWriteMany,ReadWriteOnce
Which statement best describes a kubernetes storage class?
A StorageClass provides a way for administrators to describe the “classes” of storage they offer,
Each StorageClass contains the fields provisioner, parameters, and reclaimPolicy.
The StorageClass objects can use a provisioner that can dynamically provision storage on supported storage providers.
Which statements best describe a PersistentVolumeClaim?
A PersistentVolumeClaim (PVC) is a request for storage by a user
A PVC will be automatically bound to a PV on creation when a PV is available
Claims can request specific size and access modes
What is a recommended best practice for installing packages and libraries using the apt-get package manager while building an image?
Use the RUN instruction and have the apt-get update and apt-get install commands on the same instruction
What is the command to change the tag of httpd:latest to httpd:v1
docker image tag httpd:latest httpd:v1
After building the below code with an image named webapp, What will happen when you run docker run webapp sleep 1000?
docker overrides the CMD instruction with sleep 1000
Which command can be used to deploy exactly one instance of the application on all the nodes in the cluster?
docker service create –mode=global webapp
Which statement best describes Quorum?
Quorum is the minimum number of nodes that must be available for the cluster to function properly.
What is the command to deploy a service named webapp on a node which has a type=cpu-optimized label?
docker service create –constraint=node.labels.type==cpu-optimized webapp
The webapp:v1 had some bugs and we fixed them in webapp:v2. We want to update the service to use the image webapp:v2. What is the right command?
docker service update –image=webapp:v2 webapp
To list the services created by a stack, run …
docker stack services
How do you configure all key-value pairs in a Secret object as environment variables within a container?
envFrom.secretRef
Which of the following are correct commands to create config maps? Select all the answers that apply.
kubectl create configmap CONFIGMAP-NAME –from-literal=KEY1=VALUE1 –from-literal=KEY2=VALUE2,kubectl create configmap CONFIGMAP-NAME –from-file=/tmp/env
Where do you configure the configMapKeyRef in a pod to use environment variables defined in a ConfigMap?
spec.containers.env.valueFrom
What flags are used to configure encryption on docker daemon without any authentication?
tls, tlscert, tlskey
What is the type and the name of the network created for the DTR services to communicate with each other?
overlay/dtr-ol
Which of the following solutions support network policies?
kube-router,Calico,Weave-Net
Which command is used to get the events of the container named webapp?
docker system events –filter ‘container=webapp’
When you create a swarm service and do not specify a user-defined overlay network, it connects to the … network by default
ingress
What are the recommended hardware requirements to install DTR in a production environment?
16GB RAM, 4vCPUs and 25-100GB of free disk space.
Which of the below is a recommended best practice while taking backups of a swarm cluster?
Perform the backup operations from a swarm manager node that is not a leader
What will happen if the –memory-swap is set to 0?
the setting is ignored, and the value is treated as unset
How many manager nodes must be online in a cluster with 13 manager nodes for the swarm cluster to continue to operate?
7
Where do you specify image names in a pod definition YAML file to be deployed on Kubernetes?
spec.containers.image
What is the command to rebalance the docker swarm cluster workloads?
docker service update –force
Which option of the docker service command can be used to update 4 replicas at a time of a service named mywebapp?
–update-parallelism 4
What is the command to change the role of a manager node named manager1 to a worker node in a Docker Swarm cluster?
docker node demote manager1
Which command can be used to return the current autolock key used to lock a docker swarm cluster?
docker swarm unlock-key
How do you inject configmap into a pod in Kubernetes?
Using envFrom and configMapRef
The … assigns tasks to nodes in Docker Swarm.
dispatcher
What is the high level command to restore the DTR from a backup tar named dtr-metadata-backup.tar ?
docker run -i –rm docker/dtr restore < dtr-metadata-backup.tar
Which of the below commands may be used to change the default logging driver to splunk?
echo ‘{“log-driver”: “splunk”}’ > /etc/docker/daemon.json
Refer to the Dockerfile below and identify which value should be added to the –from= option in the second stage to copy the application build from the first stage.
0,builder
Which of the below can help minimize the image size?
Only install necessary packages within the image
Combine multiple dependent instructions into a single instruction and clean up temporary files
Use multi-stage builds
What is the command to find images with a name containing busybox, at least 3 stars and are official builds
docker search –filter is-official=true –filter stars=3 busybox
To scan an image, DTR ________________.
Extracts a copy of the image layers from backend storage.
Extracts the files from the layer into a working directory inside the dtr-jobrunner container.
Executes the scanner against the files in this working directory, collecting a series of scanning data.
Once the scanning data is collected, the working directory for the layer is removed.
Universal Control Plane (UCP), lets you authorize users to view, edit, and use cluster resources by granting role-based permissions against resource sets.
True
Which statement best describes docker volume plugin?
Docker Engine volume plugins enables Engine deployments to be integrated with external storage systems such as Amazon EBS,
The local volume plugin helps to create a volume on Docker host and store its data under the /var/lib/docker/volumes/ directory.
Which of the following are a valid storage driver supported by Docker?
AUFS,
overlay2
Device Mapper
Which option is used to change the default storage driver to use devicemapper?
{“storage-driver”: “devicemapper”}
Which statements best describe Persistent Volume in Kubernetes?
A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Class, It is a resource in the cluster just like a node is a cluster resource.
ETCD by default listens on port 2780.
False
What types of networks will be created when you initialize a swarm or join a Docker host to an existing swarm?
bridge
ingress
After an update to a service named webapp we realized that something is wrong with the new version and we want to revert back to the old version. How can we achieve that?
docker service rollback webapp
overlay2, aufs, and devicemapper all operate at the file level rather than the block level.
False
Using RUN apt-get update && apt-get install -y ensures your Dockerfile installs the latest package versions everytime an image is built. This technique is known as ……
Cache busting
What is the recommended approach to load a set of configurations into the pod in the form of a file to the path /var/configs?
Create a ConfigMap with the required configurations, configure it as a volume in the pod definition file and then mount the volume as a file at /var/configs
UCP has its own built-in authentication mechanism and integrates with LDAP and AD services.
True
If the service type is NodePort, then Kubernetes will allocate a port on every worker node.
True
What is the command to apply disk=ssd label to worker1 in a swarm cluster.
docker node update –label-add disk=ssd worker1
A client bundle is a group of certificates downloadable directly from the Docker Trusted Registry (DTR) user interface within the admin section for “My Profile”
False
What option may be used to change the default behaviour of a failed task during an update in swarm?
–update-failure-action
Which component is responsible to serve the UCP components such as
the web UI,
the authentication API,
metrics server,
proxy and data stores used by UCP in the form of containers?
UCP Agent
The routing mesh enables each node in the swarm to accept connections on published ports for any service running in the swarm, even if there’s no task running on the node.
True
In which service does the DTR image scanning occur?
A service known as the dtr-jobrunner container
What component is responsible for instructing a worker to run a task?
scheduler
What are the 4 top level fields a kubernetes definition file for POD contains?
apiVersion
metadata
kind
spec
Which command can be used to list the tasks in a stack named webapp?
docker stack ps webapp
Which command can be used to increase the number of replicas from 2 to 4 of a service named webapp? Select the all right answer
docker service update –replicas=4 webapp
docker service scale webapp=4
Which of the below statements are correct?
Traffic to port 39376 on all nodes in the cluster is routed to port 9376 on a random POD with the label app web,
Traffic to port 80 on the service is routed to port 9376 on a random POD with the label app web
Which command can be used to get the logs of a swarm service?
docker service logs SERVICE-NAME
Create a service using the my-web-server image and map UDP port 80 in the container to port 5000 on the overlay network.
docker service create -p 5000:80/udp my-web-server
docker service create –publish published=5000,target=80,protocol=udp my-web-server
Which formula can be used to calculate the Quorum of N nodes?
N / 2 +1
What is the default range of ports that Kubernetes uses for NodePort if one is not specified?
30000-32767
Which among the following statements are true without any change made to the default behavior of network policies in the namespace?
As soon as a network policy is associated with a POD all ingress and egress traffic to that POD are denied except allowed by the network policy
What is the command to stop all running containers on the host?
docker container stop $(docker container ls -q)
Which of the following is the correct format for CMD instruction?
CMD [“executable”,“param1”,“param2”]
CMD [“param1”,“param2”]
CMD command param1 param2
What are the features of docker trusted registry (DTR)?
Built-in Access Control
Image and Job Management
Security Scanning
Image Signing
Which image is used to deploy the Docker Trusted Registry?
docker/dtr
Print the value of ‘Architecture’ and ‘Os’ of an image named webapp
docker image inspect webapp -f ‘{{.Os}} {{.Architecture}}’
While building a docker image from code stored in a remote URL, which command will be used to build from a directory called docker in the branch dev?
docker build https://github.com/kk/dca.git#dev:docker
Which of the statements best describe “Resource sets” in Access Control Model?
To control user access, cluster resources are grouped into Docker Swarm collections or Kubernetes namespaces.
Together, collections and namespaces are named resource sets.
What is the sequence of operations to be followed while configuring a storage class for an application?
Create a storage class with a provisioned
create a PVC with the storage class, and then use the PVC in the volumes section in the pod definition file
overlay2, aufs, and devicemapper all operate at the file level rather than the block level.
False
What is the command to delete the persistent volumes?
kubectl delete pv PV-NAME
What is a linux feature that allows isolation of containers from the Docker host?
Namespaces
What component is responsible for managing CPU resources and allocating the time of the CPU between different processes?
CFS
Which of the following steps are required on each manager node to restore data to a new swarm?
Shut down the Docker Engine on the node you select for the restore
Remove the contents of the /var/lib/docker/swarm directory on the new Swarm if it exists
Restore the /var/lib/docker/swarm directory with the contents of the backup
Start Docker on the new node. Unlock the swarm if necessary
Re-initialize the swarm so that the node does not attempt to connect to nodes that were part of the old swarm, and presumably no longer exist.
Where is the log of the webapp container, with id 78373635, stored on the Docker Host?
/var/lib/docker/containers/78373635/78373635.json
Which statement best describes a Kubernetes node? (Choose 3)
A machine part of the Kubernetes cluster that runs workloads
A Virtual Machine that hosts workloads part of a Kubernetes cluster
A Physical Machine that hosts workloads part of a Kubernetes cluster
A machine that automatically schedules the pods across the nodes in the cluster.
A tool to start a Kubernetes cluster.
A machine part of the Kubernetes cluster that runs workloads
A Virtual Machine that hosts workloads part of a Kubernetes cluster
A Physical Machine that hosts workloads part of a Kubernetes cluster
Which statement best describes kubectl in Kubernetes?
kubectl is an agent that runs on Kubernetes nodes
kubectl is used to bring up the Kubernetes cluster
The Kubernetes command-line tool
kubectl is a tool that lets you run Kubernetes locally
The Kubernetes command-line tool
Which of the below are the container orchestration tools?
Apache Mesos
Docker Swarm
ETCD
Kubernetes
Apache HTTPD
Apache Mesos
Docker Swarm
Kubernetes
What are the features of Kubernetes?
Self-healing & Batch execution
Secrets & configuration management
Container Image Management
Automated rollouts and rollbacks
Self-healing & Batch execution
Secrets & configuration management
Automated rollouts and rollbacks
Which statement best describes a control plane component?
The control plane’s components decides how workloads are placed across the nodes in the cluster
kube-proxy is one of the control plane component
kube-scheduler is one of the control plane component
kube-controller is one of the control plane component
The control plane’s components decides how workloads are placed across the nodes in the cluster
kube-scheduler is one of the control plane component
kube-controller is one of the control plane component
Which statement best describes the Worker Node component?
kubelet and container runtime are the worker node components
kube-proxy is one of the worker node component
kube-scheduler is one of the worker node component
kube-apiserver is one of the worker node component
kubelet and container runtime are the worker node components
kube-proxy is one of the worker node component
Which of the following statements best describes ETCD? Select the correct answer
Etcd serves as the backing datastore for Kubernetes cluster data
ETCD is a worker node component
ETCD is a distributed reliable key-value store
None of the above
Etcd serves as the backing datastore for Kubernetes cluster data
ETCD is a distributed reliable key-value store
ETCD by default listens on port 2780.
True
False
False
Which of the following are components deployed only on a Master Node in a Kubernetes cluster?
Kube Scheduler
Kube Controller Manager
Kube Api-server
Kubelet
Kube-Proxy
Kube Scheduler
Kube Controller Manager
Kube Api-server
Which of the following is the etcd command line tool?
etcd
etcdctl
kubectl
etcdcli
etcdctl
Which of the below comes under Kubernetes Hosted Solutions?
Google Compute Engine (GCE)
Google Kubernetes Engine (GKE)
Azure Kubernetes Service (AKS)
Amazon EC2 Service
Google Kubernetes Engine (GKE)
Azure Kubernetes Service (AKS)
What is a component of the Kubernetes control plane that allows external users or services to manage the Kubernetes cluster?
Kubernetes Scheduler
ETCDCTL
Kube API Server
Kube Proxy
Kube API Server
Which of the following component watches for newly created pods and selects a node for them to run on?
kube-proxy
kube-node-controller
kube-scheduler
kubelet Agent
kube-scheduler
What is the purpose of the replication controller?
Responsible for noticing and responding when nodes go down.
An agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.
Responsible for maintaining the correct number of replicas of PODs at all times.
Replication controller makes sure that a pod or a homogeneous set of pods is always up and available
Responsible for maintaining the correct number of replicas of PODs at all times.
Replication controller makes sure that a pod or a homogeneous set of pods is always up and available