1. The Cloud Computing Shared Responsibility Model
When deploying Kubernetes in public clouds, the operational boundary changes dramatically:
| Architectural Tier | On-Premises Bare-Metal | Cloud IaaS (Self-Managed) | Managed PaaS (EKS / GKE / AKS) |
|---|---|---|---|
| Physical Facilities & Power | Customer | Cloud Provider | Cloud Provider |
| Physical Servers & Hypervisors | Customer | Cloud Provider | Cloud Provider |
| Control Plane (etcd, API Server) | Customer | Customer | Cloud Provider (SLA-backed) |
| Worker Node OS & Patching | Customer | Customer | Shared (Managed Node Groups) |
| Pod Security & Application Logic | Customer | Customer | Customer Responsibility |
By outsourcing the high-availability management of etcd and the Control Plane to cloud providers, platform teams focus exclusively on application resilience and workload governance.
2. Automating Amazon Elastic Kubernetes Service (AWS EKS)
Amazon EKS manages the Kubernetes control plane across three Availability Zones. Workload pods access AWS services (S3, DynamoDB) securely via IAM Roles for Service Accounts (IRSA), which federates Kubernetes OpenID Connect (OIDC) tokens with AWS IAM.
Ansible Playbook: Provisioning EKS Cluster with IRSA
- name: Provision Amazon EKS Managed Kubernetes Cluster
amazon.aws.eks_cluster:
name: production-eks-cluster
version: "1.29"
role_arn: "arn:aws:iam::123456789012:role/EKSClusterRole"
subnets:
- subnet-0123456789abcdef0
- subnet-0fedcba9876543210
security_groups:
- sg-0123456789abcdef0
enable_oidc: true
state: present
register: eks_cluster3. Automating Google Kubernetes Engine (GCP GKE)
Google Cloud GKE is widely recognized for advanced automation and deep integration with Borg ancestry.
GKE features two distinct operating modes:
- GKE Standard: Full control over underlying Compute Engine VM worker nodes, node pools, and custom machine types.
- GKE Autopilot: Fully automated infrastructure where Google provisions, scales, and manages worker nodes automatically, billing strictly per pod CPU/RAM requests.
Ansible Playbook: Provisioning VPC-Native GKE Cluster
- name: Provision GKE Autopilot Cluster
google.cloud.gcp_container_cluster:
name: production-gke-cluster
initial_node_count: 1
autopilot:
enabled: true
network: projects/my-project/global/networks/vpc-production
subnetwork: projects/my-project/regions/us-central1/subnetworks/k8s-subnet
location: us-central1
project: my-project
auth_kind: serviceaccount
service_account_file: /etc/credentials/gcp-sa.json
state: present4. Automating Microsoft Azure Kubernetes Service (AKS)
Azure AKS integrates natively with Microsoft Entra ID (formerly Azure Active Directory) and Azure Virtual Networks:
- Kubenet Networking: Basic virtual network routing; worker nodes act as routers, and Pod IPs are not routable within the broader Azure VNet.
- Azure CNI (Container Network Interface): Every Pod receives a real, fully routable private IP address directly from the Azure VNet subnet.
- name: Provision Azure AKS Cluster with Managed Identities
azure.azcollection.azure_rm_aks:
resource_group: ProductionRG
name: production-aks-cluster
dns_prefix: prod-k8s
kubernetes_version: "1.29.0"
linux_profile:
admin_username: azureuser
ssh_key: "{{ vault_ssh_public_key }}"
agent_pool_profiles:
- name: defaultpool
count: 3
vm_size: Standard_D4s_v5
os_type: Linux
identity:
type: SystemAssigned
network_profile:
network_plugin: azure
state: present