This is a verbose walkthrough. It uses gcloud
and assumes you already have an GCP account and project where you want to run eoapi. We also assume that you have some prerequisites installed including gcloud
, kubectl
and helm
.
If you're familiar with Terraform and would like an IaC choice that is more terse consider setting up your cluster with that: https://github.com/developmentseed/eoapi-k8s-terraform
- Pre-requisites
- Enable GKE API
- Create GKE k8s Cluster
- Enable CSI Driver
- Install NGINX Ingress Controller
- Install Cert Manager
Before we begin, make sure you are logged in to your GCP account and have set up a project. You can do this by running the following commands:
gcloud auth login
gcloud config set project <project-name>
Before we can create a cluster, we need to enable the GKE API. You can do this by running the following command:
gcloud services enable container.googleapis.com
Here's an example command to create a cluster. See the gcloud docs for all available options
gcloud container clusters create sandbox \
--num-nodes=1 \
--zone=us-central1-a \
--node-locations=us-central1-a \
--enable-autoscaling \
--min-nodes=1 \
--max-nodes=3 \
--machine-type=n1-standard-2
You might need to iterate on the command above, so to delete the cluster:
gcloud container clusters delete my-cluster --zone=us-central1-a
CSI Driver is required for persistent volumes to be mounted to pods. You can enable it by running the following command:
gcloud container clusters update sandbox --update-addons=GcePersistentDiskCsiDriver=ENABLED --zone=us-central1-a
NGINX Ingress Controller can be installed through helm
using the following command:
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace eoapi
See the NGINX Ingress Controller docs for more details and configuration options.
Cert Manager can be installed through helm
using the following command:
helm upgrade --install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.12.0 \
--set installCRDs=true
Now we are ready to install eoapi. See the eoapi installation instructions for more details.