wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Scheduling

Total questions: 26

Worksheet time: 13mins

Name
Class
Date
1.

You evicted all of the pods from the BFIRE node using command kubectl drain BFIRE. Also, during the maintenance operation, the node is left in the cluster. What command informs Kubernetes to carry on scheduling fresh pods on this nodes?

a)

kubectl cordon BFIRE

b)

kubectl drain

c)

kubectl drain-all

d)

kubectl uncordon BFIRE

2.

in terms of a multi-container Pod, what is a use case for an ambassador type container?

a)

Ambassador containers can extend the features of the main container, such as gathering connection details about other applications and allowing the main container access to these resources.

b)

Ambassador containers can create standardized container output, converting the output into an accepted format, allowing other container standardized access to these resources.

c)

Ambassador containers can create shared filesystems or volumes, allowing other containers in the Pod quick access to files and resources.

d)

Ambassador containers can create proxies or gateways to remote applications, which allows the main container to create network connections on localhost.

3.

Apart from the IP address associated with the service, what else does the output of kubectl logs contain when run on a client pod named "dns-frontend"?

a)

The metrics for each pod and its associated containers.

b)

The standard output pod information.

c)

The namespace

d)

The service name.

4.

Where does a sidecar container stream its application logs to?

a)

stdout

b)

log

c)

klog

d)

scarlog

5.

What does the node problem detector do?

a)

Acts as a firewall for all worker nodes in a cluster.

b)

Acts as a firewall for the main node in a cluster.

c)

Collects node problems from various sources and reports them to the API Server.

d)

Reports potential issues with worker nodes to the master node.

6.

Assume that you are applying RBAC's for a sub-admin on a Kubernetes deployment you administrate. The new admin only needs access to cluster resources and a few non-resource endpoints of your deployment. What role can you provide to the new admin?

a)

A ClusterReader

b)

A Role

c)

A ClusterRole

d)

A PodReader

7.

While deploying container in production, how can you make it easy to track the running image version while still rolling back images properly?

a)

By avoiding :latest tag.

b)

By equating ImagePullPolicy to Never.

c)

By including the :latest tag.

d)

By equating ImagePullPolicy to Always.

8.

You begin to notice strange behavior in a Pod that is running on a node. You believe that it's an issue with kubelet. How could you check if a node is down?

a)

Run the get nodes command and check if the status says Down.

b)

Run the get nodes command and check if the status says NotReady.

c)

Run the describe nodes command and check if the status says Down.

d)

Run the describe nodes command and check if the status says NotReady.

9.

You are implementing a sidecar container to collect log data at the Pod level and then transport that data to a destination. As your application grows larger, it is becoming cumbersome to configure every PodSpec. What method could you use that providers the same benefit without the drawbacks of configuring each Pod?

a)

ElasticSearch

b)

Pod-level logging

c)

Cluster-level logging

d)

A DaemonSet

10.

You have a Kubernetes cluster formed from three nodes and a Pod declaration with the following nodeAffinity. The Pod does not start every time on the node with label = value1. How can you fix this issue?

a)

Modify change nodeAffinity to NotIn.

b)

Increase the weight value to enforce rule execution and modify nodeAffinity operator to Exists.

c)

Set the weight value to 0 which change the overall affinity type to Required.

d)

Modify nodeAffinity type to requiredDuringSchedulingIgnoredDuringExecution.

11.

What is difference between node affinity and pod affinity?

a)

Node affinity allows you prioritize node selection with autoscaler while pod affinity allows you to prioritize Pod selection with autoscaler.

b)

Pod affinity allows you to choose which node a Pod can start on while node affinity allows you to choose which nodes a cluster can reside on.

c)

Node affinity allows you to constrain which nodes a Pod can run while pod affinity allows you specify rules about how Pods should be placed in relation to one another.

d)

Node affinity is used for clusters while Pod affinity is used on Pods.

12.

An enterprise migrating to Kubernetes. The enterprise uses a large amount of open-source software such as databases, logging, and monitoring alongside its own proprietary code. How should the enterprise deploy its software into the cluster?

a)

Describe the deployment in Terraform and deploy each of the applications as Docker containers. Update the container parameter each time a new deployment is required.

b)

Create Kubernetes resources that directly describe the open-source applications. Use existing setup instructions and adapt them for Kubernetes.

c)

Create HELM chart for its proprietary code and use existing charts to deploy open-source software. Create pipelines to automate the deployment of the enterprise's proprietary code. Use a Kubernetes Operator for Helm to pull and run charts.

d)

Create bash script using secrets encrypt using key. Run the scripts from a trusted local machine using a cluster of whitelisted IP addresses.

13.

You have two Pods, P1 (label=P1) and P2 (label=P2). The container from P1 interfere with container from P2 when they share the same node. How would you implement a rule that set a PodAntiAffinity?

a)
b)
c)
d)
14.

What is the main role of Prometheus?

a)

Monitoring Pods.

b)

Monitoring and alterting.

c)

Tracking metrics.

d)

Generating dashboards.

15.

Which method of influencing scheduling will ensure two Pods are coscheduled onto the same Node?

a)

nodeAffinity

b)

podAntiAffinity

c)

nodeSelector

d)

podAffinity

16.

Which method of influencing scheduling enables an administrator to influence scheduling without depending on the user?

a)

Taints and Tolerations

b)

nodeSelector

c)

podAffinity

d)

podSelector

17.

Which part of Pod Object is updated when scheduling decision made?

a)

nodeName

b)

scheduledNodeName

c)

name

d)

targetName

18.

Which method of influencing scheduling uses only matchLabels when scheduling Pods to Nodes?

a)

nodeSelector

b)

nodeAffinity

c)

Affinity

d)

podSelector

19.

What is default scheduler in Kubernetes?

a)

custom-scheduler

b)

kube-scheduler

c)

default-scheduler

d)

kube-default

20.

What is the primary design goal for using multi-container Pods?

a)

Scaling stateful containers.

b)

Scaling stateless containers.

c)

More flexible recovery options when restarting Pods.

d)

Tightly coupled applications.

21.

What is the primary way in Kubernetes to execute a command on a grouping of resources based on a using a selector?

a)

Querying

b)

Namespaces

c)

Annotations

d)

Labels

22.

If you need to assign workload to a subset of nodes in your cluster, what method would you choose so that you are not dependent on the Node names in the cluster?

a)

Annotate the nodes and use a hardwareSelector in your Pod Spec.

b)

This is not possible in Kubernetes due to it's declarative model for deployments.

c)

Label the nodes and use a nodeSelector in your Pod Spec.

d)

Annotate the nodes and use a namespace in your Pod Spec.

23.

Which type of container probe will restart your container on probe failure?

a)

livenessProbe

b)

SIGTERM

c)

SIGKILL

d)

readinessProbe

24.

In the context of Kubernetes, what would be the status of our pod when your pod has been bound to a particular node and all container within your node have been started up?

a)

Running

b)

Pending

c)

Unknown

d)

Succeeded

25.

If you don't want a service to run, but you don't want to remove it, what's the safest thing to do?

a)

Scale it to zero.

b)

Manually mark it pending.

c)

Add constraints that aren't fulfilled.

26.

What is the name of a popular open source package manager for Kubernetes?

a)

ETCD

b)

Helm

c)

Istio

d)

Draft