#Instructions from this URL: https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
# Create environment variable for correct distribution
CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
# Update the package list and install the Cloud SDK
sudo apt-get update
sudo apt-get install google-cloud-sdk
#Authenticate our console session with gcloud
gcloud init --console-only
#Create a named gcloud project
gcloud projects create psdemogke --name="Kubernetes-Cloud"
#Set our current project context
gcloud config set project psdemogke
#Enable GKE services in our current project
gcloud services enable container.googleapis.com
#You may have to adjust your resource limits and enabled billing here based on your subscription here.
#Go to https://console.cloud.google.com
#From the Navigation menu on the top left, browse to Compute->Kubernetes Engine.
#Click enable billing. Click Set Account.
#Tell GKE to create a single zone, three node cluster for us. 3 is the default size.
#https://cloud.google.com/compute/quotas#checking_your_quota
gcloud container clusters create cscluster --region us-central1-a
#Get our credentials for kubectl
gcloud container clusters get-credentials cscluster --zone us-central1-a --project psdemogke
#Check out out lists of kubectl contexts
kubectl config get-contexts
#set our current context to the GKE context
kubectl config use-context gke_psdemogke_us-central1-a_cscluster
#run a command to communicate with our cluster.
kubectl get nodes
#Delete our GKE cluster
#gcloud container clusters delete cscluster --zone=us-central1-a
#Delete our project.
#gcloud projects delete psdemogke
#Get a list of all contexts on this system.
kubectl config get-contexts
#Let's set to the kubectl context back to our local custer
kubectl config use-context kubernetes-admin@kubernetes
#use kubectl get nodes
kubectl get nodes
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND