0

I have a setup complete and running for PHP including the creation and mounting of a persistent volume. What I do not understand and so far can not find a how tutorial is on how to add my application code to the volume for my servers/pods to read from.

I am using AWS EKS to house my environment and I do see the volume being created.

My end goal would be to get code in an Azure repo onto the volume.

I used this tutorial to set up the environment - https://www.digitalocean.com/community/tutorials/how-to-deploy-a-php-application-with-kubernetes-on-ubuntu-16-04

Great guide but it never told you how to get your code on the volume.

ErnieAndBert
  • 1,344
  • 3
  • 21
  • 43
  • 1
    You should package your code into a Docker image (and in an AWS context, push it to ECR). Volumes are not for code and you'll run into some significant problems trying to use them for that in Kubernetes. – David Maze Jul 02 '20 at 13:31
  • I am running a PHP application - So do I locally get a Nginx server up, add my code to it and then create an image of it and use that? I just can not make the connection/distinction between the nginx deployment and the php deployment and how/where my application code gets on the cluster. I feel like I am sooooo close to understanding this new K8S world.... This is the last piece of the puzzle! – ErnieAndBert Jul 02 '20 at 13:39
  • 1
    I might suggest trying to make this work in plain Docker or Docker Compose, _without any volumes_. Material like Docker's [Build and run your image](https://docs.docker.com/get-started/part2/) tutorial walks through this process. Once you have that working then you can translate that setup to Kubernetes YAML. – David Maze Jul 02 '20 at 13:50

0 Answers0