This repository is running laravel application with kubernetes.
$ echo -n "<Your GitHub Username>:<Your GitHub Token>" | base64
<AUTH TOKEN>
apiVersion: v1
kind: Secret
metadata:
name: docker-configjson-ghcr-io
stringData:
.dockerconfigjson: |
{"auths":{"ghcr.io":{"auth":"<AUTH TOKEN>"}}}
$ kubectl apply -f docker-configjson-ghcr-io.yaml
apiVersion: v1
kind: Secret
metadata:
name: heroku-jaws-mysql
data:
host: "" # Whatever
username: "" # Whatever
password: "" # Whatever
database: "" # Whatever
$ kubectl apply -f mysql.yaml
apiVersion: v1
kind: Secret
metadata:
name: heroku-redis
data:
host: "" # Whatever
port: "" # Whatever
password: "" # Whatever
$ kubectl apply -f redis.yaml
apiVersion: v1
kind: Secret
metadata:
name: mailtrap
data:
port: "" # Whatever
username: "" # Whatever
password: "" # Whatever
$ kubectl apply -f mailtrap.yaml
Because the MySQL and Redis is on Heroku (AWS RDS), we have to set up external name in K8s.
apiVersion: v1
kind: Service
metadata:
name: heroku-mysql
spec:
type: ExternalName
externalName: "" # MySQL Host
apiVersion: v1
kind: Service
metadata:
name: heroku-redis
spec:
type: ExternalName
externalName: "" # Redis Host
$ kubectl apply -f mysql-externalname.yaml
$ kubectl apply -f redis-externalname.yaml
$ kubectl apply -f .k8s/frontend/apache/frontend-deployment.yaml
$ kubectl apply -f .k8s/frontend/frontend-service.yaml
$ kubectl apply -f .k8s/frontend/nginx-copy/frontend-deployment.yaml
$ kubectl apply -f .k8s/frontend/frontend-service.yaml
$ kubectl apply -f .k8s/frontend/nginx-mount/frontend-deployment.yaml
$ kubectl apply -f .k8s/frontend/frontend-service.yaml
$ kubectl apply -f .k8s/backend/queue-worker/backend-deployment.yaml