1. Create GKE cluster and connect to it
gcloud beta container --project "centsideas" clusters create "centsideas"\
--zone "europe-west3-b" --no-enable-basic-auth --cluster-version "1.16.9-gke.6"\
--machine-type "n1-standard-1" --disk-size "10" --preemptible --num-nodes "3"\
--enable-autoscaling --min-nodes "0" --max-nodes "3"
gcloud container clusters get-credentials centsideas --zone europe-west3-b --project centsideas
2. Setup Helm
helm repo add stable https://kubernetes-charts.storage.googleapis.com/ && \
helm repo add jetstack https://charts.jetstack.io && \
helm repo update
3. Create an NGINX Ingress
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $(gcloud config get-value account) && \
helm install nginx-ingress stable/nginx-ingress
Go to the created Load Balancer and point your domain to this IP address via an "A" record.
Record Type | Domain | Value |
---|---|---|
A | centsideas.com | ip-address |
A | api.centsideas.com | ip-address |
A | admin.centsideas.com | ip-address |
5. Setup Cert Manager
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager --create-namespace \
--version v0.15.0 \
--set installCRDs=true
kubectl create namespace kafka
kubectl apply -f 'https://strimzi.io/install/latest?namespace=kafka' -n kafka
kubectl apply -f packages/kubernetes/kafka-ephemeral.yaml -n kafka
kubectl apply -f https://download.elastic.co/downloads/eck/1.1.2/all-in-one.yaml
kubectl apply -f packages/kubernetes/elasticsearch.yaml
git clone https://github.com/mongodb/mongodb-kubernetes-operator && \
cd mongodb-kubernetes-operator && \
kubectl create namespace mongodb && \
kubectl create -f deploy/crds/mongodb.com_mongodb_crd.yaml && \
kubectl create -f deploy/ --namespace mongodb
cd ..
microk8s.kubectl apply -f packages/kubernetes/event-store.yaml -n mongodb && \
microk8s.kubectl apply -f packages/kubernetes/read-database.yaml -n mongodb
yarn deploy