GCP Quickstart
To have basic set with Google Kubernetes Engine(GKE) on GCP:
Tooling Installation
Install Kubectl
Please follow this link (https://kubernetes.io/docs/tasks/tools/install-kubectl) to install kubectl.
For Mac User
brew install kubernetes-cliPlease check kubectl version after installation.
kubectl versionQuickStart scripts are tested under kubectl client version v1.16.3 and server version v1.13.12
Install Helm
Please follow this link to install helm
For Mac User
brew install kubernetes-helmPlease check helm version after installation.
helm versionInstall Google Cloud SDK
Please follow this link to install Google Cloud SDK
For Mac User
- Install Google Cloud SDK
curl https://sdk.cloud.google.com | bash- Restart your shell
exec -l $SHELL(Optional) Initialize Google Cloud Environment
gcloud init(Optional) Create a Kubernetes cluster(GKE) in Google Cloud
Below script will create a 3 nodes cluster named pinot-quickstart in us-west1-b with n1-standard-2 machines for demo purposes.
Please modify the parameters in the example command below:
GCLOUD_PROJECT=[your gcloud project name]GCLOUD_ZONE=us-west1-bGCLOUD_CLUSTER=pinot-quickstartGCLOUD_MACHINE_TYPE=n1-standard-2GCLOUD_NUM_NODES=3gcloud container clusters create ${GCLOUD_CLUSTER} \ --num-nodes=${GCLOUD_NUM_NODES} \ --machine-type=${GCLOUD_MACHINE_TYPE} \ --zone=${GCLOUD_ZONE} \ --project=${GCLOUD_PROJECT}You can monitor cluster status by command:
gcloud compute instances listOnce the cluster is in RUNNING status, it's ready to be used.
Connect to an existing cluster
Simply run below command to get the credential for the cluster pinot-quickstart that you just created or your existing cluster.
GCLOUD_PROJECT=[your gcloud project name]GCLOUD_ZONE=us-west1-bGCLOUD_CLUSTER=pinot-quickstartgcloud container clusters get-credentials ${GCLOUD_CLUSTER} --zone ${GCLOUD_ZONE} --project ${GCLOUD_PROJECT}To verify the connection, you can run:
kubectl get nodesPinot Quickstart
Please follow this Kubernetes QuickStart to deploy your Pinot Demo.
Delete a Kubernetes Cluster
GCLOUD_ZONE=us-west1-bgcloud container clusters delete pinot-quickstart --zone=${GCLOUD_ZONE}