Kcna Kubernetes And Cloud Native Associate · Free Practice Question Medium
Question 25
You are tasked with deploying a containerized database application in your Kubernetes cluster that requires persistent storage. The database should be accessible from other services within the cluster but should not be exposed externally. What are the two most appropriate methods to accomplish this? (Select two)
-
A
Deploy the database using a DaemonSet.
-
B
Use a PersistentVolume and PersistentVolumeClaim with ReadWriteMany access.
-
C
Use an ExternalName service to link to an external database.
-
D
Use a PersistentVolume and PersistentVolumeClaim with ReadWriteOnce access.
-
E
Use a ClusterIP service to expose the database.
Reveal correct answers
Correct answers: D, E
A.
DaemonSets ensure that a copy of the application runs on each node in the cluster, which is generally not how databases are deployed.
B.
Databases generally don’t support multi-writer setups, so using ReadWriteMany would not be appropriate.
C.
This would not meet the requirement to deploy a containerized database within the cluster.
D.
Most databases require persistent storage and should be set with ReadWriteOnce access, allowing only a single node to write to the volume.
E.
ClusterIP is the default type of service in Kubernetes and is only accessible within the cluster, which fits the requirement of internal-only access.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
