Kubernetes PVC with ReadWriteMany on AWS

Using EFS without automatic provisioning The EFS provisioner may be beta, but EFS itself is not. Since EFS volumes can be mounted via NFS, you can simply create a PersistentVolume with a NFS volume source manually — assuming that automatic provisioning is not a hard requirement on your side: apiVersion: v1 kind: PersistentVolume metadata: name: … Read more

WaitForFirstConsumer PersistentVolumeClaim waiting for first consumer to be created before binding

The app is waiting for the Pod, while the Pod is waiting for a PersistentVolume by a PersistentVolumeClaim. However, the PersistentVolume should be prepared by the user before using. My previous YAMLs are lack of a PersistentVolume like this: kind: PersistentVolume apiVersion: v1 metadata: name: postgres-data labels: type: local spec: storageClassName: local-storage capacity: storage: 1Gi … Read more

Kubernetes: Is it possible to mount volumes to a container running as a CronJob?

A CronJob uses a PodTemplate as everything else based on Pods and can use Volumes. You placed your Volume specification directly in the CronJobSpec instead of the PodSpec, use it like this: apiVersion: batch/v1beta1 kind: CronJob metadata: name: update-db spec: schedule: “*/1 * * * *” jobTemplate: spec: template: spec: containers: – name: update-fingerprints image: … Read more

Kubernetes Persistent Volume Access Modes: ReadWriteOnce vs ReadOnlyMany vs ReadWriteMany

You should use ReadWriteX when you plan to have Pods that will need to write to the volume, and not only read data from the volume. You should use XMany when you want the ability for Pods to access the given volume while those workloads are running on different nodes in the Kubernetes cluster. These … Read more

Kubernetes NFS Persistent Volumes – multiple claims on same volume? Claim stuck in pending?

Basically you can’t do what you want, as the relationship PVC <–> PV is one-on-one. If NFS is the only storage you have available and would like multiple PV/PVC on one nfs export, use Dynamic Provisioning and a default storage class. It’s not in official K8s yet, but this one is in the incubator and … Read more

Kubernetes – how to download a PersistentVolume’s content

I can think about two options to fulfill your needs: Create a pod with the PV attached to it and use kubectl cp to copy the contents wherever you need. You could for example use a PodSpec similar to the following: apiVersion: v1 kind: Pod metadata: name: dataaccess spec: containers: – name: alpine image: alpine:latest … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)