The Kubernetes yaml shown below describes a clusterIP service.
Is this a correct statement about how this service routes requests?
Solution: Traffic sent to the IP of this service on port 8080 will be routed to port 80 in a random pod with the label aPP: nginx.
Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution. capabilities
A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster. Can this be used to schedule containers to meet the security policy requirements?
Solution. label constraints
Your organization has a centralized logging solution, such as Splunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution. Set the log-driver-and log-opt keys to values for the logging solution (Splunk) in the daemon.json file.
Is this the purpose of Docker Content Trust?
Solution. Sign and verify image tags.
Does this command create a swarm service that only listens on port 53 using the UDP protocol?
Solution. ‘docker service create -name dns-cache -p 53:53 -udp dns-cache’
You configure a local Docker engine to enforce content trust by setting the environment variable
DOCKER_CONTENT_TRUST=1.
If myorg/myimage: 1.0 is unsigned, does Docker block this command?
Solution: docker container run myorg/myimage:1.0
Can this set of commands identify the published port(s) for a container?
Solution. ‘docker container inspect", docker port'
Are these conditions sufficient for Kubernetes to dynamically provision a persistentVolume, assuming there are no limitations on the amount and type of available external storage?
Solution: A default provisioner is specified, and subsequently a persistentVolumeClaim is created.
You want to create a container that is reachable from its host's network. Does this action accomplish this?
Solution: Use either EXPOSE or --publish to access the containers on the bridge network
You add a new user to the engineering organization in DTR.
Will this action grant them read/write access to the engineering/api repository?
Solution: Add the user directly to the list of users with read/write access under the repository's Permissions tab.
The Kubernetes yaml shown below describes a clusterIP service.
Is this a correct statement about how this service routes requests?
Solution: Traffic sent to the IP of this service on port 80 will be routed to port 8080 in a random pod with the label app:
nginx.
Will this command ensure that overlay traffic between service tasks is encrypted?
Solution. docker network create -d overlay --secure
Your organization has a centralized logging solution, such as Sptunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution. docker system events- -filter splunk
A persistentVolumeClaim (PVC) is created with the specification storageClass: "", and size requirements that cannot be satisfied by any existing persistentVolume.
Is this an action Kubernetes takes in this situation?
Solution: The PVC remains unbound until a persistentVolume that matches all requirements of the PVC becomes available.
Is this a way to configure the Docker engine to use a registry without a trusted TLS certificate?
Solution. Set INSECURE_REGISTRY in the’ /etc/docker/default’ configuration file.
One of several containers in a pod is marked as unhealthy after failing its livenessProbe many times. Is this the action taken by the orchestrator to fix the unhealthy container?
Solution: Kubernetes automatically triggers a user-defined script to attempt to fix the unhealthy container.
You configure a local Docker engine to enforce content trust by setting the environment variable
DOCKER_CONTENT_TRUST=1.
If myorg/myimage: 1.0 is unsigned, does Docker block this command?
Solution: docker image inspect myorg/myimage: 1.0
Does this describe the role of Control Groups (cgroups) when used with a Docker container?
Solution: role-based access control to clustered resources
Will this command list all nodes in a swarm cluster from the command line?
Solution: ‘docker Is -a’
You want to mount external storage to a particular filesystem path in a
container in a Kubernetes pod.
What is the correct set of objects to use for this?
A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster.
Can this be used to schedule containers to meet the security policy requirements?
Solution: label contraints
Will this action upgrade Docker Engine CE to Docker Engine EE?
Solution. Disable the Docker service via ‘chkconfig' or 'systemctl'.
Will this command list all nodes in a swarm cluster from the command line?
Solution: 'docker swarm nodes'
Does this command display all the pods in the cluster that are labeled as 'env: development'?
Solution: 'kubectl get pods --all-namespaces -I env=development'
Your organization has a centralized logging solution, such as Splunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution. docker run -- log driver=splunk for every container at run time
You configure a local Docker engine to enforce content trust by setting the environment variable
DOCKER_CONTENT_TRUST=1.
If myorg/myimage: 1.0 is unsigned, does Docker block this command?
Solution: docker image import
Is this a function of UCP?
Solution: enforces the deployment of signed images to the cluster
You want to create a container that is reachable from its host's network.
Does this action accomplish this?
Solution. Use either EXPOSE or -publish to access the container on the bridge network.
A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster. Can this be used to schedule containers to meet the security policy requirements?
Solution. environment variables
A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster.
Can this be used to schedule containers to meet the security policy requirements?
Solution: resource reservation
Does this command display all the pods in the cluster that are labeled as 'env: development'?
Solution: 'kubectl get pods -I env=development'
Will this command mount the host's '/data' directory to the ubuntu container in read-only mode?
Solution: 'docker run --volume /data:/mydata:ro ubuntu'
You want to provide a configuration file to a container at runtime. Does this set of Kubernetes tools and steps accomplish this?
Solution: Turn the configuration file into a configMap object and mount it directly into the appropriate pod and container using the .spec.containers.configMounts key.
Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: seccomp
Does this describe the role of Control Groups (cgroups) when used with a Docker container?
Solution: accounting and limiting of resources
During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.
Will this strategy successfully accomplish this?
Solution: Create a PersistentVolume with storageciass: "" and hostPath: /data, and a persistentVolumeClaim requesting this PV. Then use that PVC to populate a volume in a pod
The following Docker Compose file is deployed as a stack:
Is this statement correct about this health check definition?
Solution: Health checks test for app health five seconds apart. If the test fails, the container will be restarted three times before it gets rescheduled.
Will this configuration achieve fault tolerance for managers in a swarm?
Solution: only two managers, one active and one passive.
In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest’, from being overwritten by another user with push access to the repository?
Solution: Remove push access from all other users.
Is this a Linux kernel namespace that is disabled by default and must be enabled at Docker engine runtime to be used?
Solution: net
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service?
Solution: 'docker service inspect http'
Does this describe the role of Control Groups (cgroups) when used with a Docker container?
Solution: user authorization to the Docker API
Will this command ensure that overlay traffic between service tasks is encrypted?
Solution: docker network create -d overlay -o encrypted=true
Will This command list all nodes in a swarm cluster from the command line?
Solution. ‘docker swarm nodes'
The Kubernetes yaml shown below describes a networkPolicy.
Will the networkPolicy BLOCK this trafftc?
Solution. a request issued from a pod bearing only the tier: frontend label, to a pod bearing the tier: backend label
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service?
Solution: 'docker ps http'
You want to create a container that is reachable from its host's network.
Does this action accomplish this?
Solution. Use network connect to access the container on the bridge network.
Your organization has a centralized logging solution, such as Splunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution: Set the log-driver and log-oPt keys to values for the logging solution (Splunk) In the daemon.json file.
You are running only Kubernetes workloads on a worker node that requires
maintenance, such as installing patches or an OS upgrade.
Which command must be run on the node to gracefully terminate all pods on
the node, while marking the node as unschedulable?
You configure a local Docker engine to enforce content trust by setting the environment variable DOCKER_C0NTENT_TRUST=l. If myorg/myimage: 1.0 is unsigned, does Docker block this command?
Solution. docker image build, from a Dockeflle that begins FROM myorg/myimage: l1.0
Will this sequence of steps completely delete an image from disk in the Docker Trusted Registry?
Solution: Delete the image and delete the image repository from Docker Trusted Registry
Is this an advantage of multi-stage builds?
Solution: optimizes Images by copying artifacts selectively from previous stages
Will this action upgrade Docker Engine CE to Docker Engine EE?
Solution: Uninstall 'docker-ce' package before installing 'docker-ee' package.