# Uiam ## Rozwiązanie problemu z pvc i pv ```bash= Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 3m20s default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. Warning FailedScheduling 2m8s default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. ``` ```bash= Warning: resource persistentvolumeclaims/prosody-data-myjitsi-prosody-0 is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. The PersistentVolumeClaim &quot;prosody-data-myjitsi-prosody-0&quot; is invalid: spec: Forbidden: spec is immutable after creation except resources.requests for bound claims ``` Pomogło dodanie nodeaffinity ```nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node_name``` ```bash= Warning FailedScheduling 5m36s default-scheduler 0/1 nodes are available: 1 persistentvolumeclaim "prosody-data-myjitsi-prosody-0" not found. Warning FailedScheduling 5m1s default-scheduler 0/1 nodes are available: 1 persistentvolumeclaim "prosody-data-myjitsi-prosody-0" not found. Warning FailedScheduling 14m default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. Warning FailedScheduling 3m36s default-scheduler 0/1 nodes are available: 1 node(s) didn't find available persistent volumes to bind. ``` pomogło ustawienie dostępu ReadOnlyOnce w pv i pvc Dodana została również local StorageClass ```bash= apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: local-storage provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer ``` ```bash= 50s Warning FailedScheduling pod/myjitsi-prosody-0 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims. 10s Warning FailedScheduling pod/myjitsi-prosody-0 0/1 nodes are available: 1 persistentvolumeclaim "prosody-data-myjitsi-prosody-0" is being deleted. 10s Warning VolumeMismatch persistentvolumeclaim/prosody-data-myjitsi-prosody-0 Cannot bind to requested volume "prosody-data": incompatible accessMode 0s Normal Scheduled pod/myjitsi-prosody-0 Successfully assigned default/myjitsi-prosody-0 to oskar-latitude-e5470 ``` pomogło dodanie ``` volumeName: prosody-data``` do pvc ## stan obecny ```NAME READY STATUS RESTARTS AGE pod/myjitsi-prosody-0 1/1 Running 1 (59m ago) 3h12m pod/myjitsi-jitsi-meet-jicofo-65cff94d57-5qrsh 1/1 Running 1 (59m ago) 3h12m pod/myjitsi-jitsi-meet-web-6b8c7794cc-d8w8g 1/1 Running 2 (58m ago) 3h12m pod/myjitsi-jitsi-meet-jvb-57c567d5d7-4vfq6 1/1 Running 3 (58m ago) 3h12m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 3h18m service/myjitsi-jitsi-meet-web ClusterIP 10.152.183.251 <none> 80/TCP 3h12m service/myjitsi-prosody ClusterIP 10.152.183.140 <none> 5280/TCP,5281/TCP,5347/TCP,5222/TCP,5269/TCP 3h12m NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/myjitsi-jitsi-meet-jicofo 1/1 1 1 3h12m deployment.apps/myjitsi-jitsi-meet-web 1/1 1 1 3h12m deployment.apps/myjitsi-jitsi-meet-jvb 1/1 1 1 3h12m NAME DESIRED CURRENT READY AGE replicaset.apps/myjitsi-jitsi-meet-jicofo-65cff94d57 1 1 1 3h12m replicaset.apps/myjitsi-jitsi-meet-web-6b8c7794cc 1 1 1 3h12m replicaset.apps/myjitsi-jitsi-meet-jvb-57c567d5d7 1 1 1 3h12m NAME READY AGE statefulset.apps/myjitsi-prosody 1/1 3h12m ``` ``` NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE local-storage kubernetes.io/no-provisioner Delete WaitForFirstConsumer false 145m ``` ``` NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE prosody-data-myjitsi-prosody-0 Bound prosody-data 10Gi RWO local-storage 81 ``` ``` NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE prosody-data 10Gi RWO Retain Bound default/prosody-data-myjitsi-prosody-0 local-storage 131m ``` Występujący problem Zdjęcie Strona zdjęcia