Show answerHide answer
Correct answer: C There is no default StorageClass. Storage classes should be reviewed, and only one should be set as default.
Explanation
ExplanationThe problem is specifically with persistent volume (PV) provisioning in an Amazon EKS cluster that is being attached to NKP. In Kubernetes, when a PersistentVolumeClaim (PVC) is created without specifying a storageClassName, the cluster's default StorageClass is used to dynamically provision the volume.
Why Option C is Correct:
A common issue, especially with attached clusters like EKS, is the absence of a defined default StorageClass. If no StorageClass is marked as default, any PVC that does not explicitly name a StorageClass will fail to be provisioned, leading to the described errors. The solution is for the engineer to:
Review StorageClasses:
Run kubectl get storageclass to see the available classes.
Check for a Default:
Look for a StorageClass with the (default) annotation.
Set a Default:
If none exists, set one using kubectl patch storageclass
Why the Other Options are Incorrect:
A. The storage appliance is having issues...
This is too vague and unlikely for an Amazon EKS cluster. The "storage appliance" in EKS is the managed AWS cloud storage service (like EBS), which is highly reliable. The problem is almost certainly a configuration issue within the Kubernetes cluster itself, not a widespread outage of the underlying AWS service.
B. There is no compatible storage to be attached...
This is incorrect. EKS clusters have native access to AWS storage solutions like Elastic Block Store (EBS) through the EBS CSI driver. The compatible storage exists; the issue is the Kubernetes mechanism for automatically provisioning it (the default StorageClass) is not configured.
D. There could be a misconfiguration in the ConfigMap...
While a misconfiguration in a critical component (like the CSI driver's ConfigMap) could cause issues, the most common and fundamental reason for generic PV deployment failures on a newly attached cluster, especially EKS, is the absence of a default StorageClass. This is the first thing an engineer should check.
Reference / Key Concept
This question tests the understanding of dynamic persistent volume provisioning in Kubernetes and a common configuration pitfall when attaching external clusters.
StorageClass:
Defines a "class" of storage (e.g., "fast SSD," "slow HDD") and the provisioner to use.
Default StorageClass:
A crucial convenience feature. When a PVC is created without a storageClassName, the cluster's default StorageClass is used. If it doesn't exist, the PVC will remain unbound indefinitely.
EKS Specifics:
When creating an EKS cluster, the Amazon EBS CSI driver is often installed as an add-on, which provides the gp2 or gp3 StorageClass. However, it may not be set as the default, or the default might have been removed. This is a standard troubleshooting step for PV issues in EKS.
Therefore, the most likely cause and first action for the engineer is to verify and configure a default StorageClass.