-
Notifications
You must be signed in to change notification settings - Fork 56
Manually deploying CoA to an AKS cluster using Helm
To manually deploy CoA to a pre-existing Azure Kubernetes Service (AKS), it's easiest to first deploy CoA using all defaults. The CoA deployer will write your aksValues.yaml
to the configuration
container in the storage account, and it will write the Helm chart to your local deployer working directory. You can then edit these files as necessary, and delete the resource group.
This process assumes you already have an AKS cluster up and running, and you have Helm installed on your local machine or wherever you're executing these commands.
- Install Helm
- Set cloud (if applicable) and login:
az cloud set -n azureusgovernment
az login
- Get the AKS credentials:
az aks get-credentials --resource-group myrg --name myaks
To make sure kubectl
is configured correctly and can communicate with your AKS cluster, run:
kubectl get nodes
This command should return a list of the nodes in your AKS cluster.
With kubectl
configured, you can now deploy your application using Helm. Navigate to a directory containing your Helm chart and values.yaml
file, then run:
helm upgrade --install <ReleaseName> ./<ChartDirectory> -f ./values.yaml --namespace <YourNamespace> --create-namespace
Replace:
-
<ReleaseName>
with a name for your Helm release (likecromwellonazure
) -
<ChartDirectory>
with the path to your Helm chart directory. -
<YourNamespace>
with the Kubernetes namespace where you want to deploy your application. If this namespace does not exist,--create-namespace
will create it for you.
The --install
flag combined with upgrade
tells Helm to install the chart if it does not already exist, making this command idempotent. This is useful for both initial deployments and updating existing deployments. The -f ./values.yaml
flag specifies the path to your custom values file, which Helm will use to override the default values in the chart.
After deploying, you can verify that your application is running with the following kubectl
command:
kubectl get all --namespace <YourNamespace>
This will list all the Kubernetes resources (pods, services, deployments, etc.) in the specified namespace, allowing you to check the status of your deployment.
If you encounter issues during the deployment, you can use the following commands to debug:
-
helm list --namespace <YourNamespace>
: Lists all Helm releases in the specified namespace. -
helm status <ReleaseName> --namespace <YourNamespace>
: Shows the status of the specified Helm release. -
kubectl describe pod <PodName> --namespace <YourNamespace>
: Provides detailed information about a specific pod, which can help diagnose issues. -
kubectl logs <PodName> --namespace <YourNamespace>
: Displays the logs from a specific pod, useful for understanding application behavior and errors.
Following these steps should help you successfully deploy your application to AKS using Helm and your values.yaml
file.
To search, expand the Pages section above.