Skip to content

Latest commit

 

History

History
172 lines (116 loc) · 17.7 KB

eslz-arc-kubernetes-cost-governance.md

File metadata and controls

172 lines (116 loc) · 17.7 KB
title description author ms.author ms.date ms.topic ms.custom
Cost governance for Azure Arc-enabled Kubernetes
Learn design considerations and recommendations for cost governance for Azure Arc-enabled Kubernetes.
sebassem
sebassem
04/29/2022
conceptual
e2e-hybrid, think-tank, e2e-arc-enabled-kubernetes

Cost governance for Azure Arc-enabled Kubernetes

Cost governance is the continuous process of implementing policies to control the costs of services you use in Azure. This document provides cost governance considerations and recommendations for you to keep in mind while using Azure Arc-enabled Kubernetes.

Cost of Azure Arc-enabled Kubernetes

Azure Arc-enabled Kubernetes provides two types of services:

Note

Billing for Azure services used in conjunction with Azure Arc-enabled Kubernetes is the same as billing for the Azure Kubernetes Service.

Note

If your Azure Arc-enabled Kubernetes cluster is on AKS on Azure Stack HCI, Kubernetes GitOps configuration is included at no extra charge.

Design considerations

  • Governance: Define a governance plan for your hybrid clusters that translates into Azure Policies, tags, naming standards and least-privilege controls.

  • Azure Monitor Container Insights: Azure Monitor Container Insights provides telemetry visibility by collecting performance metrics from controllers, nodes, and containers available in Kubernetes through the Metrics API. Container logs are also collected. This is billed by data ingestion, retention, and exports.

  • Microsoft Defender for Cloud: Microsoft Defender for Cloud is offered in two modes:

    Without enhanced security features (Free) - Microsoft Defender for Cloud is enabled for free on all your Azure subscriptions when you visit the workload protection dashboard in the Azure portal for the first time, or if you enable it programmatically via API. This free mode provides the secure score and its related features: security policy, continuous security assessment, and actionable security recommendations for your Azure resources.

    With all enhanced security features (Paid) - Enabling Microsoft Defender for Cloud enhanced security extends the capabilities of free mode to workloads running in private and other public clouds, providing unified security management and threat protection across your hybrid cloud workloads.

  • Kubernetes GitOps configuration: Kubernetes GitOps configuration delivers configuration management and application deployment using GitOps. Admins can declare their cluster configuration and applications in Git. Development teams can then use pull requests and other tools they're familiar with (existing Azure Pipelines, Git, Kubernetes manifests, Helm charts) to easily deploy applications into Azure Arc-enabled Kubernetes clusters and make updates in production. Billing is charged monthly and is based on the number of vCPUs/hour in your cluster. Clusters incur a single charge for configuration management, no matter how many repositories are connected.

    [!Note] Clusters can function without a constant connection to Azure. When disconnected, each cluster’s charge is determined based on the last known number of vCPUs that were registered with Azure Arc. The vCPU count is updated every 5 minutes while your cluster is connected to Azure. Each cluster's first 6 vCPUs are included at no cost.

    If your cluster will be disconnected from Azure and you don’t want to be charged for Kubernetes configurations, you can delete the configurations.

  • Azure Policy for Kubernetes: Azure Policy for Kubernetes extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner. Azure Policy makes it possible to manage and report on the compliance state of your Kubernetes clusters from one place. There's currently no cost for Azure Policy for Kubernetes while in public preview.

  • Microsoft Sentinel: Microsoft Sentinel provides intelligent security analytics across your enterprise. The data for its analysis is stored in an Azure Monitor Log Analytics workspace. Microsoft Sentinel is billed based on the volume of data ingested for analysis in Microsoft Sentinel and stored in the Azure Monitor Log Analytics workspace for your Azure Arc-enabled Kubernetes clusters.

  • Azure Key Vault: The Azure Key Vault Provider for Secrets Store CSI Driver allows for the integration of an Azure Key Vault as a store of secrets with a Kubernetes cluster via a CSI volume. Azure Key Vault is billed by the operations performed on certificates, keys, and secrets.

Design recommendations

The following sections contain design recommendations for Azure Arc-enabled Kubernetes cost governance.

Note

Pricing information shown in the provided screenshots are examples and provided to allow a demonstrating Azure Calculator, and don't reflect the actual pricing information you might see in your own Azure Arc deployments.

Governance

  • Review the recommendations in the resource organization and governance disciplines critical design area to implement a governance strategy, organize your resources for better cost control and visibility, and avoid unnecessary costs by using the least privileged access model for onboarding and management.

Azure Monitor for Containers

  • Review the Management and monitoring critical design area to plan your monitoring strategy and decide on your requirements for monitoring Azure Arc-enabled Kubernetes clusters to optimize costs.

  • Review Azure Monitor for Containers pricing.

  • Use the Azure Pricing Calculator to get an estimate of Azure Arc-enabled Kubernetes monitoring costs for Azure Log Analytics ingestion, alerts, and notifications.

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-pricing-calculator.png" alt-text="A screenshot showing Azure Pricing Calculator." lightbox="./media/arc-enabled-kubernetes-cost-pricing-calculator.png" border="true":::

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-pricing-calculator-az-monitor.png" alt-text="A screenshot showing Azure Pricing Calculator Azure Monitor." lightbox="./media/arc-enabled-kubernetes-cost-pricing-calculator-az-monitor.png" border="true":::

  • Use Microsoft Cost Management to view the costs of Azure Monitor for Containers.

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-billing.png" alt-text="A screenshot showing Microsoft Cost Management." lightbox="./media/arc-enabled-kubernetes-cost-billing.png" border="true":::

  • Use the Log Analytics workspace insights solution to gain insights on monitored Azure Kubernetes clusters, collected logs, and their integration rate so you can avoid unnecessary ingestion costs.

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-log-analytics-insights.png" alt-text="A screenshot showing Log Analytics insights." lightbox="./media/arc-enabled-kubernetes-cost-log-analytics-insights.png" border="true":::

  • Use built-in Azure Monitor workbooks to understand your clusters' billable monitoring data.

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-monitor-workbooks.png" alt-text="A screenshot showing Azure Monitor workbook showing namespace billing." lightbox="./media/arc-enabled-kubernetes-cost-monitor-workbooks.png" border="true":::

  • Review tips for reducing Log Analytics ingestion data volume to help you properly configure data ingestion.

  • Consider how long you should retain data in Log Analytics. Data ingested into the Log Analytics workspace can be retained for no extra charge up through the first 31 days. Consider general needs when configuring the Log Analytics workspace level default retention and specific needs when configuring data retention by data type, which can be as low as four days. For example, while performance data might only need to be retained for a short time, security logs often need to be retained longer.

  • Consider using Log Analytics workspace data export to retain data for longer than 730 days.

  • Consider using Commitment Tier pricing based on your data ingestion volume.

Microsoft Defender for Cloud (formerly known as Azure Security Center)

Kubernetes GitOps configuration

  • Review Kubernetes GitOps configuration pricing.

  • Review the CI/CD workflow critical design area to find best practices and recommendations for managing and monitoring Kubernetes GitOps configuration on your Azure Arc-enabled Kubernetes clusters.

  • Use Azure Policy for Kubernetes to enforce and ensure consistent configuration across all your Azure Arc-enabled Kubernetes clusters.

  • Use Azure Resource Graph queries to review the number of cores you have for Azure Arc-enabled Kubernetes clusters and estimate the cost of enabling Kubernetes GitOps configuration.

    Resources
    | extend AgentVersion=properties.agentVersion, KubernetesVersion=properties.kubernetesVersion, Distribution= properties.distribution,Infrastructure=properties.infrastructure, NodeCount=properties.totalNodeCount,TotalCoreCount=toint(properties.totalCoreCount)
    | project id, subscriptionId, location, type,AgentVersion ,KubernetesVersion ,Distribution,Infrastructure ,NodeCount , TotalCoreCount
    | where type =~ 'Microsoft.Kubernetes/connectedClusters'
    | order by TotalCoreCount
  • Use Microsoft Cost Management to understand Kubernetes GitOps configuration costs.

    :::image type="content" source="./media/arc-enabled-kubernetes-configuration-cost.png" alt-text="A screenshot showing Kubernetes GitOps configuration cost in Azure portal." lightbox="./media/arc-enabled-kubernetes-configuration-cost.png" border="true":::

Azure Policy for Kubernetes

Microsoft Sentinel

Azure Key Vault

  • Review Azure Key Vault pricing.

  • Review recommendations for security and governance to understand how you can use Azure Key vault to manage secrets and certificates on your Azure Arc-enabled Kubernetes clusters.

  • Use Azure Key Vault insights to monitor secrets operations.

    :::image type="content" source="./media/arc-enabled-kubernetes-cost-key-vault-insights.png" alt-text="A screenshot showing Azure Key Vault insights" lightbox="./media/arc-enabled-kubernetes-cost-key-vault-insights.png" border="true":::

Next steps

For more information about your hybrid and multicloud cloud journey, see the following articles: