Complete Guide: Setup Azure Arc Kubernetes on GCP (GKE) & AWS (EKS)
Azure Arc allows you to manage Kubernetes clusters running outside of Azure, including those hosted on Google Cloud (GKE) and Amazon Web Services (EKS). This guide will walk you through setting up and onboarding Kubernetes clusters to Azure Arc on both GCP and AWS.
1. Prerequisites
General Requirements
- Azure Subscription: You need an active Azure account. Sign up here
- Azure CLI: Install Azure CLI on your local machine.
- kubectl: Kubernetes command-line tool.
- Helm: Helm package manager for Kubernetes.
- GCP Account: Set up a GCP project and enable Kubernetes Engine.
- AWS Account: Set up an AWS account with permissions to create EKS clusters.
2. Setting Up Kubernetes on GCP (GKE)
Step 1: Create a GKE Cluster
- Authenticate with GCP:
- Set project:
- Enable Kubernetes API:
- Create a GKE cluster:
- Get cluster credentials:
3. Setting Up Kubernetes on AWS (EKS)
Step 1: Create an EKS Cluster
- Install AWS CLI and configure:
- Create an EKS cluster:
- Verify the cluster:
4. Connecting GKE & EKS to Azure Arc
Step 1: Register Azure Arc Provider
Run the following to register Azure Arc for Kubernetes:
Step 2: Install Azure Arc CLI Extensions
Step 3: Connect Kubernetes to Azure Arc
For GKE Cluster:
For EKS Cluster:
Step 4: Verify Connection
5. Deploying Azure Policies & Monitoring
Step 1: Enable Azure Policy for Kubernetes
Step 2: Enable Azure Monitor for Containers
- Enable Azure Monitor:
- Connect monitoring:
6. Managing and Deploying Applications
You can now use Azure Arc to deploy applications across your Kubernetes clusters using GitOps, policies, and Azure Monitor.
To deploy a sample app:
Expose the app:
7. Conclusion
You have successfully onboarded GKE and EKS to Azure Arc. Now, you can manage these clusters as if they were Azure-native using Azure Portal, Azure Policy, and Azure Monitor.