Kubernetes

Kubernetes Practice Test

0%

In Kubernetes, which of the following key value stores is used as the backup store for all cluster data?

Correct! Wrong!

Explanation:
What is etcd? etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network partitions and can tolerate machine failure, even in the leader node.

In Kubernetes, which of the following watches for newly formed pods with no node assigned and selects a node for them to run on?

Correct! Wrong!

Explanation:
Kube-scheduler is the default scheduler for Kubernetes and runs as part of the control plane. kube- scheduler is designed so that, if you want and need to, you can write your own scheduling component and use that instead. For every newly created pod or other unscheduled pods, kube—scheduler selects an optimal node forthem to run on.

In Kubernetes, for example, which components make global decisions about the cluster?

Correct! Wrong!

Explanation:
Master components provide the cluster’s control plane. Master components make global decisions about the cluster (for example, scheduling), and detecting and responding to cluster events (starting up a new pod when a replication controller’s ‘replicas’ field is unsatisfied).

In Kubernetes, which phase of the Pod refers to the Pod being bound to a node and all of the Containers being created?

Correct! Wrong!

Explanation:
Running: Pod has been bound to a node, and all of the containers have been created.

In Kubernetes, which of the following runs controllers?

Correct! Wrong!

Explanation:
Kubernetes comes with a set of built-in controllers that run insidethe kube-controller-manager. Thesebuilt-in controllers provide important core behaviors. The Deployment controller and Job controller are examples of controllers thatcome as part of Kubernetes itself ("built-in" controllers).

In Kubernetes, which of the following is an agent that runs on each node in the cluster?

Correct! Wrong!

Explanation:
Correct Answer None of the above The kubelet component is an agent that runs on every worker node of the cluster. It is responsible for managing all containers running in every pod in the cluster. it does this by ensuring that the current state of containers in a pod matches the spec for that pod stored in etcd.

In Kubernetes, what does a Label mean?

Correct! Wrong!

Explanation:
Labels in Kubernetes are intended to be used to specify identifying attributes of objects that are meaningful and relevant to users but are not used by the Kubernetes itself. Labels are fundamental qualities of the object that will be used for grouping, viewing, and operating. Each object can have a set of key/value labels defined.

In Kubernetes, which node condition with the value True indicates that the node is healthy and ready to accept pods?

Correct! Wrong!

Explanation:
The kubelet uses readiness probes to know when a container is ready to start accepting traffic. A Pod is considered ready when all of its containers are ready. One use of this signal is to control which Pods are used as backends for Services. When a Pod is not ready, it is removed from Service load balancers.

What is at least included in a Kubernetes cluster?

Correct! Wrong!

Explanation:
Each node has at least one Kubelet, an agent that ensures the described containers are running in the pod on a cluster. Control plane: The orchestration layer that exposes the API you use to manage your containers, pods, and nodes.

In Kubernetes, which of the following is the front end for the Kubernetes control plane?

Correct! Wrong!

Explanation:
The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.

In Kubernetes, fractional requests are used to allocate CPU resources are

Correct! Wrong!

Explanation:
Limits and requests for CPU resources are measured in cpu units. One cpu, in Kubernetes, is equivalent to 1 vCPU/Core for cloud providers and 1 hyperthread on bare-metal Intel processors. Fractional requests are ALLOWED. A Container with spec.containers [].resources.requests.cpu of 0.5 is guaranteed half as much CPU as one that asks for 1 CPU.

To update API objects in place, which kubectl command is used?

Correct! Wrong!

Explanation:
You can use kubectl patch to update API objects in place. This command supports JSON patch, JSON merge patch, and strategic merge patch. See Update API Objects in Place Using kubectl patch and kubectl patch.

Limits and requests for memory in Kubernetes are expressed in

Correct! Wrong!

Explanation:
Limits and requests for memory are measured in bytes. You can express memory as a plain integer or as a fixed—point number using one of these suffixes: E, P, T, G, M, k. You can also use the power-of—two equivalents:

Which logging agents are included in the Kubernetes distribution?

Correct! Wrong!

Explanation:
Kubernetes doesn't specify a logging agent, but two optional logging agents are packaged with the Kubernetes release: Stackdriver Logging for use with Google Cloud Platform, and Elasticsearch. You can find more information and instructions in the dedicated documents. Both use fluentd with custom configuration as an agent on the node.

Choose a node component that doesn't manage containers that aren't Kubernetes-created.

Correct! Wrong!

Explanation:
Kubelet is an agent or program which runs on each node. This is responsible for all the communications between the Kubernetes control plane [group of programs which control kubernetes] and the nodes where the actual workload runs.

Which of the following tools is capable of inspecting and managing Kubernetes cluster resources?

Correct! Wrong!

Explanation:
Kubectl controls the Kubernetes Cluster. It is one of the key components of Kubernetes which runs on the workstation on any machine when the setup is done. It has the capability to manage the nodes in the cluster.

Choose the Kubernetes controller that is in charge of ensuring that every replication controller object in the system has the correct amount of pods.

Correct! Wrong!

Explanation:
Replication Controller is one of the key features of Kubernetes, which is responsible for managing the pod lifecycle. It is responsible for making sure that the specified number of pod replicas are running at any point of time.

If you're using kubectl to create a Kubernetes object, choose the field in the.yaml file that contains data that helps to uniquely identify the object, such as a name string, UID, and optional namespace.

Correct! Wrong!

Explanation:
metadata - Data that helps uniquely identify the object, including a name string, UID, and optional namespace spec - What state you desire for the object The precise format of the object spec is different for every Kubernetes object, and contains nested fields specific to that object.

What is a tool that hosts a single-node Kubernetes cluster on your personal computer as a virtual machine?

Correct! Wrong!

Explanation:
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

If an operating system packet filtering layer exists and is available, select the Kubernetes node component that uses it.

Correct! Wrong!

Explanation:
Kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept. kube-proxy maintains network rules on nodes.

What is the Kubernetes control plane's front end?

Correct! Wrong!

Explanation:
The API server is the front end for the Kubernetes control plane. The main implementation of a Kubernetes API server is kube-apiserver. kube-apiserver is designed to scale horizontally—that is, it scales by deploying more instances.

If you're using kubectl to create a Kubernetes object, select the field in the.yaml file that stores the version of the Kubernetes API you're using.

Correct! Wrong!

Explanation:
An object definition in Kubernetes requires an apiVersion field. When Kubernetes has a release that updates what is available for you to use—changes something in its API—a new apiVersion is created. However, the official Kubernetes documentation provides little guidance on apiVersion.

The contents of a Kubernetes Pod always run in

Correct! Wrong!

Explanation:
The correct answer is shared context

When a Kubernetes Container is created, it has access to a list of all services that were operating as

Correct! Wrong!

Explanation:
To set environment variables, include the env or envFrom field in the configuration file. In this exercise, you create a Pod that runs one container. The configuration file for the Pod defines an environment variable with name DEMO_GREETING and value "Hello from the environment".

Which Kubernetes controller is in charge of noticing and responding to nodes going down?

Correct! Wrong!

Explanation:
Node controller: Responsible for noticing and responding when nodes go down.