Docker LinkedIn Quizzes

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

True

(T/F?) Both the AWS console and the AWS CLI communicate with the AWS API.

True

(T/F?) One goal of cloud native technologies is to increase the speed of application deployments.

False

(T/F?) The kube-proxy is the only worker node component that communicates with the kube-apiserver.

False

(T/F?) The term "resources" refers to the available bandwidth and memory on a worker node.

a)

For what purpose will you use minikube? a) to run a Kubernetes cluster on your computer b) to run a Kubernetes cluster on AWS c) to interact with a Kubernetes cluster

b)

How do you use kubectl to verify that the AWS Load Balancer Controller was properly installed? a) Run the command eksctl info. b) View all the Deployments in the kube-system namespace and make sure at least one aws-load-balancer-controller pod is running. c) Look in the AWS console.

3

How many replicas of the pod-info app do you specify in your deployment? 7 1 3 2

the container block

In a deployment YAML file, what is the immediate parent under which the resource request and limit specifications should be placed? the template block the env block the container block the container image name

a)

In the context of resource requests and limits to a pod, what do resources refer to? a) available CPU and memory on the worker node b) available storage space for the pod c) available CPU and memory for the cluster

c)

In the following command structure that connects you to a BusyBox shell, what should you set for arg2? a) kubectl exec arg1 arg2 arg3 the name of the shell to use b) the string -it c) the name of the BusyBox pod d) the command to run within the shell

b)

Kubernetes is the Greek word for helmsman of a ship. Why did the creators of the project choose this name? a) Kubernetes ranks containers in the order in which they were deployed. b) Kubernetes oversees a set of servers and decides where to deploy containerized applications, when to scale up and down the number of application replicas, and what to do when an application or server stops working. c) Kubernetes negotiates with other servers and trades containers when it has run out of space. d) Kubernetes moves containers from one cloud provider to another.

a)

Kubernetes v1.24 removed the Dockershim. How has this change impacted Kubernetes? a) Kubernetes can no longer use the Docker engine to run containers. b) Kubernetes can no longer be installed on a host that also runs a Docker service. c) Kubernetes can no longer use Docker images to instantiate containers.

c)

Select the least true statement from the list. a) Docker Hub is the default container registry used by the Docker client. b) By default, Docker images will receive a latest version tag if a version tag is not provided. c) Anyone can push to Docker Hub. You do not need to register an account. d) Anyone can pull from the Docker Hub without an account.

b)

The service account for the Load Balancer Controller gives pods permission to create and manage which AWS resource? a) VPC b) Elastic Load Balancers c) IAM d) EKS

c)

To create a user with admin permissions, you start by creating what kind of IAM resource? a) OIDC identity provider b) Access key ID and secret access key c) IAM User group d) IAM Admin policy

a)

Using the describe pod command, what will the event log show for a pod that has been running for a long time? a) The event log will show as empty. b) The command is not expected to show pod events. c) The event log will show all events from launch.

IP address

What additional information will show when the -o wide option is added to the kubectl get pods command? IP address port status

c)

What are some common problems with using Docker Machine to run Docker? a) slow disk performance when using volume mounts b) Users need to know how to use and manage Virtualbox for common tasks. c) all of these answers d) slow network performance while using exposed ports

b)

What are the three components on every worker node? a) kube-apiserver, container runtime interface, and kube-proxy a) kubelet, container runtime interface, and kube-proxy a) kubelet, cloud-controller-manager, and kube-proxy b) kubelet, kube-scheduler, and kube-proxy

c)

What assumption is at the foundation of cloud native technology? a) Software should be released in slow cycles to enable proper testing. b) Cloud native projects should provide isolated solutions with less cross-integration. c) It is good to remove silos between ops teams and software development teams.

b)

What function does the Kubelet component perform on a worker load? a) Create containers using a supported engine. b) Check that the containers are healthy. c) Check that pods and services can communicate.

a cluster

What is an instance of Kubernetes called? a cluster a worker node a deployment a server

AddressPool

What is not a type of service that Kubernetes offers? AddressPool ClusterIP LoadBalancer NodePort

c)

What is the eksctl command to create a new EKS cluster? a) eksctl new cluster b) eksctl cluster up c) eksctl create cluster -f cluster.yaml d) eksctl cluster create

ports:

What is the immediate parent of the following line? - containerPort: 8080 template: spec: ports: containers:

d)

What is the immediate parent under which the securityContext definition should be placed? a) the env block b) the container name c) the metadata section d) the container block

c)

What is the main problem that Docker aims to solve? a) making app packages smaller so that they take less time to download b) making it easier to host your web application on the Internet c) apps working on one machine but not others d) automatically compiling your code regardless of the language it's written in

d)

What is the most correct explanation describing this command: docker exec -i -t 2bf bash (Don't forget to use docker exec --help if you need it!) a) This starts an interactive Bash shell within a container with ID 2bf with a pseudo-TTY allocated to it. b) This starts a Bash shell within a container starting with ID 2bf with a pseudo-TTY allocated to it. c) This starts an interactive Bash shell within a container starting with ID 2bf. d) This starts an interactive Bash shell within a container starting with ID 2bf with a pseudo-TTY allocated to it.

a)

What is the name of the directory where the AWS CLI stores your credentials? a) .aws b) .aws-creds c) .config d) .kube

b)

What will be the outcome of the following command? kubectl get pods a) All pods in all namespaces will be listed. b) All pods in the default namespace will be listed. c) The command will error out.

c)

What will the following command do? minikube delete a) Delete all objects added using YAML manifests. b) Delete the namespaces. c) Delete the entire minikube cluster.

c)

When the user is applying a new deployment, which two Kubernetes components are involved in the actual step of binding a pod to a node? a) controller manager and scheduler b) kubelet and container-runtime c) api-server and kubelet d) api-server and etcd

b)

When would you want to bind a port on your computer to that of a container? a) When you want to save data from your container. b) When your container is running a network service that you want to use from your computer. c) When your container needs access to the Internet. d) When your container is running a network service that you want to use from within the container.

kublet

When you launch a pod with a new container image, which component pulls the image from the image repository? api-server controller manager kubelet

LoadBalancer

When you want someone to access an application deployed in your Kubernetes cluster, you will set up a Kubernetes _____ Service. LoadBalancer ClusterIP NAT Gateway NodePort

d)

Where can a container run? a) on an LXD system with Docker installed b) on a Linux machine with no other prerequisites c) on a cloud-based Docker Hub deployment d) on a Windows machine with a container engine installed

a)

Which AWS resource runs your Kubernetes worker nodes? a) EC2 b) VPC c) Lambda d) IAM

-

Which character or sequence of characters will you use in YAML to represent a sequence? # - --- :

a)

Which commands will the "Binary download" installer type for minikube require you to run? a) curl and install b) unzip and rpm c) curl and dpkg d) install and minikube

API Server

Which component communicates directly with the etcd component? scheduler API Server kubelet

etcd

Which control plane component stores the data about the state of the cluster? API Server etcd scheduler controller manager

c)

Which installer type is not offered for minikube on Windows through the official minikube site? a) .exe download b) Windows Package Manager c) .zip portable download d) Chocolatey

b)

Which kubectl command can you use to list all the pods in a specific namespace? a) kubectl apply -f mynamespace b) kubectl get pods -n mynamespace c) kubectl list pods -n mynamespace d) kubectl mynamespace -l deployments

a)

Which of the following is a way of setting up data storage inside a Kubernetes cluster? a) persistent volume b) Docker volume c) a managed SQL database

a)

Which of these Docker images will allow you to create a simple Docker registry for testing purposes? a) all of these answers b) registry:1 c) registry:2 d) registry:latest

b)

Which of these Kubernetes resource types would need to be modified to take advantage of the AWS Load Balancer Ingress Controller? a) Service b) Ingress and Service c) Pod d) Ingress

c)

Which of these benefits for using Kubernetes is most accurate? a) It makes managing thousands of containers much simpler than using Docker alone. b) It is faster than using Docker alone. c) It makes managing hundreds of thousands of containers much simpler than using Docker alone. d) It is less complex than pure Docker.

b)

Which of these commands can you run to debug a slow container? a) docker images b) docker top [container-id] c) docker run d) docker rmi

d)

Which of these commands can you run to validate that your values were properly accepted? a) helm render b) helm list c) helm list-values d) helm template

kublet

Which of these is not a component of the Kubernetes Control Plane? kubelet etcd kube-apiserver cloud-controller-manager

d)

Which of these kubectl commands will allow you to switch between Kubernetes namespaces? a) the KUBERNETES_NAMESPACE variable b) You can only change namespaces by modifying your kubeconfig and context. c) --kubernetes-namespace d) -n

Control groups

Which of these options do the statements below describe? - I control how much of any resource a process can get. - CPU time, memory quota, and network access are some of the things you can limit through me. - I cannot limit how much disk space or disk IO a process can use. Zones Jails Namespaces Control groups

a)

Which of these problems does Docker Compose not solve? a) Autoscaling containers and transparently moving them from machine to machine. b) Simplifies local development by allowing you to run multiple containers at once. c) Uses a manifest file to declare your application's dependencies and run them in a local Docker network. d) Prevents you from having to run multiple docker CLI commands to start multiple containers.

d)

Which of these problems does Kind aim to solve best? a) None of these. b) Creating production-ready Kubernetes clusters more easily within cloud providers. c) Creating bare-metal Kubernetes clusters easily. d) Creating local Kubernetes clusters easily within Docker.

b)

Which of these reasons best summarizes why you should not use the latest tag when building Docker images? a) It makes your Docker image bigger, as Docker includes additional files and configurations for images tagged with latest. b) The application within the image can change when pulled again in the future. c) It makes Docker containers faster. d) It makes Docker containers slower.

b)

Which of these statements about docker container start is true? a) You must run docker rm before running docker container start. b) You can run docker container start against a container multiple times. c) You can only run docker container start against a container once. To re-run, delete the container first. d) You must run docker run before running docker container start.

c)

Which of these statements is least true about the difference between containers and virtual machines? a) Containers can only run one app at a time. b) Containers do not translate hardware instructions. c) Containers are just smaller virtual machines. d) Virtual machines emulate actual hardware. Containers emulate operating systems.

d)

Which of these statements is most correct about the relationship between Kind and the Docker Registry? a) Kind comes with its own Docker registry. A separate Docker registry is not needed. b) You must create a local Docker registry to run local images in Kind. c) You must create a local Docker registry and link it to the same network as your kind cluster to run all images, including those on Docker Hub. d) You must create a local Docker registry and link it to the same network as your kind cluster to run local images.

a)

Which of these statements is most true about the advantages Docker provides? a) Docker Hub makes it really easy to distribute images to anyone, anywhere. b) You can fine-tune namespaces with a configuration file. c) You can run apps that work in Windows on Linux and vice versa. d) You can change the process ID of applications that are already running.

a)

Which of these statements is true about the docker client? a) On the Mac, the Docker command-line client creates and runs containers in a small Linux-based virtual machine. b) On Windows 10 Anniversary Edition or later, the Docker command-line client creates and runs containers in a small, Linux-based virtual machine. c) On Mac and Windows, the Docker command-line client creates and runs containers natively without a virtual machine.

a)

Which of these statements is true regarding Helm chart metadata? a) all of these answers b) You can use a Helm chart's metadata to mark a chart as having been deprecated. c) Its appVersion and chartVersion properties must use semantic versioning. d) The name of the Helm chart is defined within a chart's metadata.

c)

Which of these three commands is docker run a combination of? a) - docker container create - docker container start - docker container inspect b) - docker container create - docker container start - docker ps c) - docker container create - docker container start - docker container attach d) - docker container create - docker ps - docker container attach

Podman

Which of these tools allows you to create non-root containers by default? Moby Podman Firecracker CRI

DaemonSet

Which option will work best to run containers that are agents? Job Deployment DaemonSet

containerd

Which runtime does Kubernetes use to create and manage its containers? containerd podman runc dockerd

c)

Which service or object is associated with Kubernetes persistent volumes? a) Amazon RDS b) stateless application c) statefulSet

c)

Which statement is true regarding Kubernetes? a) It is written in Java or C++. b) It originates in a Facebook system called Go. c) It is an open-source project. d) It is maintained by Google.

c)

Which statement is true regarding minikube? a) It is designed to run production clusters. b) It is as secure as a full Kubernetes installation. c) It is a free software.

d)

Why are phony targets important? a) They make it easier to see which Make rules are "external" and which are "internal." b) They make it easier to see which Make rules write files to your filesystem and which do not. c) They make it easier to see which Make rules were imported from other Makefiles and which were not. d) They allow Make rules to execute regardless of whether a file of the same name exists in your current working directory.

a)

Why must one modify /etc/hosts to test an Ingress locally when using the NGINX ingress controller? a) The NGINX ingress controller matches on the "host" provided within the Ingress. Consequently, connecting from "localhost" would not be accepted by the Ingress. b) This is an optional step and does not need to be performed. c) The NGINX ingress controller uses /etc/hosts to resolve record names within the Kubernetes cluster. d) It is faster to add the host of the Ingress rule being tested to /etc/hosts than creating a DNS record and waiting for it to propagate.

a)

Why would you want to mount a directory to your container? a) Because containers do not save data after they are deleted. b) So that your container can access the Internet using the host's network sockets. c) To improve disk IO performance. d) So that the container can create directories.

Service

You are creating a Pod inside of a new Kubernetes cluster. You want that Pod to be accessible from within the cluster, but not from the outside world. Which of these Kubernetes objects will achieve this? LoadBalancer Deployment Ingress Service

a)

You are helping a colleague learn Docker. They said that they created a Docker container from the nginx Docker image, but it does not show up after running docker ps. They confirmed that they could successfully pull the nginx image from Docker Hub. What is the most likely cause and solution for this problem? a) They created the container with docker container create but forgot to start it. Run docker container start to fix. b) The entrypoint for the nginx image they pulled is incorrect. Use dfimage to recreate and save its Dockerfile, change the entrypoint, and build a new image locally. c) They need to run docker pull to pull the nginx image first before running docker container create. d) They provided the wrong image to docker container create. Fix the image, then try again.

b)

You have upgraded your application to a new version, 1.0.1, and created an image for it called my-app. Which of these commands should you run to make it easy for others to find on the Docker Hub? a) docker tag my-app $DOCKER_HUB_USERNAME/my-app:latest b) docker tag my-app $DOCKER_HUB_USERNAME/my-app:v1.0.1 c) docker tag my-app my-app:latest d) docker tag my-app my-app:v1.0.1

c)

You have upgraded your application to a new version, 1.0.1, and created an image for it called my-app. You successfully pushed the image with docker push. Upon logging into Docker Hub, you notice that 1.0.1 is not there but 1.0.0 is. What is the most likely cause for this happening? a) You were temporarily offline while pushing 1.0.1 to Docker Hub. b) Docker Hub only allows you to store one tag per image at a time. You ran docker push c) $DOCKER_HUB_USERNAME/my-app:1.0.0 and forgot to run docker push $DOCKER_HUB_USERNAME/my-app:1.0.1.

Job

You need to run an application that performs a one-time extract, transform, load (ETL) operation that transfers data from a SQL database to a data warehouse. What is the best way to run these application pods? StatefulSet DaemonSet Job Deployment

d)

You started a container that ran a single command. That container has now exited. You would like to get the ID of this container for additional reporting. Which of these commands will successfully complete this task? a) docker ps b) docker inspect c) docker logs d) docker ps -a

b)

You're creating a website. Its Pod will be created through Deployment "my_deployment". What is the easiest way to test that is working locally inside of Kubernetes? a) Use docker run -p 8080:80 to create a container from the app's Docker image. Open a web browser. Visit localhost:8080. b) Use kubectl port-forward deployment/my_deployment 8080:80. Open a web browser. Visit localhost:8080. c) Install nginx and create a vhost pointing to your website. Open a web browser. Visit localhost/. d) Create a Service for your Deployment with port 80 mapped to port 80 on the app's Pods. Run kubectl port-forward service/my_service 8080:80. Open a web browser. Visit localhost:8080.

b)

You're not able to create more containers. Which of these commands will not help you reclaim enough space to create containers? a) docker system prune b) df -h / c) docker rmi nginx d) docker rmi -f $(docker images -f "dangling=true" -q)

c)

You've executed the following command: > curl --output foo.txt https://example.com/document.txt Which of these describes what happens next most accurately? a) document.txt will be written to document.txt, but only if https://example.com/document.txt does not contain any redirects. b) document.txt will be written to foo.txt c) document.txt will be written to foo.txt, but only if https://example.com/document.txt does not contain any redirects. d) document.txt will be written to document.txt

b)

Your co-worker is having issues getting Docker to work on their Mac. They tell you that whenever they try to use docker run, they get an error that looks like this: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? They told you that they installed Docker Desktop recently. What would you first look for while troubleshooting this issue? a) Open the "System Information" application to verify that their system has enough installed memory available. b) Check that the Docker whale is visible on their taskbar or system tray and that the boxes on top of it are NOT moving. c) Run the command env | grep DOCKER_HOST to confirm that the Docker CLI is configured properly. d) There might not be enough inodes to create Docker volumes. Run df -i to inspect available inodes.

b)

Your deployment YAML has the following configuration. What should your service YAML include so traffic is directed properly? metadata: labels: app: pod-info a) spec: selector: app: pod-service b) spec: selector: app: pod-info c) spec: selector: service: pod-info


Set pelajaran terkait

Anatomy In-Class Questions for Exam II

View Set

Essentials of Networking Modules 7, 8, 9

View Set