azuremonitor-containers

by joaquinito2051

Helm chartv0.6.0App 4.0.0-0

Helm chart for deploying Azure Monitor container monitoring agent in Kubernetes

About this chart

Azure Monitor – Containers


Introduction

This article describes how to set up and use Azure Monitor - Containers to monitor the health and performance of your workloads deployed to Kubernetes environments. Monitoring your Kubernetes cluster and containers is critical, especially when running a production cluster, at scale, with multiple applications.


Pre-requisites

  • Kubernetes 1.7+

  • You will need to create a location to store your monitoring data.

  1. Create Azure Log Analytics Workspace
  • You will need to add AzureMonitor-Containers solution to your workspace from #1 above
  1. Add the 'AzureMonitor-Containers' Solution to your Log Analytics workspace.

  2. For AKS-Engine or ACS-Engine K8S cluster, add required tags on cluster resources, to be able to use Azure Container monitoring User experience (aka.ms/azmon-containers)


Installing the Chart

$ helm install --name myrelease-1 \
--set omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<my_prod_cluster>  <helm-repo>/azuremonitor-containers

$ helm install --name myrelease-1 \

Uninstalling the Chart

To uninstall/delete the myrelease-1 release:


$ helm del --purge myrelease-1

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the MSOMS chart and their default values.

The following table lists the configurable parameters of the MSOMS chart and their default values.

ParameterDescriptionDefault
omsagent.image.tagmsoms image tag.Most recent release
omsagent.image.pullPolicymsoms image pull policy.IfNotPresent
omsagent.secret.wsidAzure Log analytics workspace idDoes not have a default value, needs to be provided
omsagent.secret.keyAzure Log analytics workspace keyDoes not have a default value, needs to be provided
omsagent.domainAzure Log analytics cloud domain (public / govt)opinsights.azure.com (Public cloud as default), opinsights.azure.us (Govt Cloud)
omsagent.env.clusterNameName of your clusterDoes not have a default value, needs to be provided. If AKS-Engine or ACS-Engine K8S cluster, it is recommended to provide either one of the below as cluster name, to be able to use Azure Container monitoring User experience (aka.ms/azmon-containers) - Azure Resource group resource ID of ACS-Engine cluster - Provide a friendly name here and ensure this name is used to 'tag' the cluster master node(s) - see step-3 in pre-requisites above
omsagent.env.doNotCollectKubeSystemLogsDisable collecting logs from containers in 'kube-system' namespacetrue
omsagent.rbacrbac enabled/disabledtrue (i.e enabled)

You can create a Azure Loganalytics workspace from portal.azure.com and get its ID & PRIMARY KEY from 'Advanced Settings' tab in the Ux.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

$ helm install --name myrelease-1 \
--set omsagent.secret.wsid=<your_workspace_id>,omsagent.secret.key=<your_workspace_key>,omsagent.env.clusterName=<my_AKS-Engine_k8s_cluster_RG_ResourceID>  <helm-repo>/azuremonitor-containers

$ helm install --name myrelease-1 \

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,


$ helm install --name myrelease-1 -f values.yaml <helm-repo>/azuremonitor-containers

$ helm install --name myrelease-1 -f values.yaml incubator/azuremonitor-containers

After you successfully deploy the chart, you will be able to see your data in the azure portal

If you need help with this chart, please reach us out through this email.

Deploy azuremonitor-containers with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has azuremonitor-containers on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartazuremonitor-containers is pinned at v0.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply