A sample application that is based on Laravel, MySQL, Redis, Nginx, Kubernetes.
- install Docker for Mac/Windows Edge version and enable kubernetes
https://docs.docker.com/docker-for-mac/install/
- install kubectl
https://kubernetes.io/docs/tasks/tools/install-kubectl/
- install helm
https://github.com/kubernetes/helm
- install nginx-controller
$ helm init
$ helm install --name my-release stable/nginx-ingress
- install skaffold
https://github.com/GoogleContainerTools/skaffold
$ git clone [email protected]:ryosukes/laravel-k8s-sample.git
$ cd laravel-k8s-sample
$ kubectl apply -f kubernetes/db
# set common name 'sample-laravel.localhost'
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/nginx-selfsigned.key -out /tmp/nginx-selfsigned.crt; openssl dhparam -out /tmp/sample.pem 2048
$ kubectl create secret tls tls-certificate --key /tmp/nginx-selfsigned.key --cert /tmp/nginx-selfsigned.crt
$ skaffold run
You can access to https://sample-laravel.localhost