I'm trying to migrate a typical single node LAMP stack with prestashop inside to kubernetes on Google Cloud Platform.
So far i've:
This works, and I would leave it this way if It wouldn't make it so difficult to deploy any changes that have any kind of impact on the disk (uploading product images, installing new modules, etc).
I want to move the whole html folder to a persistent volume. I've checked two options.
I would like some advice on what to use, preferibly with flexibility of the Storage and the native attachement of the persistent disk. Regarding the bandwidth, so far there is little to no traffic to the stack, but it would be nice for it to scale in a decent way. (If not, the whole k8s cluster is kinda pointless).
You may take into consideration the use of gitRepo
volume for your html
folder:
apiVersion: v1
kind: Pod
metadata:
name: server
spec:
containers:
- image: ...
name: ...
volumeMounts:
- mountPath: /mypath
name: git-volume
volumes:
- name: git-volume
gitRepo:
repository: "git@somewhere:me/your-git-repository.git"
revision: "eef1d8406d464b0c0874075521c1f2e96c253775"
In my opinion you should go for a persistent disk. And, honestly I have never used a bucket with k8s, but I have seen it being a pain. Besides you will probably do need to use gcsfuse, which is in beta since forever.