Google Cloud Anthos —Creating Clusters using Kubernetes Engine — Part 2

Payoda Technology Inc
4 min readAug 6, 2021

This is part-2 of the Google Cloud Anthos Series. Please click here for part 1: Google Cloud Anthos covering the basics of Anthos and Kubernetes.

In this blog, we will learn to

  1. Create Kubernetes clusters in GCP and Azure cloud
  2. Role binding in GCP
  3. Enabling services in both GCP and Azure


  • Active Azure, and GCP accounts
  • Latest Azure, and GCP CLI tools

Step 1: Creating clusters in Azure and GCP

One can create clusters in Azure and GCP either using the command-line tool or the GUI. Both the methods are shown below.

  • Creating a cluster in Azure using CLI
  • Creating a cluster in GCP using CLI
  • Creating a cluster in Azure using GUI
  • Creating Cluster in GCP using CLI

Creating a cluster in Azure using CLI

Creating a cluster in GCP using CLI

Creating a cluster in Azure using GUI

  1. Open Kubernetes service in Azure Platform. Select the region and give a name for the cluster.

2. Review the details in the Review + Create tab. Click on Create to create the Kubernetes cluster.

3. Once the cluster is created you get an output message reading “Your deployment is complete”. You can also view the deployment details on this page.

4. Cluster details are shown as an example below.

Creating a cluster in GCP using GUI

  1. Click on Kubernetes engine → Clusters → Create.

2. Cluster name should be specified. Location type should be specified.

3. Specify the machine type as per your requirement.

4. Specify the control plane version, release channel, and click Create.

5. You can view the cluster on the Kubernetes cluster page.


After the clusters are created using GUI, the following commands should be executed in respective CLIs

export KUBECONFIG=aks-config should be executed in Azure CLI

export KUBECONFIG=gke-config should be executed in GKE CLI

Step 2: Role- Binding in GCP

Role-based access control (RBAC) is a method of regulating access to a computer or network resources based on the roles of individual users within your organization.

Step 3: Copy contents from aks-config in AZURE, paste it in /home/cloud/.kube/config

Step 4: Kubectx

Kubectx command can be used to switch between the two clusters. To know more Kubectx commands, click here

Step 5: Enabling services in both the clouds

Note in Azure: Install gcloud SDK. The details of installing gcloud SDK are given here- the installation process.

Execute the below commands in both Azure and GCP CLIs.

Step 6: In Azure or GCP

We have successfully created clusters in both clouds. We are nearly there. To configure Anthos GKE for Multi-Cluster Operation, click here.

Author: Santhosh Mathavan, Karthik Prabhu — Cloud CoE



Payoda Technology Inc

Your Digital Transformation partner. We are here to share knowledge on varied technologies, updates; and to stay in touch with the tech-space.