Introduction to Containers w/ Docker, Kubernetes & OpenShift Quiz Answers

Introduction to Containers w/ Docker, Kubernetes & OpenShift Week 01 Quiz Answers

Quiz : Module 1 – Graded Quiz

Q1. Which of the following are benefits of containers?

  • Containers provide a standardized way to package and ship software.
  • Each container is fully isolated and therefore secure.
  • Each container runs its own operating system (OS).
  • Like virtual machines (VMs), containers virtualize your infrastructure.

Q2. What is an image?

  • A YAML file with key/value pairs specifying the attributes of a container.
  • A read-only file that contains the source code, libraries, and dependencies that are needed to run an application.
  • A text file that contains the commands and settings that will run a container and the apps running in that container.
  • An isolated process running on a local or remote host with its own file system and networking.

Q3. In this sample Dockerfile, what does the FROM instruction do?

FROM ubuntu:18.04

COPY . /app

RUN make /app

CMD python /app/app.py

  • It defines the virtualized host operating system on which the container will run.
  • It defines the base image, which in this case is Ubuntu version 18.04.
  • It defines the minimum version of the operating system for the docker build command to use.
  • It defines the operating system on which the docker build command must be run.

Q4. What does the docker build command do?

  • It creates a Dockerfile.
  • It uses an image to create a container.
  • It creates a Docker app.
  • It uses a Dockerfile to create an image.

Q5. You can use the Docker COPY instruction to copy files from your local machine to an image.

  • True
  • False

Q6. What does the Docker CLI build command do?

  • It builds a Dockerfile.
  • It builds a new container.
  • It builds a microservice that will run in an image.
  • It builds a new cluster.
  • It builds an image from a Dockerfile.

Q7. Containers include a guest operating system in every instance.

  • True
  • False

Q8. In this sample docker build command, what does the -t option do?

docker build -t my-app:v1 .

  • It tags the current working directory as the target location for the image being built.
  • It indicates that the version “v1” of “my-app” should be used when building the image.
  • It indicates that the files used to build the image are located in the current working directory.
  • It gives the image the name “my-app” and the tag “v1”.

Q9. You use the docker push command to distribute an image to a registry.

  • True
  • False

Introduction to Containers w/ Docker, Kubernetes & OpenShift Week 02 Quiz Answers

Quiz : Module 2 – Graded Quiz

Q1. Which of the following four statements describes what Kubernetes is? Select all that apply.

  • Open source software
  • Container orchestration platform
  • A registry for storing images
  • Widely available
  • A tool that facilitates declarative management

Q2. Which of the following components is part of the Kubernetes control plane?

  • The Kubernetes network proxy
  • The kubelet
  • etcd
  • The worker nodes

Q3. Which of the following two are Kubernetes objects? Select all that apply.

  • Clusters
  • Kubelets
  • Kubernetes scheduler
  • Namespaces
  • ConfigMaps

Q4. Which Kubernetes object represents a single instance of processes running in a container?

  • Pod
  • Cluster
  • Kubelet
  • Deployment
  • ReplicaSet

Q5. In this sample kubectl command, what does create do?

kubectl create -f nginx.yaml

  • It creates a new cluster using the details in the nginx.yaml file.
  • It creates a configuration file for an nginx web server.
  • It creates a YAML file named nginx.yaml.
  • It creates an object using the details in the nginx.yaml file.

Q6. Which of the following statements describes what Kubernetes is? 

  • A container orchestration platform
  • A solution for sharing and storing images
  • An all-inclusive platform as a service (PaaS)
  • A service for building source code
  • A continuous delivery pipeline

Q7. Which of the following two are container runtimes? Select all that apply.

  • CRI-O
  • DRunner
  • Kubelet
  • Rocket Ship
  • Docker

Q8. Which of the following Kubernetes objects can you use to segregate a cluster by team or project?

  • Kubernetes controllers
  • Volumes
  • ConfigMaps
  • Namespaces

Q9. Which Kubernetes object provides updates to Pods and ReplicaSets?

  • ConfigMap
  • Secret
  • Deployment
  • Patch

Q10. In this sample kubectl command, what does create do?

kubectl create -f pod.json

  • It creates a file that contains the configuration for a Kubernetes Pod.
  • It creates a new cluster using the details in the pod.json file.
  • It creates a JSON file named pod.json.
  • It creates an object using the details in the pod.json file.

Introduction to Containers w/ Docker, Kubernetes & OpenShift Week 03 Quiz Answers

Quiz : Module 3 – Graded Quiz

Q1. Which of the following statements describes what a ReplicaSet does? Select the four that apply.

  • Maintains a stable set of Pods in a cluster, spinning up or deleting pods as needed
  • Provides configuration details to Deployments
  • Rolls out app changes in an automated and controlled manner
  • Autoscales an application
  • Replicates a Deployment

Q2. Which of the following Kubernetes objects are used to run applications? Select the four that apply.

  • ReplicaSets
  • Service bindings
  • Secrets
  • ConfigMaps
  • ibmcloud CLI

Q3. In this sample kubectl command, what does get deployments tell us? Select the four that apply.

» kubectl get deployments

NAME READY UP-TO-DATE AVAILABLE AGE Nginx-deploy 1/3 1 1 3s

  • How many replicas of the application are available.
  • How long the application has been running.
  • How many replicas of the application are ready.
  • The number of replicas that have been updated to the desired state.
  • The Kubernetes namespace in which the Deployments live.

Q4. Which of the following Kubernetes objects is used to store and manage sensitive information?

  • ReplicaSets
  • Service bindings
  • Secrets
  • ConfigMaps

Q5. Which of the following can be used to create ConfigMaps? Select the three that apply.

  • Service bindings
  • A YAML configuration file
  • A file with key-value pairs
  • Horizontal Pod Autoscaler
  • The kubectl configmap command

Q6. How are ReplicaSets often created?

  • By adding a ReplicaSet: on flag to the deployment’s configuration file.
  • Using the kubectl create replicaset command.
  • By adding a ReplicaSet: on flag to the Dockerfile used to build the container image.
  • One is automatically created for you when you create a Deployment.

Q7. Which of the following Kubernetes objects are used to run applications? Select the three that apply.

  • Plugins
  • ConfigMaps
  • ResourceSets
  • Deployments
  • Service bindings

Q8. Which of the following are used to provide ConfigMaps to Pods and Deployments? Select the two that apply.

  • Service bindings
  • Kubernetes schedulers
  • String literals
  • Container runtimes
  • YAML configuration files

Q9. What Kubernetes capabilities enable an application to increase the number of Pods based on traffic? Select the two that apply.

  • Service binding
  • kubectl scale command
  • kubectl autoscale command
  • Horizontal Pod Autoscaler 
  • Kubernetes traffic router

Q10. What does the following command do?

kubectl get secrets –namespace=default

  • Retrieves the IBM Cloud IAM API key for your Kubernetes cluster
  • Retrieves the binding.password values for the services bound to your Kubernetes cluster
  • Retrieves all the Secrets in your Kubernetes cluster
  • Retrieves the secrets in the “default” namespace

Introduction to Containers w/ Docker, Kubernetes & OpenShift Week 04 Quiz Answers

Quiz : Module 4 – Graded Quiz

Q1. Which of the following most accurately describes the relationship between Red Hat OpenShift and Kubernetes?

  • OpenShift packages Kubernetes with additional tooling to make developers and administrators more successful.
  • OpenShift is a tool in the Kubernetes that ecosystem that can be used in conjunction with Kubernetes to deploy cloud-native applications.
  • OpenShift can be deployed on a Kubernetes cluster to provide additional tooling such as logging, monitoring, and CI/CD.
  • OpenShift plugs into Kubernetes through custom resource definitions to provide build and other capabilities.

Q2. Which of the following are Red Hat OpenShift build triggers? Select the three that apply.

  • Docker build
  • Configuration change
  • Source-to-image
  • Webhook
  • Image change

Q3. Which of the following are possible with Istio service mesh? Select the three that apply.

  • Setting policies that stipulate which services can talk to each other
  • Encrypting traffic between services
  • Routing traffic to two versions of a microservice
  • Creating protocols for service to service communication
  • Decouple applications into smaller, loosely coupled microservices

Q4. Which of the following are types of operators available in OperatorHub? Select the three that apply. 1

  • CRD
  • Community
  • Custom controller
  • Red Hat
  • Certified

Q5. Image streams can point to images in which of the following locations. Select the four that apply.

  • The OpenShift internal registry
  • Public external registries
  • Private external registries
  • Other image streams
  • A Kubernetes cluster

Q6. What is the Istio service mesh NOT used for? Select all that apply.

  • Observe and monitor services
  • Secure communication between services
  • Control the flow of traffic between services
  • Encrypt Kubernetes secrets

Q7. Kubernetes is the sole project inhosted by the CNCF.

  • True
  • False

Q8. OpenShift can be run in which of the following environments? Select the four that apply.

  • Public cloud
  • Hybrid cloud
  • Private cloud
  • On premise
  • Only A and C

Q9. What is the open source upstream version of OpenShift called?

  • Kubernetes open source
  • CRD
  • Istio
  • OKD
  • Red Hat Enterprise Linux CoreOS

Q10. Which of the following build strategies injects application source code into builder images without having to write a Dockerfile?

  • Source-to-image
  • Docker
  • Image stream
  • Webhook
  • Custom build

Q11. Image streams contain complete image data.

  • True
  • False

Q11. Do containers have to be on a specific operating system or platform?

  • Yes, containers only work on Linux-based operating systems and platforms.
  • No, containers work on many types of operating systems and platforms.
  • Yes, containers only work on Windows-based operating systems and platforms.
  • No, containers don’t run on operating systems or platforms.
  • Containers can be used across multiple types of operating systems and platforms.

Q12. How are digital containers like shipping containers?

  • Both digital and shipping containers have to travel internationally.
  • Digital containers must be welded to computer motherboards, just like shipping containers must be welded.
  • Container size and specs are standardized, which makes them easier to move around.
  • Digital containers are not like shipping containers.
  • Digital containers make software portable so applications can run on multiple platforms.

Q13. What applications are a good fit for Docker?

  • Applications that need a lot of security
  • Applications that require flexible scaling and portability
  • Applications with rich GUI features
  • Applications with high performance requirements
  • Docker became popular with developers because of its simple architecture, high scalability, and easy portability.

Q14. What are three parts of Docker’s underlying technology.

  • Linux kernel features
  • Linux kernel features are a part of Docker’s underlying technology.
  • Namespaces
  • Namespaces are a part of Docker’s underlying technology.
  • GitHub
  • The Go programming language
  • The Go programming language is a part of Docker’s underlying technology.

Q15. What Docker features create a container image?

  • The build command and a Dockerfile
  • The image command and a Dockerfile
  • The copy command and an existing image
  • The run command and a Dockerfile
  • The build command is used with a Dockerfile to build a container image.

Q16. What are the steps used to create and run containers?

  • Create a Dockerfile and use it with the pull command to create a running container.
  • Create a container image, use it to create a Dockerfile, and then use the Dockerfile to create a running container.
  • Create a Dockerfile, use it to create a container image, and then use the container image to create a running container.
  • Input the container image name and tag.
  • The proper sequence of steps to create and run containers is to create a Dockerfile, use it to create a container image, and then use the container image to create a running container.

Q17. What is the function of the Docker ‘run’ command?

  • Creates a container from an image
  • Stores images in a configured registry
  • Lists all images, repositories, tags, and sizes
  • Retrieves images from a configured registry
  • Please review the Building and Running Containers video.

Q18. What is a Docker container?

  • A method of isolating communication
  • A persistent set of data that can be transferred
  • A read-only template
  • A runnable instance of an image
  • A Docker container is defined as a runnable instance of an image.

Q19. What are volumes and bind mounts used for in Docker?

  • Isolating communication
  • Erasing data
  • Persisting data
  • Connecting to external storage platforms
  • Volumes and bind mounts are used to persist data in Docker.

Q20. What does the Docker client-server architecture provide?

  • An application environment
  • Cloud storage
  • Code checking
  • A communication channel
  • The Docker client-server architecture provides a complete application environment.

Get all IBM Full Stack Cloud Developer Professional Certificate Quiz Answers

Introduction to Cloud Computing Coursera Quiz Answers

Introduction to Web Development with HTML, CSS, JavaScript Quiz Answers

Developing Cloud Native Applications Coursera Quiz Answers

Developing Cloud Apps with Node.js and React Coursera Quiz Answers

Introduction to Containers w/ Docker, Kubernetes & OpenShift Quiz Answers

Python for Data Science, AI & Development Coursera Quiz Answers

Python Project for AI & Application Development Coursera Quiz Answers

Developing Applications with SQL, Databases, and Django Quiz Answers

Application Development using Microservices and Serverless Quiz Answers

Full Stack Cloud Development Capstone Project Coursera Quiz Answers

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *