NEW
Font size
WorksheetsScheduling
Total questions: 26
Worksheet time: 13mins
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?
kubectl cordon BFIRE
kubectl drain
kubectl drain-all
kubectl uncordon BFIRE
in terms of a multi-container Pod, what is a use case for an ambassador type container?
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.
Ambassador containers can create standardized container output, converting the output into an accepted format, allowing other container standardized access to these resources.
Ambassador containers can create shared filesystems or volumes, allowing other containers in the Pod quick access to files and resources.
Ambassador containers can create proxies or gateways to remote applications, which allows the main container to create network connections on localhost.
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"?
The metrics for each pod and its associated containers.
The standard output pod information.
The namespace
The service name.
Where does a sidecar container stream its application logs to?
stdout
log
klog
scarlog
What does the node problem detector do?
Acts as a firewall for all worker nodes in a cluster.
Acts as a firewall for the main node in a cluster.
Collects node problems from various sources and reports them to the API Server.
Reports potential issues with worker nodes to the master node.
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 ClusterReader
A Role
A ClusterRole
A PodReader
While deploying container in production, how can you make it easy to track the running image version while still rolling back images properly?
By avoiding :latest tag.
By equating ImagePullPolicy to Never.
By including the :latest tag.
By equating ImagePullPolicy to Always.
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?
Run the get nodes command and check if the status says Down.
Run the get nodes command and check if the status says NotReady.
Run the describe nodes command and check if the status says Down.
Run the describe nodes command and check if the status says NotReady.
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?
ElasticSearch
Pod-level logging
Cluster-level logging
A DaemonSet
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?
Modify change nodeAffinity to NotIn.
Increase the weight value to enforce rule execution and modify nodeAffinity operator to Exists.
Set the weight value to 0 which change the overall affinity type to Required.
Modify nodeAffinity type to requiredDuringSchedulingIgnoredDuringExecution.
What is difference between node affinity and pod affinity?
Node affinity allows you prioritize node selection with autoscaler while pod affinity allows you to prioritize Pod selection with autoscaler.
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.
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.
Node affinity is used for clusters while Pod affinity is used on Pods.
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?
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.
Create Kubernetes resources that directly describe the open-source applications. Use existing setup instructions and adapt them for Kubernetes.
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.
Create bash script using secrets encrypt using key. Run the scripts from a trusted local machine using a cluster of whitelisted IP addresses.
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?
What is the main role of Prometheus?
Monitoring Pods.
Monitoring and alterting.
Tracking metrics.
Generating dashboards.
Which method of influencing scheduling will ensure two Pods are coscheduled onto the same Node?
nodeAffinity
podAntiAffinity
nodeSelector
podAffinity
Which method of influencing scheduling enables an administrator to influence scheduling without depending on the user?
Taints and Tolerations
nodeSelector
podAffinity
podSelector
Which part of Pod Object is updated when scheduling decision made?
nodeName
scheduledNodeName
name
targetName
Which method of influencing scheduling uses only matchLabels when scheduling Pods to Nodes?
nodeSelector
nodeAffinity
Affinity
podSelector
What is default scheduler in Kubernetes?
custom-scheduler
kube-scheduler
default-scheduler
kube-default
What is the primary design goal for using multi-container Pods?
Scaling stateful containers.
Scaling stateless containers.
More flexible recovery options when restarting Pods.
Tightly coupled applications.
What is the primary way in Kubernetes to execute a command on a grouping of resources based on a using a selector?
Querying
Namespaces
Annotations
Labels
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?
Annotate the nodes and use a hardwareSelector in your Pod Spec.
This is not possible in Kubernetes due to it's declarative model for deployments.
Label the nodes and use a nodeSelector in your Pod Spec.
Annotate the nodes and use a namespace in your Pod Spec.
Which type of container probe will restart your container on probe failure?
livenessProbe
SIGTERM
SIGKILL
readinessProbe
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?
Running
Pending
Unknown
Succeeded
If you don't want a service to run, but you don't want to remove it, what's the safest thing to do?
Scale it to zero.
Manually mark it pending.
Add constraints that aren't fulfilled.
What is the name of a popular open source package manager for Kubernetes?
ETCD
Helm
Istio
Draft
