All Projects → avinor → terraform-azurerm-kubernetes

avinor / terraform-azurerm-kubernetes

Licence: Apache-2.0 license
Terraform module to deploy a Kubernetes cluster on Azure, using AKS.

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to terraform-azurerm-kubernetes

terraform-vultr-condor
Kubernetes Deployment Tool for Vultr
Stars: ✭ 60 (+275%)
Mutual labels:  kubernetes-cluster, terraform-module
kubehelper
KubeHelper - simplifies many daily Kubernetes cluster tasks through a web interface. Search, analysis, run commands, cron jobs, reports, filters, git synchronization and many more.
Stars: ✭ 200 (+1150%)
Mutual labels:  kubernetes-cluster, terraform-module
k8s-actions
Enable GitHub developers to deploy to Kubernetes service using GitHub Actions
Stars: ✭ 104 (+550%)
Mutual labels:  kubernetes-cluster, aks
terraform-aws-eks-node-group
Terraform module to provision EKS Managed Node Group
Stars: ✭ 14 (-12.5%)
Mutual labels:  kubernetes-cluster, terraform-module
Azure-AKS-ApplicationGateway-WAF
No description or website provided.
Stars: ✭ 16 (+0%)
Mutual labels:  kubernetes-cluster, aks
terraform-aws-cloudwatch-flow-logs
Terraform module for enabling flow logs for vpc and subnets.
Stars: ✭ 32 (+100%)
Mutual labels:  terraform-module
terraform-aws-ses
Terraform module to provision Simple Email Service on AWS
Stars: ✭ 24 (+50%)
Mutual labels:  terraform-module
terraform-aws-cognito-user-pool
Terraform module to create Amazon Cognito User Pools, configure its attributes and resources such as app clients, domain, resource servers. Amazon Cognito User Pools provide a secure user directory that scales to hundreds of millions of users.
Stars: ✭ 65 (+306.25%)
Mutual labels:  terraform-module
Networking-and-Kubernetes
This is the code repo for Networking and Kubernetes: A Layered Approach. https://learning.oreilly.com/library/view/networking-and-kubernetes/9781492081647/
Stars: ✭ 103 (+543.75%)
Mutual labels:  aks
K8s-Cluster-Provisioner-GCP-Terrafrom
This repo will seamlessly setup self managed Kubernetes cluster in GCP using Terraform and Kubespray.
Stars: ✭ 17 (+6.25%)
Mutual labels:  kubernetes-cluster
icp-ce-on-linux-containers
Multi node IBM Cloud Private Community Edition 3.2.x w/ Kubernetes 1.13.5 in a Box. Terraform, Packer and BASH based Infrastructure as Code script sets up a multi node LXD cluster, installs ICP-CE and clis on a metal or VM Ubuntu 18.04 host.
Stars: ✭ 52 (+225%)
Mutual labels:  kubernetes-cluster
docker-kubernetes-course
Demoing Kubernetes/AKS features
Stars: ✭ 42 (+162.5%)
Mutual labels:  aks
k8s1.15.1
一键部署k8s1.15.1
Stars: ✭ 18 (+12.5%)
Mutual labels:  kubernetes-cluster
kube-microcosm
An example of a kubernetes cluster appropriate for a startup company
Stars: ✭ 61 (+281.25%)
Mutual labels:  kubernetes-cluster
jpetstore-kubernetes
Modernize and Extend: JPetStore on IBM Cloud Kubernetes Service
Stars: ✭ 21 (+31.25%)
Mutual labels:  kubernetes-cluster
oci-cloud-controller-manager
Kubernetes Cloud Controller Manager implementation for Oracle Cloud Infrastucture
Stars: ✭ 101 (+531.25%)
Mutual labels:  kubernetes-cluster
kubeadm-tf
PoC; terraform + kubeadm
Stars: ✭ 25 (+56.25%)
Mutual labels:  kubernetes-cluster
terraform-aws-ecs-fargate-task-definition
Terraform module to create AWS ECS Fargate Task Definition
Stars: ✭ 20 (+25%)
Mutual labels:  terraform-module
terraform-aws-kms
This terraform module creates a KMS Customer Master Key (CMK) and its alias.
Stars: ✭ 14 (-12.5%)
Mutual labels:  terraform-module
terraform-aws-lb-s3-bucket
Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs
Stars: ✭ 29 (+81.25%)
Mutual labels:  terraform-module

Kubernetes

Terraform module to deploy a Kubernetes cluster on Azure by using the managed Kubernetes solution AKS. For security reasons it will only deploy a rbac enabled clusters and requires an Azure AD application for authenticating users. This account can be created with the module avinor/kubernetes-azuread-integration/azurerm . Service principal required can be created with avinor/service-principal/azurerm module. It is not required to grant the service principal any roles, this module will make sure to grant required roles. That does however mean that the deployment has to run with Owner priviledges.

From version 1.5.0 of module it will assign the first node pool defined as the default one, this cannot be changed later. If changing any variable that requires node pool to be recreated it will recreate entire cluster, that includes name, vm size etc. Make sure this node pool is not changed after first deployment. Other node pools can change later.

Usage

This example deploys a simple cluster with one node pool. The service principal and Azure AD integration secrets need to be changed.

module "simple" {
  source  = "avinor/kubernetes/azurerm"
  version = "1.5.0"

  name                = "simple"
  resource_group_name = "simple-aks-rg"
  location            = "westeurope"
  service_cidr        = "10.0.0.0/24"
  kubernetes_version  = "1.15.5"

  service_principal = {
    client_id     = "00000000-0000-0000-0000-000000000000"
    client_secret = "00000000-0000-0000-0000-000000000000"
  }

  azure_active_directory = {
    client_app_id     = "00000000-0000-0000-0000-000000000000"
    server_app_id     = "00000000-0000-0000-0000-000000000000"
    server_app_secret = "00000000-0000-0000-0000-000000000000"
  }

  agent_pools = [
    {
      name           = "linux"
      vnet_subnet_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1"
    },
  ]
}

Diagnostics

Diagnostics settings can be sent to either storage account, event hub or Log Analytics workspace. The variable diagnostics.destination is the id of receiver, ie. storage account id, event namespace authorization rule id or log analytics resource id. Depending on what id is it will detect where to send. Unless using event namespace the eventhub_name is not required.

Setting all in logs and metrics will send all possible diagnostics to destination. If not using all type name of categories to send.

Dashboard

AKS comes with dashboard preinstalled, but currently it does not work well with rbac enabled. It is possible to open the dashboard by running az aks browse, but it does not have access to read any resources. This could be resolved by granting the dashboard service account access to read, or enable token authentication on the dashboard. Both requires additional configuration after cluster has been deployed.

Available version

To get a list of available Kubernetes version in a region run the following command. Replace westeurope with region of choice.

az aks get-versions --location westeurope --query "orchestrators[].orchestratorVersion"

Roles

This module will assign the required roles for cluster. These are based on the Microsoft documentation. The variables container_registries and storage_contributor can be used to grant it access to container registries and storage accounts.

If cluster needs to manage some Managed Identities that can be done by using the input variable managed_identities. The AKS service principal will be granted Managed Identity Operator role to those identities.

Service accounts

Using the service_accounts variable it is possible to create some default service accounts. For instance to create a service account with cluster_admin role that can be used in CI / CI pipelines. It is not recommended to use the admin credentials as they cannot be revoked later.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].