Azure Kubernetes Service Communication Manager(Preview)
The AKS Communication Manager streamlines notifications for all your AKS maintenance tasks by using Azure Resource Notification and Azure Resource Graph frameworks. This tool enables you to monitor your upgrades closely by providing timely alerts on event triggers and outcomes. If maintenance fails, it notifies you with the reasons for the failure, reducing operational hassles related to observability and follow-ups. Currently in preview, you can set up notifications for all types of auto upgrades that utilize maintenance windows by following these steps.
Prerequisites
Configure your cluster for either Auto upgrade channel or Node Auto upgrade channel.
Create Planned maintenance window as mentioned here for your auto upgrade configuration.
How to set up communication manager
- Create an Azure "Logic App" resource. It's used to send auto upgrade event notices to your email.
- Open the created Logic App and click "Logic app designer," then click "Add a trigger" button.
- In the opened "Add a trigger" box, type "http" in the search box, and then select "When an HTTP request is received" trigger.
- In the opened "When an HTTP request is received," click "Use sample payload to generate schema".
- In the opened "Enter or paste a sample JSON payload" box, paste the following JSON data and click "Done" button.
{
"id": "11112222-bbbb-3333-cccc-4444dddd5555",
"topic": "/subscriptions/66667777-aaaa-8888-bbbb-9999cccc0000",
"subject": "/subscriptions/66667777-aaaa-8888-bbbb-9999cccc0000/resourcegroups/comms-test/providers/Microsoft.ContainerService/managedClusters/comms-sp/scheduledEvents/55556666-ffff-7777-aaaa-8888bbbb9999",
"data": {
"resourceInfo": {
"id": "/subscriptions/66667777-aaaa-8888-bbbb-9999cccc0000/resourcegroups/comms-test/providers/Microsoft.ContainerService/managedClusters/comms-sp/scheduledEvents/55556666-ffff-7777-aaaa-8888bbbb9999",
"name": "55556666-ffff-7777-aaaa-8888bbbb9999",
"type": "Microsoft.ContainerService/managedClusters/scheduledEvents",
"location": "westus2",
"properties": {
"description": "ScheduledEvents",
"eventId": "22223333-cccc-4444-dddd-5555eeee6666",
"eventSource": "AutoUprader",
"eventStatus": "Started",
"eventDetails": "Start to upgrade security vhd",
"scheduledTime": "2024-04-16T22:17:12.103268606Z",
"startTime": "0001-01-01T00:00:00.0000000Z",
"lastUpdateTime": "0001-01-01T00:00:00.0000000Z",
"resources": [
"/subscriptions/66667777-aaaa-8888-bbbb-9999cccc0000/resourcegroups/comms-test/providers/Microsoft.ContainerService/managedClusters/comms-sp"
],
"resourceType": "ManagedCluster"
}
},
"operationalInfo": {
"resourceEventTime": "2024-04-16T22:17:12.1032748"
},
"apiVersion": "2023-11-02-preview"
},
"eventType": "Microsoft.ResourceNotifications.MaintenanceResources.ScheduledEventEmitted",
"dataVersion": "1",
"metadataVersion": "1",
"eventTime": "2024-04-16T22:17:12.1032748Z",
"EventProcessedUtcTime": "2024-04-16T22:36:09.9073134Z",
"PartitionId": 0,
"EventEnqueuedUtcTime": "2024-04-16T22:17:13.1700000Z"
}
]
Click the "+" button and "Add an action". Then sign into your preferred email account in outlook.com with password.
In the opened "Add an action" box, type "outlook" in the search box, and then select "Send an email (V2)" action.
- Customize by providing recipient email. Click the Subject and Body fields, and there's a tiny lighting icon which provides encapsulated data fields from the message, to facilitate orchestration of the email content.
- Click the "Save" button.
- Click the "When a HTTP request is received" button and copy the URL in the "HTTP POST URL" field. This URL is used shortly to configure event subscription web hook.
Create ARN system topic and event subscription.
Click "Event Subscription" to create an event subscription of the system topic.
Then fill in the event subscription information, in the "EndPoint Type," choose "Web hook," and configure it using the URL when configure "When a HTTP request is received" trigger.
You can also do it via CLI as shown here
az eventgrid system-topic create --name arnSystemTopic --resource-group testrg --source /subscriptions/TestSub --topic-type microsoft.resourcenotifications.containerserviceeventresources --location global
Configure receive notifications for resources in a resource group, enable subject filtering with the resource group URI.
Verification
Wait for the auto upgrader to start to upgrade the cluster. Then verify if you receive notices promptly on the email configured to receive these notices.
Check Azure Resource Graph database for the scheduled notification record. Each scheduled event notification should be listed as one record in the "containerserviceeventresources" table. !
Next Steps
See how you can set up a planned maintenance window for your upgrades. See how you can optimize your upgrades.
Azure Kubernetes Service