Skip to content

parsaeian/laravel-7-crud-example

 
 

Repository files navigation

Laravel CRUD K8S

Build base

docker build -f ./base-image/Dockerfile -t parsaeian/php-base . 

Build app image

docker build -t parsaeian/laravel-crud .

Run the following commands for deploying your to Kubernetes:

kubectl create namespace prd

kubectl -f k8s/configmaps.yaml

kubectl -f k8s/deployment.yaml

kubectl expose deployment laravel-crud --port=8000 --target-port=80 --type=NodePort -n prd

# TODO: deploy database

Check service

kubectl get svc laravel-crud -n prd

Configure HAProxy

Change this haproxy.cfg with your workers ip and ports

Releases

No releases published

Packages

No packages published

Languages

  • PHP 89.1%
  • HTML 9.6%
  • Other 1.3%