This repository demonstrates how to deploy a Sulu application to a Kubernetes cluster using the sulu/helm-charts.
The default branch of the repository contains a clean Sulu application based on the sulu/skeleton. The changes for adding the deployment are shown in the pull request #1.
docker build . --target project -t eu.gcr.io/sulu-io/sulu-cluster:1.0.0
docker push eu.gcr.io/sulu-io/sulu-cluster:1.0.0
gcloud beta container --project "sulu-io" clusters create "my-first-cluster-1" --zone "europe-west3-c" --no-enable-basic-auth --cluster-version "1.19.9-gke.1900" --release-channel "regular" --machine-type "g1-small" --image-type "COS" --disk-type "pd-standard" --disk-size "32" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "3" --no-enable-stackdriver-kubernetes --enable-ip-alias --network "projects/sulu-io/global/networks/default" --subnetwork "projects/sulu-io/regions/europe-west3/subnetworks/default" --default-max-pods-per-node "110" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
gcloud container clusters get-credentials my-first-cluster-1 --zone europe-west3-c --project sulu-io
Download the key and add cloud-storage admin permissions to the service account in a bucket.
Copy the deploy/secrets.dist.yaml
to deploy/secrets.yaml
.
Configure the redis password and the google cloud credentials in the secrets file.
cd deploy
helm dep build
helm install sulu-cluster . -f secrets.yaml --set=sulu.app.image.tag=1.0.0
cd deploy
helm upgrade sulu-cluster . -f secrets.yaml --set=sulu.app.image.tag=1.0.1