I read this link and this one to see how to deploy a simple WordPress application but I cannot.
With the first link I get error that PVC is not bound, and with the second link I get this error in the kubectl describe pod_name:
pod has unbound immediate PersistentVolumeClaims
I even tried manually to run kubectl apply -k . as per in k8s docs but it failed.
I run rancher on docker:
docker run -d -p80:80 -p443:443 --privileged rancher/rancher:latest
Do you please help me how to run a WordPress application to run?
I also tried other links and docs but none of them were a successful attempt.
Describe PVC and check events.
It seems it's not able to create a volume. Cross check on what storage provisioner your using.
If you haven't got any storage provisioned like portworx or csi, try to create volumes using
EmptyDirCreate a YAML file for the
emptyDirPV; let's call itemptydir-pv.yaml:This YAML file defines an
emptyDirPV namedmy-emptydir-pvwith a capacity of 1Gi and ahostPaththat specifies the directory on the node where the data will be stored.Apply the PV definition to your cluster:
Create a Pod that uses the
emptyDirPV. Here's an example Pod YAML; let's call itmy-pod.yaml:This Pod definition references the previously created
emptyDirPV and mounts it to the/datadirectory in the Pod container.Please note that this approach is suitable for scenarios where you need temporary storage or shared storage among containers within the same node. The data in the
emptyDirvolume is not persistent, and it will be lost if the Pod is deleted or rescheduled to a different node.