- Very first step to login on cloud.google.com with your gmail id, if you don't have any gmail id, create it.
- When you login on https://cloud.google.com/ very first time, you need to setup your account by providing your details and credit card details for billing purpose, don't worry when you provide your credit card as Google does not charge on until you allow it manually after the trial period end.
- Once, you have setup your account, Google by default create a project, but we will create another project - gkelearn
- Click on New Project and fill out the details, you can give any name, project id will be auto generated so dont change it. Leave Organization as it is.
- Click on Create. Your Google Project will be like somewhat below screenshot -
- Our GCP project has been setup, Now, we will create K8s Clusters. On the same maine dashboard, at left bottom screen you will see "Kubernetes Engines" under COMPUTE section, Select Clusters as below image -
- It will take few mins to create a GKE cluster, Once created, it will look like below -
- To connect to K8s Cluster, Click on "Connect" button. This will give you the command to connect. You can either use GCP Cloud Shell or use your CMD/Terminal if installed the gcloud binary in your system/computer. Let's click on "Cloud Shell"
- This will open a shell in browser only and the connect command will run. It will ask for authorization, Kindly allow.
- You can run below commands to check if Project is correct, though you can see the project name in bracket () and if k8s is up.
$ gcloud config list project
$ kubectl cluster-info - our K8s cluster has been setup and running successfully, we will continue this journey with next post.
**Before logging out from https://cloud.google.com/, shutdown the cluster to avoid the unnecessary billing on idle cluster.
$ gcloud container clusters resize [CLUSTER-NAME] --num-nodes=0 --zone=[ZONE-NAME]
i.e - gcloud container clusters resize cluster-1 --num-nodes=0 --zone=us-central1-c
This will take some time, once done, your cluster details will look like below, just remember whenever you want to work on it, you need to scale this up with above command just change the num-nodes value.
Like the below page to get the update
Facebook Page Facebook Group Twitter Feed Telegram Group
No comments:
Post a Comment