A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created2.
Some typical uses of a DaemonSet are: running a cluster storage daemon on every node, running a logs collection daemon on every node, running a node monitoring daemon on every node2.
DaemonSets are ideal in a variety of real-world use cases: Running Node monitoring agents, Running log collection agents, Running network plugins, Running service meshes3.
References:
Kubernetes DaemonSet - What It is & How to Use It (Example)
DaemonSet | Kubernetes
Kubernetes Daemonset: A Practical Guide - Spot.io
Question # 5
What must you do to pull a container image from a private registry? Note: There are 2 correct Answers to this question.
A.
Create a secret with the type "kubernetes.io/docker configjson".
B.
Provide credentials in the pod manifest via image Pull Secrets" in "spec template metadata annotations"
C.
Create a secret with the type "Opaque"
D.
Provide credentials in the pod manifest via "image Pull Secrets" in spec. template. spec.
To pull a container image from a private registry, you need to create a secret with the type “kubernetes.io/dockerconfigjson†and provide the credentials in the pod manifest via “imagePullSecrets†in spec.template.spec. This way, the kubelet can use the secret to authenticate with the private registry and pull the image. The secret type “Opaque†is not suitable for this purpose, as it is a generic type that can store any data. The pod manifest does not support providing credentials via “imagePullSecrets†in spec.template.metadata.annotations, as this is not a valid field. References: Side-by-Side Extensibility Based on SAP BTP, Kyma Runtime - Unit 3 - Lesson 2: Using Secrets, [Kubernetes Documentation - Pull an Image from a Private Registry]
Question # 6
Which proxy pattern is used by the service mesh solution in SAP BTP, Kyma runtime?
 The service mesh solution in SAP BTP, Kyma runtime is based on Istio, which is one of the most popular service mesh solutions. Istio uses the Sidecar proxy pattern, which means that a proxy is deployed as a sidecar container next to each service. This way, the proxy can intercept and manage the traffic between the services, without requiring any changes in the application code. The proxy also communicates with the Istio control plane, whichprovides configuration and policies for the service mesh. The other options are not valid proxy patterns for the service mesh solution in SAP BTP, Kyma runtime. References: Discovering the Service Mesh - SAP Learning, Istio Documentation - What is Istio?
Question # 7
Which kubectl command lists pods with the exact label "env-dev"?
 The kubectl command to list pods with the exact label “env-dev†is kubectl get pods -l env=dev. The -l or --selector flag allows you to filter pods by label selectors, which are key-value pairs that are attached to pods. The = operator matches pods that have the exact label value specified. The -L or --label-columns flag adds a column with the value of the specified label(s) to the output, but does not filter the pods. The -I or --ignore-not-found flag returns an exit code of 0 when no resources are found, but does not affect the output. The -l env-dev flag is invalid, as it does not specify a label value. References: 6, 7, 9
Question # 8
Which workload type is used to create time-based jobs?
 A CronJob is a workload type that creates Jobs on a repeating schedule, based on the Cron syntax. A Job is a workload type that runs a task to completion, just once. A Deployment is a workload type that manages a set of Pods that are created from the same template. A StatefulSet is a workload type that manages a set of Pods that have stable identities and persistent storage. References: CronJob, Jobs, Workloads.