Containerize a LAMP Stack using Docker
sudo docker-compose up -d
sudo docker-compose up
Set imagePullPolicy to Always in order to enable container rebuilding, this happens when you build your own image locally with docker-compose, push it to docker hub.
When applying the yaml manifests, the new image is automaically pulled and will replace the old one.
Run the kompose up command to deploy to Kubernetes directly, or skip to the next step instead to generate a file to use with kubectl.
kompose convert -f docker-compose.prod.yml -o kubemanifests.yaml
kubectl apply -f kubemanifests.yaml
Enable Kubernetes Engine API Create a cluster
gcloud container clusters create lampkubectl \
--zone us-central1-a
Shell into the created cluster
--> Navigate to localhost or 127.0.0.1