Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi. I have created a local docker image and deployed it to a managed kubernetes cluster. I have tested the image locally and works. But when I deploy to the kubernetes cluster I am getting an error from Apache that the Root Directory is empty. I know that the MySQL server installation is missing. At tis step I wish to make sure that the pho files are correctly deployed.
This is my Dockerfile:
FROM php:7.4-apache
COPY wordpress/ /var/www/html
RUN chmod -R 755 /var/www/html
EXPOSE 80
And these are my YAML files to setup the kubernetes cluster:
apiVersion: v1
kind: Service
metadata:
name: wordpress
labels:
app: wordpress
spec:
ports:
- port: 80
selector:
app: wordpress
type: LoadBalancer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wp-pv-claim
labels:
app: wordpress
spec:
accessModes:
- ReadWriteOnce
storageClassName: do-block-storage
resources:
requests:
storage: 1Gi #put here your required storage capacity
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wordpress
labels:
app: wordpress
spec:
selector:
matchLabels:
app: wordpress
strategy:
type: Recreate
template:
metadata:
labels:
app: wordpress
spec:
containers:
- name: wordpress
image: ......my Docker Hub Image.....
ports:
- containerPort: 80
name: wordpress
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html #default root path for webserver
imagePullSecrets:
- name: docker-hub-cred #credentials to sync with Docker Hub & pull the image
volumes:
- name: wordpress-persistent-storage
persistentVolumeClaim:
claimName: wp-pv-claim
I have connected to the local docker container and executed the ls command in the root directory and I can see the wordpress files, but when doing the same on the deployed pod, I am getting an empty root directory.
Any suggestions what is wrong?
gerard
Jon Harris
orbitstorm88
rem3n
yolanda smith
301276acdc124dd982fe86364ba8c4
30ddab6038c044188d489290785dcb
699c9bc0a2c34f248e792cb8d2c6ab
Kent Morlan
sylvaticus
agitechcr
8b8f3c8ea96345bf8ddb0a59a008e2