Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Azure Kubernetes Cluster Logs
Azure Kubernetes Cluster Logs

Azure Kubernetes Cluster Logs

Akhil Sharma

|
18 installs
| (1) | Free
Task to get the pod logs and describe of deployments & services from the selected AKS Cluster
Get it free

Azure Kubernetes Cluster Logs

Overview

This Azure DevOps extension retrieves logs from all pods, describes deployments and services in a specified Kubernetes namespace, and saves them as separate text files named after each resource. Authentication is handled using Azure CLI.

Features

  • Authenticates to an Azure Kubernetes Service (AKS) cluster using Azure CLI.
  • Retrieves logs of all pods in a given namespace.
  • Describes deployments and services within the specified namespace.
  • Saves each log or description as a separate file named after the respective pod, deployment, or service.
  • All logs are saved at Build.ArtifactStagingDirectory

Prerequisites

Before using this extension, ensure you have the following:

  • An Azure subscription with an existing AKS cluster.
  • Azure CLI installed and authenticated.
  • kubectl installed and configured.
  • An Azure DevOps service connection with appropriate permissions to access the AKS cluster.

Inputs

This extension requires the following inputs:

Parameter Required Description
azureSubscription Yes Azure subscription ID for authentication.
resourceGroup Yes The resource group containing the AKS cluster.
clusterName Yes The name of the target AKS cluster.
namespace No The Kubernetes namespace to target (default: default).

Installation

To use this extension in your Azure DevOps pipeline:

  1. Add this task to your pipeline YAML.
  2. Configure the necessary inputs as per the above table.
  3. Run the pipeline to collect logs and descriptions.

Usage

This extension performs the following steps:

  1. Logs into Azure using service principal credentials.
  2. Sets the specified Azure subscription.
  3. Fetches credentials for the AKS cluster.
  4. Retrieves logs for all pods in the namespace and saves them as <pod_name>.log.
  5. Describes all deployments in the namespace and saves them as <deployment_name>.txt.
  6. Describes all services in the namespace and saves them as <service_name>.txt.

Example

Below is an example YAML snippet to use this extension in an Azure DevOps pipeline:

steps:
  - task: <Extension Full Name>@<Extension Version>
    displayName: 'Collect AKS Logs and Descriptions'
    inputs:
      azureSubscription: 'MyAzureSubscription'
      resourceGroup: 'MyResourceGroup'
      clusterName: 'MyAKSCluster'
      namespace: 'mynamespace'

Support

For issues, feature requests, or questions, please create an issue in the GitHub repository or reach out at info@akhilsharma.top.

Contributing

This extension is maintained by Akhil Sharma. While the extension is free to use, any modifications, copies, or reuse of its code or functionality require prior written approval from the author.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft