|
| 1 | +# Helm Chart for Azure Managed Kubernetes Cluster |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This Helm chart deploys an Azure Managed Kubernetes Cluster using the Cluster API provider for Azure (CAPZ). |
| 6 | +## Prerequisites |
| 7 | + |
| 8 | +- Helm 3.0+ |
| 9 | +- Kubernetes 1.20+ |
| 10 | +- Azure CLI |
| 11 | +- Cluster API (CAPI) and Cluster API Provider Azure (CAPZ) installed |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +### Create an Azure Service Principal |
| 16 | + |
| 17 | +```sh |
| 18 | +az ad sp create-for-rbac --role Contributor --scopes="/subscriptions/${AZURE_SUBSCRIPTION_ID}" --sdk-auth > sp.json |
| 19 | +``` |
| 20 | + |
| 21 | +### Create Kubernetes Secret for Azure Cluster Identity |
| 22 | + |
| 23 | +```sh |
| 24 | +kubectl create secret generic "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" --from-literal=clientSecret="${AZURE_CLIENT_SECRET}" |
| 25 | +``` |
| 26 | + |
| 27 | +### Values Configuration |
| 28 | + |
| 29 | +Before deploying the chart, update the `values.yaml` file with appropriate values for your environment. |
| 30 | + |
| 31 | +### Example `values.yaml` |
| 32 | + |
| 33 | +```yaml |
| 34 | +global: |
| 35 | + clusterName: my-cluster |
| 36 | + kubernetes: |
| 37 | + version: "1.29.2" |
| 38 | + networkPolicy: azure |
| 39 | + networkPlugin: azure |
| 40 | + skuTier: Free |
| 41 | + clientSecret: mysecret |
| 42 | + clientID: 158ac5a8 |
| 43 | + tenantID: 3964984e |
| 44 | + addonProfiles: |
| 45 | + - name: azureKeyvaultSecretsProvider |
| 46 | + enabled: true |
| 47 | + - name: azurepolicy |
| 48 | + enabled: true |
| 49 | + clusterNetwork: |
| 50 | + services: |
| 51 | + cidrBlocks: "192.168.0.0/16" |
| 52 | + virtualNetwork: |
| 53 | + name: controlplan-vnet |
| 54 | + cidrBlock: "10.1.0.0/16" |
| 55 | + subnet: |
| 56 | + name: controlplan-subnet |
| 57 | + cidrBlock: "10.1.1.0/24" |
| 58 | + |
| 59 | +systemPool: |
| 60 | + osDiskSizeGB: 30 |
| 61 | + sku: Standard_D2s_v3 |
| 62 | + replicas: 1 |
| 63 | + |
| 64 | +userPool: |
| 65 | + osDiskSizeGB: 30 |
| 66 | + sku: Standard_D2s_v3 |
| 67 | + replicas: 1 |
| 68 | + |
| 69 | +location: centralindia |
| 70 | +resourceGroupName: cluster-api |
| 71 | +sshPublicKey: "ssh-rsa" |
| 72 | +subscriptionID: cce2e9ac |
| 73 | +additionalTags: |
| 74 | + environment: dev |
| 75 | +``` |
| 76 | +
|
| 77 | +### Deploying the Chart |
| 78 | +
|
| 79 | +```sh |
| 80 | +helm install my-cluster ./path-to-helm-chart -f values.yaml |
| 81 | +``` |
| 82 | + |
| 83 | +## Resources Created |
| 84 | + |
| 85 | + |
| 86 | +## Customization |
| 87 | + |
| 88 | +You can customize the chart by modifying the `values.yaml` file according to your requirements. Below are some of the customizable parameters: |
| 89 | + |
| 90 | +- **global.clusterName**: Name of the cluster. |
| 91 | +- **global.kubernetes.version**: Kubernetes version to use. |
| 92 | +- **global.networkPolicy**: Network policy to use (`azure` or `calico`). |
| 93 | +- **global.networkPlugin**: Network plugin to use (`azure` or `kubenet`). |
| 94 | +- **global.skuTier**: SKU tier for the control plane (`Free` or `Standard`). |
| 95 | +- **global.clientSecret**: Secret used for authentication. |
| 96 | +- **global.clientID**: Client ID for the Service Principal. |
| 97 | +- **global.tenantID**: Tenant ID for the Azure subscription. |
| 98 | +- **global.addonProfiles**: Add-on profiles for the cluster. |
| 99 | +- **global.clusterNetwork**: Cluster network configurations. |
| 100 | +- **global.virtualNetwork**: Virtual network configurations. |
| 101 | +- **systemPool**: System pool configurations. |
| 102 | +- **userPool**: User pool configurations. |
| 103 | +- **location**: Azure region where the resources will be deployed. |
| 104 | +- **resourceGroupName**: Resource group name in Azure. |
| 105 | +- **sshPublicKey**: SSH public key for accessing the nodes. |
| 106 | +- **subscriptionID**: Azure subscription ID. |
| 107 | +- **additionalTags**: Additional tags to be applied to the resources. |
| 108 | + |
| 109 | +## License |
| 110 | + |
| 111 | +This project is licensed under the Obmondo License. |
| 112 | + |
| 113 | +## Support |
| 114 | + |
0 commit comments