Skip to content

Commit

Permalink
Added a readme file for azure cluster api
Browse files Browse the repository at this point in the history
Signed-off-by: Devesh Sharma <[email protected]>
  • Loading branch information
Devesh Sharma committed Aug 8, 2024
1 parent 62e841a commit 044ed1b
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 38 deletions.
114 changes: 114 additions & 0 deletions argocd-helm-charts/capi-cluster/charts/azure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Helm Chart for Azure Managed Kubernetes Cluster

## Overview

This Helm chart deploys an Azure Managed Kubernetes Cluster using the Cluster API provider for Azure (CAPZ).
## Prerequisites

- Helm 3.0+
- Kubernetes 1.20+
- Azure CLI
- Cluster API (CAPI) and Cluster API Provider Azure (CAPZ) installed

## Installation

### Create an Azure Service Principal

```sh
az ad sp create-for-rbac --role Contributor --scopes="/subscriptions/${AZURE_SUBSCRIPTION_ID}" --sdk-auth > sp.json
```

### Create Kubernetes Secret for Azure Cluster Identity

```sh
kubectl create secret generic "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" --from-literal=clientSecret="${AZURE_CLIENT_SECRET}"
```

### Values Configuration

Before deploying the chart, update the `values.yaml` file with appropriate values for your environment.

### Example `values.yaml`

```yaml
global:
clusterName: my-cluster
kubernetes:
version: "1.29.2"
networkPolicy: azure
networkPlugin: azure
skuTier: Free
clientSecret: mysecret
clientID: 158ac5a8
tenantID: 3964984e
addonProfiles:
- name: azureKeyvaultSecretsProvider
enabled: true
- name: azurepolicy
enabled: true
clusterNetwork:
services:
cidrBlocks: "192.168.0.0/16"
virtualNetwork:
name: controlplan-vnet
cidrBlock: "10.1.0.0/16"
subnet:
name: controlplan-subnet
cidrBlock: "10.1.1.0/24"

systemPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replicas: 1

userPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replicas: 1

location: centralindia
resourceGroupName: cluster-api
sshPublicKey: "ssh-rsa"
subscriptionID: cce2e9ac
additionalTags:
environment: dev
```
### Deploying the Chart
```sh
helm install my-cluster ./path-to-helm-chart -f values.yaml
```

## Resources Created


## Customization

You can customize the chart by modifying the `values.yaml` file according to your requirements. Below are some of the customizable parameters:

- **global.clusterName**: Name of the cluster.
- **global.kubernetes.version**: Kubernetes version to use.
- **global.networkPolicy**: Network policy to use (`azure` or `calico`).
- **global.networkPlugin**: Network plugin to use (`azure` or `kubenet`).
- **global.skuTier**: SKU tier for the control plane (`Free` or `Standard`).
- **global.clientSecret**: Secret used for authentication.
- **global.clientID**: Client ID for the Service Principal.
- **global.tenantID**: Tenant ID for the Azure subscription.
- **global.addonProfiles**: Add-on profiles for the cluster.
- **global.clusterNetwork**: Cluster network configurations.
- **global.virtualNetwork**: Virtual network configurations.
- **systemPool**: System pool configurations.
- **userPool**: User pool configurations.
- **location**: Azure region where the resources will be deployed.
- **resourceGroupName**: Resource group name in Azure.
- **sshPublicKey**: SSH public key for accessing the nodes.
- **subscriptionID**: Azure subscription ID.
- **additionalTags**: Additional tags to be applied to the resources.

## License

This project is licensed under the Obmondo License.

## Support

76 changes: 38 additions & 38 deletions argocd-helm-charts/capi-cluster/charts/azure/values.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
global:
clusterName: my-cluster
kubernetes:
version: "1.29.2"
networkPolicy: azure # or calico
networkPlugin: azure # or kubenet
skuTier: Free
clientSecret: mysecret
clientID: 158ac5a8-c34d-4d35-81ff-90677ce31b5d
tenantID: 3964984e-eaaf-4ac4-b3ff-b3cda81256ff
addonProfiles:
- name: azureKeyvaultSecretsProvider
enabled: true
- name: azurepolicy
enabled: true
clusterNetwork:
services:
cidrBlocks: "192.168.0.0/16"
virtualNetwork:
name: controlplan-vnet
cidrBlock: "10.1.0.0/16"
subnet:
name: controlplan-subnet
cidrBlock: "10.1.1.0/24"
global:
clusterName: my-cluster
kubernetes:
version: "1.29.2"
networkPolicy: azure # or calico
networkPlugin: azure # or kubenet
skuTier: Free
clientSecret: mysecret
clientID: 158ac5a8-c34d-4d35-81ff-90677ce31b5d
tenantID: 3964984e-eaaf-4ac4-b3ff-b3cda81256ff
addonProfiles:
- name: azureKeyvaultSecretsProvider
enabled: true
- name: azurepolicy
enabled: true
clusterNetwork:
services:
cidrBlocks: "192.168.0.0/16"
virtualNetwork:
name: controlplan-vnet
cidrBlock: "10.1.0.0/16"
subnet:
name: controlplan-subnet
cidrBlock: "10.1.1.0/24"

systemPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replica: 1
systemPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replica: 1

userPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replica: 1
userPool:
osDiskSizeGB: 30
sku: Standard_D2s_v3
replica: 1

location: centralindia
resourceGroupName: cluster-api
sshPublicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrRKqLY7bihiRdr8uJnTMcfDMeQ9HOUxYHp7jBbl+Paae2nJ8tzbSGbMk9+Wqw8i5C38rlUolq6Sc1xUUDzWCXB8LCVSsIUrpWUsy5tjlq6U9r8NpypSIon48tNrLdEwtYEf1/5bYA0Y2PFTxtkZcvWtqcor7q9hiejQWrNU3CCVAt8kBGzsieT00YwCrI6AvT+Ko8xjJyDFuunIpliYjyotgXXFF2BohxKEdkuIVpS7iUGQxF993tKQNaMtkKnuU9ijLFhdp41Rk8lSCc1x+oavUbR+ACtbZwlYnc7lcOAJUP3HEQ6ewR5W1zuASlRyR5Mr9sJ0vGf7zbkTAk3VGRlGRVXyU+rZUkqGm71LyKBkptxv32MD/HGbnE81KeJXm7tvLJvr96ssOn3AuBiPEppNAhtqN7Xo/7aYOfkaBxYpddJQ9uhAXdmVTRNnQuRIJK4vWI1o5urJ+1VJ1WawX6QdFOc+3Wbi2JGeyxtweYGIFjcwqkD3gbWtoSb4XLKHE= davesh.sharma@LM2RTXP4K9"
subscriptionID: cce2e9ac-1580-4d82-b79f-a637f5f3e443
additionalTags:
environment: dev
location: centralindia
resourceGroupName: cluster-api
sshPublicKey: "ssh-rsa"
subscriptionID: cce2e9ac-1580-4d82-b79f-a637f5f3e443
additionalTags:
environment: dev

0 comments on commit 044ed1b

Please sign in to comment.