Skip to content

Commit de30ba8

Browse files
committed
update doc and release history
1 parent e04537d commit de30ba8

File tree

4 files changed

+65
-131
lines changed

4 files changed

+65
-131
lines changed

src/aks-agent/HISTORY.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414

15+
1.0.0b12
16+
++++++++
17+
* [BREAKING CHANGE]:
18+
* aks-agent is now containerized and deployed per Kubernetes cluster along with a managed aks-mcp instance
19+
* aks-agent is deployed on the AKS cluster as Helm charts during `az aks agent-init`
20+
* aks agent commands now require --resource-group and --name parameters to specify the target AKS cluster
21+
* Add `az aks agent-cleanup` to cleanup the AKS agent from the cluster
22+
* [SECURITY]:
23+
* Kubernetes RBAC: Uses cluster roles to securely access Kubernetes resources with least-privilege principles
24+
* Azure Workload Identity: Supports Azure workload identity for secure, keyless access to Azure resources
25+
* LLM credentials are stored securely in Kubernetes secrets with encryption at rest
26+
1527
1.0.0b11
1628
++++++++
1729
* Fix(agent-init): replace max_tokens with max_completion_tokens for connection check of Azure OpenAI service.

src/aks-agent/README.rst

Lines changed: 36 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,34 @@ Introduction
77

88
The AKS Agent extension provides the "az aks agent" command, an AI-powered assistant that helps analyze and troubleshoot Azure Kubernetes Service (AKS) clusters using Large Language Models (LLMs). The agent combines cluster context, configurable toolsets, and LLMs to answer natural-language questions about your cluster (for example, "Why are my pods not starting?") and can investigate issues in both interactive and non-interactive (batch) modes.
99

10-
New in this version: **az aks agent-init** command for easy LLM model configuration!
10+
New in this version: **az aks agent-init** command for containerized agent deployment!
1111

12-
You can now use `az aks agent-init` to interactively add and configure LLM models before asking questions. This command guides you through the setup process, allowing you to add multiple models as needed. When asking questions with `az aks agent`, you can:
12+
The `az aks agent-init` command deploys the AKS agent as a Helm chart directly in your AKS cluster with enterprise-grade security:
1313

14-
- Use `--config-file` to specify your own model configuration file
15-
- Use `--model` to select a previously configured model
16-
- If neither is provided, the last configured LLM will be used by default
14+
- **Kubernetes RBAC**: Uses cluster roles to securely access Kubernetes resources with least-privilege principles
15+
- **Workload Identity**: Leverages Azure workload identity for secure, keyless access to Azure resources
16+
- **Interactive LLM Configuration**: Guides you through setting up LLM models with encrypted storage in Kubernetes secrets
1717

18-
This makes it much easier to manage and switch between multiple models for your AKS troubleshooting workflows.
18+
When asking questions with `az aks agent`:
19+
20+
- The agent automatically uses the last configured model
21+
- Use `--model` to select a specific model when you have multiple models configured
22+
23+
This architecture provides better security, scalability, and manageability for production AKS troubleshooting workflows.
1924

2025
Key capabilities
2126
----------------
2227

2328

29+
- **Containerized Deployment**: Agent runs as a Helm chart in your AKS cluster with `az aks agent-init`.
30+
- **Secure Access**: Uses Kubernetes RBAC for cluster resources and Azure workload identity for Azure resources.
31+
- **LLM Configuration**: Interactively configure LLM models with credentials stored securely in Kubernetes secrets.
32+
- Support for multiple LLM providers (Azure OpenAI, OpenAI, Anthropic, Gemini, etc.).
33+
- Automatically uses the last configured model by default.
34+
- Optionally use --model to select a specific model when you have multiple models configured.
2435
- Interactive and non-interactive modes (use --no-interactive for batch runs).
25-
- Support for multiple LLM providers (Azure OpenAI, OpenAI, etc.) via interactive configuration.
26-
- **Easy model setup with `az aks agent-init`**: interactively add and configure LLM models, run multiple times to add more models.
27-
- Configurable via a JSON/YAML config file provided with --config-file, or select a model with --model.
28-
- If no config or model is specified, the last configured LLM is used automatically.
2936
- Control echo and tool output visibility with --no-echo-request and --show-tool-output.
3037
- Refresh the available toolsets with --refresh-toolsets.
31-
- Stay in traditional toolset mode by default, or opt in to aks-mcp integration with ``--aks-mcp`` when you need the enhanced capabilities.
3238

3339
Prerequisites
3440
-------------
@@ -37,98 +43,6 @@ For more details about supported model providers and required
3743
variables, see: https://docs.litellm.ai/docs/providers
3844

3945

40-
LLM Configuration Explained
41-
---------------------------
42-
43-
The AKS Agent uses YAML configuration files to define LLM connections. Each configuration contains a provider specification and the required environment variables for that provider.
44-
45-
Configuration Structure
46-
^^^^^^^^^^^^^^^^^^^^^^^^
47-
48-
.. code-block:: yaml
49-
50-
llms:
51-
- provider: azure
52-
MODEL_NAME: gpt-4.1
53-
AZURE_API_KEY: *******
54-
AZURE_API_BASE: https://{azure-openai-service}.openai.azure.com/
55-
AZURE_API_VERSION: 2025-04-01-preview
56-
57-
Field Explanations
58-
^^^^^^^^^^^^^^^^^^
59-
60-
**provider**
61-
The LiteLLM provider route that determines which LLM service to use. This follows the LiteLLM provider specification from https://docs.litellm.ai/docs/providers.
62-
63-
Common values:
64-
65-
* ``azure`` - Azure OpenAI Service
66-
* ``openai`` - OpenAI API and OpenAI-compatible APIs (e.g., local models, other services)
67-
* ``anthropic`` - Anthropic Claude
68-
* ``gemini`` - Google's Gemini
69-
* ``openai_compatible`` - OpenAI-compatible APIs (e.g., local models, other services)
70-
71-
**MODEL_NAME**
72-
The specific model or deployment name to use. This varies by provider:
73-
74-
* For Azure OpenAI: Your deployment name (e.g., ``gpt-4.1``, ``gpt-35-turbo``)
75-
* For OpenAI: Model name (e.g., ``gpt-4``, ``gpt-3.5-turbo``)
76-
* For other providers: Check the specific model names in LiteLLM documentation
77-
78-
**Environment Variables by Provider**
79-
80-
The remaining fields are environment variables required by each provider. These correspond to the authentication and configuration requirements of each LLM service:
81-
82-
**Azure OpenAI (provider: azure)**
83-
* ``AZURE_API_KEY`` - Your Azure OpenAI API key
84-
* ``AZURE_API_BASE`` - Your Azure OpenAI endpoint URL (e.g., https://your-resource.openai.azure.com/)
85-
* ``AZURE_API_VERSION`` - API version (e.g., 2024-02-01, 2025-04-01-preview)
86-
87-
**OpenAI (provider: openai)**
88-
* ``OPENAI_API_KEY`` - Your OpenAI API key (starts with sk-)
89-
90-
**Gemini (provider: gemini)**
91-
* ``GOOGLE_API_KEY`` - Your Google Cloud API key
92-
* ``GOOGLE_API_ENDPOINT`` - Base URL for the Gemini API endpoint
93-
94-
**Anthropic (provider: anthropic)**
95-
* ``ANTHROPIC_API_KEY`` - Your Anthropic API key
96-
97-
**OpenAI Compatible (provider: openai_compatible)**
98-
* ``OPENAI_API_BASE`` - Base URL for the API endpoint
99-
* ``OPENAI_API_KEY`` - API key (if required by the service)
100-
101-
Multiple Model Configuration
102-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103-
104-
You can configure multiple models in a single file:
105-
106-
.. code-block:: yaml
107-
108-
llms:
109-
- provider: azure
110-
MODEL_NAME: gpt-4
111-
AZURE_API_KEY: your-azure-key
112-
AZURE_API_BASE: https://your-azure-endpoint.openai.azure.com/
113-
AZURE_API_VERSION: 2024-02-01
114-
- provider: openai
115-
MODEL_NAME: gpt-4
116-
OPENAI_API_KEY: your-openai-key
117-
- provider: anthropic
118-
MODEL_NAME: claude-3-sonnet-20240229
119-
ANTHROPIC_API_KEY: your-anthropic-key
120-
121-
When using ``--model``, specify the provider and model as ``provider/model_name`` (e.g., ``azure/gpt-4``, ``openai/gpt-4``).
122-
123-
Security Note
124-
^^^^^^^^^^^^^
125-
126-
API keys and credentials in configuration files should be kept secure. Consider using:
127-
128-
* Restricted file permissions (``chmod 600 config.yaml``)
129-
* Environment variable substitution where supported
130-
* Separate configuration files for different environments (dev/prod)
131-
13246
Quick start and examples
13347
=========================
13448

@@ -139,14 +53,21 @@ Install the extension
13953
14054
az extension add --name aks-agent
14155
142-
Configure LLM models interactively
143-
----------------------------------
56+
Initialize and configure the AKS agent
57+
---------------------------------------
14458

14559
.. code-block:: bash
14660
147-
az aks agent-init
61+
az aks agent-init --resource-group MyResourceGroup --name MyManagedCluster
62+
63+
This command will configure the LLM configuration and:
14864

149-
This command will guide you through adding a new LLM model. You can run it multiple times to add more models or update existing models. All configured models are saved locally and can be selected when asking questions.
65+
1. Guide you through LLM model configuration with credentials stored securely in Kubernetes secrets
66+
2. Deploy the AKS agent Helm chart in your cluster
67+
3. Configure Kubernetes RBAC for secure cluster resource access
68+
4. Optionally configure Azure workload identity for Azure resource access
69+
70+
You can run it multiple times to update configurations or add more models.
15071

15172
Run the agent (Azure OpenAI example) :
15273
-----------------------------------
@@ -163,12 +84,6 @@ Run the agent (Azure OpenAI example) :
16384
16485
az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup --model azure/my-gpt4.1-deployment
16586
166-
**3. Use a custom config file:**
167-
168-
.. code-block:: bash
169-
170-
az aks agent "Why are my pods not starting?" --config-file /path/to/your/model_config.yaml
171-
17287
17388
Run the agent (OpenAI example)
17489
------------------------------
@@ -185,34 +100,27 @@ Run the agent (OpenAI example)
185100
186101
az aks agent "Why are my pods not starting?" --name MyManagedCluster --resource-group MyResourceGroup --model gpt-4o
187102
188-
**3. Use a custom config file:**
189-
190-
.. code-block:: bash
191-
192-
az aks agent "Why are my pods not starting?" --config-file /path/to/your/model_config.yaml
193-
194103
Run in non-interactive batch mode
195104
---------------------------------
196105

197106
.. code-block:: bash
198107
199108
az aks agent "Diagnose networking issues" --no-interactive --max-steps 15 --model azure/my-gpt4.1-deployment
200109
201-
Opt in to MCP mode
202-
------------------
110+
Clean up the AKS agent
111+
-----------------------
203112

204-
Traditional toolsets remain the default. Enable the aks-mcp integration when you want the enhanced toolsets by passing ``--aks-mcp``. You can return to traditional mode on a subsequent run with ``--no-aks-mcp``.
113+
To uninstall the AKS agent and clean up all Kubernetes resources:
205114

206115
.. code-block:: bash
207116
208-
az aks agent --aks-mcp "Check node health with MCP" --name MyManagedCluster --resource-group MyResourceGroup --model azure/my-gpt4.1-deployment
117+
az aks agent-cleanup --resource-group MyResourceGroup --name MyManagedCluster
209118
210-
Using a configuration file
211-
--------------------------
119+
This command will:
212120

213-
Pass a config file with --config-file to predefine model, credentials, and toolsets. See
214-
the example config and more detailed examples in the help definition at
215-
`src/aks-agent/azext_aks_agent/_help.py`.
121+
1. Uninstall the AKS agent Helm chart from your cluster
122+
2. Remove all associated Kubernetes resources (deployments, pods, secrets, RBAC configurations)
123+
3. Clean up the LLM configuration secrets
216124

217125
More help
218126
---------
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{"version": 2, "width": 229, "height": 61, "timestamp": 1765092638, "env": {"SHELL": "/usr/bin/zsh", "TERM": "xterm-256color"}}
2+
[0.224346, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
3+
[0.226405, "o", "\u001b]2;azureuser@qinhao-dev:~/code/azure-cli-extensions/src/aks-agent\u0007\u001b]1;..src/aks-agent\u0007"]
4+
[0.227876, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;32m➜ \u001b[36maks-agent\u001b[00m \u001b[K"]
5+
[0.228188, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
6+
[0.354245, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;32m➜ \u001b[36maks-agent\u001b[00m \u001b[01;34mgit:(\u001b[31mcontainerized-aks-agent\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
7+
[2.065365, "o", "e"]
8+
[2.463113, "o", "\b \b"]
9+
[5.902503, "o", "\u001b[?2004l\r\r\n"]
10+
[5.903841, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
11+
[5.90555, "o", "\u001b]2;azureuser@qinhao-dev:~/code/azure-cli-extensions/src/aks-agent\u0007\u001b]1;..src/aks-agent\u0007"]
12+
[5.906844, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36maks-agent\u001b[00m \u001b[01;34mgit:(\u001b[31mcontainerized-aks-agent\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
13+
[5.907222, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
14+
[11.92265, "o", "\r\r\nfwd-i-search: _\u001b[K\u001b[A\u001b[30C"]
15+
[13.53107, "o", "\u001b[?2004l\u001b[1B\r\u001b[K\u001b[A\u001b[45C\u001b[1B\r"]

src/aks-agent/setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "1.0.0b11"
12+
VERSION = "1.0.0b12"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",
@@ -25,8 +25,7 @@
2525

2626
DEPENDENCIES = [
2727
"rich==13.9.4",
28-
"supabase==2.8.0",
29-
"holmesgpt==0.15.0; python_version >= '3.10'",
28+
"kubernetes",
3029
]
3130

3231
with open1("README.rst", "r", encoding="utf-8") as f:

0 commit comments

Comments
 (0)