apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: <http:// . . .

Héctor Tornos:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration: |
{“apiVersion”:“v1”,“kind”:“PersistentVolumeClaim”,“metadata”:{“annotations”:{},“name”:“local-pvc”,“namespace”:“default”},“spec”:{“accessModes”:[“ReadWriteOnce”],“resources”:{“requests”:{“storage”:“500Mi”}},“storageClassName”:“local-storage”,“volumeMode”:“Filesystem”}}
creationTimestamp: “2021-08-25T08:06:38Z”
finalizers:


apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration: |
{“apiVersion”:“v1”,“kind”:“PersistentVolumeClaim”,“metadata”:{“annotations”:{},“name”:“local-pvc”,“namespace”:“default”},“spec”:{“accessModes”:[“ReadWriteOnce”],“resources”:{“requests”:{“storage”:“500Mi”}},“storageClassName”:“local-storage”,“volumeMode”:“Filesystem”}}
creationTimestamp: “2021-08-25T08:06:38Z”
finalizers:


apiVersion: http://storage.k8s.io/v1|storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration: |
{“apiVersion”:“http://storage.k8s.io/v1|storage.k8s.io/v1”,“kind”:“StorageClass”,“metadata”:{“annotations”:{},“name”:“local-storage”},“provisioner”:“http://kubernetes.io/no-provisioner|kubernetes.io/no-provisioner”,“volumeBindingMode”:“WaitForFirstConsumer”}
creationTimestamp: “2021-08-25T07:53:21Z”
managedFields:


apiVersion: v1
kind: Pod
metadata:
annotations:
http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration: |
{“apiVersion”:“v1”,“kind”:“Pod”,“metadata”:{“annotations”:{},“creationTimestamp”:null,“labels”:{“run”:“nginx”},“name”:“nginx”,“namespace”:“default”},“spec”:{“containers”:[{“image”:“nginx:alpine”,“name”:“nginx”,“resources”:{},“volumeMounts”:[{“mountPath”:“/var/www/html”,“name”:“local-persistent-storage”}]}],“dnsPolicy”:“ClusterFirst”,“restartPolicy”:“Always”,“volumes”:[{“name”:“local-persistent-storage”,“persistentVolumeClaim”:{“claimName”:“local-pvc”}}]},“status”:{}}
creationTimestamp: “2021-08-25T08:12:32Z”
labels:
run: nginx
managedFields:
manager: kubectl-client-side-apply
operation: Update
time: “2021-08-25T08:12:32Z”
name: nginx
namespace: default
resourceVersion: “2203”
uid: 11829141-f5d8-46d2-aa3b-0cbe32998e77
spec:
containers:

  • image: nginx:alpine
    imagePullPolicy: IfNotPresent
    name: nginx
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    • mountPath: /var/www/html
      name: local-persistent-storage
    • mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-7nnpw
      readOnly: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      preemptionPolicy: PreemptLowerPriority
      priority: 0
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: default
      serviceAccountName: default
      terminationGracePeriodSeconds: 30
      tolerations:
  • effect: NoExecute
    key: http://node.kubernetes.io/not-ready|node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  • effect: NoExecute
    key: http://node.kubernetes.io/unreachable|node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
    volumes:
  • name: local-persistent-storage
    persistentVolumeClaim:
    claimName: local-pvc
  • name: default-token-7nnpw
    secret:
    defaultMode: 420
    secretName: default-token-7nnpw
    status:
    conditions:
  • lastProbeTime: null
    lastTransitionTime: “2021-08-25T08:12:32Z”
    message: ‘0/1 nodes are available: 1 node(s) didn’‘t find available persistent
    volumes to bind.’
    reason: Unschedulable
    status: “False”
    type: PodScheduled
    phase: Pending
    qosClass: BestEffort

unnivkn:

unnivkn:

Héctor Tornos:
U used my config files? I dont get it, why is not working for me?

Héctor Tornos:
Thanx by the way

unnivkn:
I haven’t used yours… I created my own, which you can see above

Héctor Tornos:
Okey, im comparing it to locate any difference…but no luck, look the same for me

Héctor Tornos:
I will probably repeat the lab from the first question

Héctor Tornos:
Storage Class and PV are provided by the lab, right? So is only necessary to create both pod and pvc.