Template for deploying Laravel application with Kubernetes
- Kubernetes Cluster (minikube, kubeadm, EKS, AKS, GKE, ...).
- Kubectl connected with the cluster and ready.
- Storage class and PV storage.
- Clone this repo:
git clone https://github.com/husseinferas/larak8s && cd larak8s
- Create new namespace :
kubectl create namespace larak8s
- Deploy your project :
kubectl apply -k .
- Delete the project :
kubectl delete -k .
- Customized your laravel image:
inside app/deployment
...
containers:
- name: laravel
image: <YOUR_IMAGE>
ports:
- containerPort: 80
...
- Customized your namespace:
you can find and replace the default namespacelarak8s
with your namespace
...
metadata:
namespace: <YOUR_NAMESPACE>
name: laravel
...
- Further Customization:
you can customize anything you want in all the resources
- Note don't forget to apply your changes
kubectl apply -k .
Pull requests are welcome. For major changes.
Larak8s is licensed under the terms of the MIT License (See LICENSE file for details).