EKS集群中立即索赔卷的节点未绑定



我创建了一个有6个节点的EKS集群。在每个节点中使用启动模板附加EFS文件系统,并在文件系统中创建一个文件,该文件也可从所有工作节点访问。通过SSH i检查此操作

但是当我在几周内安装了csi驱动程序和存储类创建后,试图用动态pvc声明创建一个测试应用程序pod时,集群告诉我,

PVC豆荚:

Normal  ExternalProvisioning    2 hours persistentvolume-controller waiting for a volume to be created, either by external provisioner "efs.csi.aws.com" or manually created by system administrator

应用Pod:

FailedScheduling    2 hours default-scheduler   0/6 nodes are available: 6 pod has unbound immediate PersistentVolumeClaims.

我怎么能解决这个问题从周....?请给我一些指导。我被困在这里快一个月了。

PVC描述:

{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "efs-claim",
"namespace": "default",
"uid": "bb7d1d08-f14b-4435-90e2-42255a915e23",
"resourceVersion": "9805",
"creationTimestamp": "2022-07-18T03:50:14Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"efs-claim","namespace":"default"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"5Gi"}},"storageClassName":"eks-sc-efs"}}n",
"volume.beta.kubernetes.io/storage-provisioner": "efs.csi.aws.com"
},
"finalizers": [
"kubernetes.io/pvc-protection"
],
"managedFields": [
{
"manager": "kube-controller-manager",
"operation": "Update",
"apiVersion": "v1",
"time": "2022-07-18T03:50:14Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
"f:volume.beta.kubernetes.io/storage-provisioner": {}
}
}
}
},
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "v1",
"time": "2022-07-18T03:50:14Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:kubectl.kubernetes.io/last-applied-configuration": {}
}
},
"f:spec": {
"f:accessModes": {},
"f:resources": {
"f:requests": {
".": {},
"f:storage": {}
}
},
"f:storageClassName": {},
"f:volumeMode": {}
}
}
}
]
},
"spec": {
"accessModes": [
"ReadWriteMany"
],
"resources": {
"requests": {
"storage": "5Gi"
}
},
"storageClassName": "eks-sc-efs",
"volumeMode": "Filesystem"
},
"status": {
"phase": "Pending"
}
}

荚描述:

{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "efs-app",
"namespace": "default",
"uid": "de410588-0fe4-4ea8-bb48-fe1fdbda30a0",
"resourceVersion": "9809",
"creationTimestamp": "2022-07-18T03:50:14Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"efs-app","namespace":"default"},"spec":{"containers":[{"args":["-c","while true; do echo $(date -u) \u003e\u003e /data/out; sleep 5; done"],"command":["/bin/sh"],"image":"centos","name":"app","volumeMounts":[{"mountPath":"/efs","name":"persistent-storage"}]}],"volumes":[{"name":"persistent-storage","persistentVolumeClaim":{"claimName":"efs-claim"}}]}}n",
"kubernetes.io/psp": "eks.privileged"
},
"managedFields": [
{
"manager": "kube-scheduler",
"operation": "Update",
"apiVersion": "v1",
"time": "2022-07-18T03:50:14Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:status": {
"f:conditions": {
".": {},
"k:{"type":"PodScheduled"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:message": {},
"f:reason": {},
"f:status": {},
"f:type": {}
}
}
}
}
},
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "v1",
"time": "2022-07-18T03:50:14Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:kubectl.kubernetes.io/last-applied-configuration": {}
}
},
"f:spec": {
"f:containers": {
"k:{"name":"app"}": {
".": {},
"f:args": {},
"f:command": {},
"f:image": {},
"f:imagePullPolicy": {},
"f:name": {},
"f:resources": {},
"f:terminationMessagePath": {},
"f:terminationMessagePolicy": {},
"f:volumeMounts": {
".": {},
"k:{"mountPath":"/efs"}": {
".": {},
"f:mountPath": {},
"f:name": {}
}
}
}
},
"f:dnsPolicy": {},
"f:enableServiceLinks": {},
"f:restartPolicy": {},
"f:schedulerName": {},
"f:securityContext": {},
"f:terminationGracePeriodSeconds": {},
"f:volumes": {
".": {},
"k:{"name":"persistent-storage"}": {
".": {},
"f:name": {},
"f:persistentVolumeClaim": {
".": {},
"f:claimName": {}
}
}
}
}
}
}
]
},
"spec": {
"volumes": [
{
"name": "persistent-storage",
"persistentVolumeClaim": {
"claimName": "efs-claim"
}
},
{
"name": "kube-api-access-ppzjw",
"projected": {
"sources": [
{
"serviceAccountToken": {
"expirationSeconds": 3607,
"path": "token"
}
},
{
"configMap": {
"name": "kube-root-ca.crt",
"items": [
{
"key": "ca.crt",
"path": "ca.crt"
}
]
}
},
{
"downwardAPI": {
"items": [
{
"path": "namespace",
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "metadata.namespace"
}
}
]
}
}
],
"defaultMode": 420
}
}
],
"containers": [
{
"name": "app",
"image": "centos",
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo $(date -u) >> /data/out; sleep 5; done"
],
"resources": {},
"volumeMounts": [
{
"name": "persistent-storage",
"mountPath": "/efs"
},
{
"name": "kube-api-access-ppzjw",
"readOnly": true,
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount"
}
],
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "Always"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"serviceAccountName": "default",
"serviceAccount": "default",
"securityContext": {},
"schedulerName": "default-scheduler",
"tolerations": [
{
"key": "node.kubernetes.io/not-ready",
"operator": "Exists",
"effect": "NoExecute",
"tolerationSeconds": 300
},
{
"key": "node.kubernetes.io/unreachable",
"operator": "Exists",
"effect": "NoExecute",
"tolerationSeconds": 300
}
],
"priority": 0,
"enableServiceLinks": true,
"preemptionPolicy": "PreemptLowerPriority"
},
"status": {
"phase": "Pending",
"conditions": [
{
"type": "PodScheduled",
"status": "False",
"lastProbeTime": null,
"lastTransitionTime": "2022-07-18T03:50:14Z",
"reason": "Unschedulable",
"message": "0/6 nodes are available: 6 pod has unbound immediate PersistentVolumeClaims."
}
],
"qosClass": "BestEffort"
}
}

存储类描述:

{
"kind": "StorageClass",
"apiVersion": "storage.k8s.io/v1",
"metadata": {
"name": "eks-sc-efs",
"uid": "9ea3d917-ef15-4863-ae62-e0de929c3134",
"resourceVersion": "2756",
"creationTimestamp": "2022-07-18T03:35:09Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{"allowVolumeExpansion":true,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"eks-sc-efs"},"mountOptions":["tls"],"parameters":{"basePath":"/","directoryPerms":"700","fileSystemId":"fs-0c8427977faa4865c","gidRangeEnd":"2000","gidRangeStart":"1000","provisioningMode":"efs-ap"},"provisioner":"efs.csi.aws.com"}n"
},
"managedFields": [
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "storage.k8s.io/v1",
"time": "2022-07-18T03:35:09Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:allowVolumeExpansion": {},
"f:metadata": {
"f:annotations": {
".": {},
"f:kubectl.kubernetes.io/last-applied-configuration": {}
}
},
"f:mountOptions": {},
"f:parameters": {
".": {},
"f:basePath": {},
"f:directoryPerms": {},
"f:fileSystemId": {},
"f:gidRangeEnd": {},
"f:gidRangeStart": {},
"f:provisioningMode": {}
},
"f:provisioner": {},
"f:reclaimPolicy": {},
"f:volumeBindingMode": {}
}
}
]
},
"provisioner": "efs.csi.aws.com",
"parameters": {
"basePath": "/",
"directoryPerms": "700",
"fileSystemId": "fs-*******4865c",
"gidRangeEnd": "2000",
"gidRangeStart": "1000",
"provisioningMode": "efs-ap"
},
"reclaimPolicy": "Delete",
"mountOptions": [
"tls"
],
"allowVolumeExpansion": true,
"volumeBindingMode": "Immediate"
}

根据待处理的PVC状态,没有能够创建卷的提供程序。你试过创建一个持久化卷吗?

apiVersion: v1
kind: PersistentVolume
metadata:
name: test-volume
spec:
storageClassName: eks-sc-efs
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce

描述对象并查看是否存在其他错误。另外,请确保安装了CSI驱动程序。我从AWS EKS中找到了这个文档https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html

最新更新