Skip to content

Instantly share code, notes, and snippets.

@avinashseth
Created February 26, 2019 16:44
Show Gist options
  • Save avinashseth/443eb24fd638f024419eadc484ce013d to your computer and use it in GitHub Desktop.
Save avinashseth/443eb24fd638f024419eadc484ce013d to your computer and use it in GitHub Desktop.
- name: Create Azure Kubernetes Service
hosts: localhost
connection: local
vars:
resource_group: myResourceGroup
location: eastus
aks_name: myAKSCluster
username: azureuser
ssh_key: "your_ssh_key"
client_id: "your_client_id"
client_secret: "your_client_secret"
tasks:
- name: Create resource group
azure_rm_resourcegroup:
name: "{{ resource_group }}"
location: "{{ location }}"
- name: Create a managed Azure Container Services (AKS) cluster
azure_rm_aks:
name: "{{ aks_name }}"
location: "{{ location }}"
resource_group: "{{ resource_group }}"
dns_prefix: "{{ aks_name }}"
linux_profile:
admin_username: "{{ username }}"
ssh_key: "{{ ssh_key }}"
service_principal:
client_id: "{{ client_id }}"
client_secret: "{{ client_secret }}"
agent_pool_profiles:
- name: default
count: 2
vm_size: Standard_D2_v2
tags:
Environment: Production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment