https://pulumi.com logo
Title
b

better-shampoo-48884

03/30/2021, 1:43 PM
Anyone know how I can turn on and configure diagnostics on an AKS cluster? I see it for containerservice but not managedcluster..
👍 1
k

kind-mechanic-53546

04/19/2021, 3:21 AM
This should do it for a blob storage account
const enabledLogs = [
    "kube-apiserver",
    "kube-controller-manager",
    "kube-scheduler",
    "kube-audit",
    "kube-audit-admin",
    "cluster-autoscaler",
    "guard",
  ];

// Enable the Monitoring Diagonostic control plane component logs and AllMetrics
  const azMonitoringDiagnostic = new azure.monitoring.DiagnosticSetting(
    conf.commonConfig.nameClean,
    {
      storageAccountId: >>>acc<<<,
      targetResourceId: : >>>clusterId<<<,
      logs: enabledLogs.map((category) => ({
        category,
        enabled: true,
        retentionPolicy: { enabled: true },
      })),
      metrics: [
        {
          category: "AllMetrics",
          retentionPolicy: { enabled: true },
        },
      ],
    }
  );
b

better-shampoo-48884

04/19/2021, 7:12 AM
Ah excellent! Thanks!