-
Notifications
You must be signed in to change notification settings - Fork 191
feat: Extend AKS skill to perform cluster reviews #2076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
johnbilliris (johnbilliris)
wants to merge
27
commits into
microsoft:main
Choose a base branch
from
johnbilliris:azure-kubernetes-review
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
24252ed
Introduce AKS review skill
johnbilliris b94151d
Fix for tests/skills.json validation failure
johnbilliris 63914d8
Further fix for tests/skills.json validation failure
johnbilliris 39b9284
Apply suggestions from code review
johnbilliris 3ba2854
Apply suggestions from code review
johnbilliris 8bf45c9
Changes from review and feedback
johnbilliris 70e0144
Merge branch 'microsoft:main' into azure-kubernetes-review
johnbilliris f15fb09
Changes to fix charCount and tests
johnbilliris d684565
Merge branch 'microsoft:main' into azure-kubernetes-review
johnbilliris 241f078
azure-kubernetes Day 2 description and trigger moved into reference file
johnbilliris 4674889
fix: shrink azure-kubernetes description to fit Copilot CLI char budget
johnbilliris 3e97d69
Three issues fixed
johnbilliris dade136
Merge branch 'main' into azure-kubernetes-review
johnbilliris 789e8c3
refresh azure-kubernetes trigger snapshots
johnbilliris f1de12a
Merge remote-tracking branch 'upstream/main' into azure-kubernetes-re…
johnbilliris 60a7d58
Merge branch 'microsoft:main' into azure-kubernetes-review
johnbilliris 2720e79
Merge branch 'microsoft:main' into azure-kubernetes-review
johnbilliris dd5f348
Fix for Skill Evaluations
johnbilliris 6d9f192
Merge branch 'microsoft:main' into azure-kubernetes-review
johnbilliris 64fab45
Fixed azure-compute test snapshot
johnbilliris 9aa715f
Merge main into this branch
johnbilliris c49cb3b
Moved report template to correct folder
johnbilliris 0554371
(Manually) Revert azure-compute skill
johnbilliris 38de1ce
Fixes based off PR comments
johnbilliris 91489b0
Reduce char count due to budget
johnbilliris 533e7eb
Merge branch 'azure-kubernetes-review' into main
johnbilliris 71d7eb5
Merge pull request #2 from johnbilliris/main
johnbilliris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| name: azure-kubernetes-review | ||
| display-name: Azure Kubernetes Service Review | ||
|
johnbilliris marked this conversation as resolved.
Outdated
|
||
| license: MIT | ||
| metadata: | ||
| author: johnbilliris | ||
|
johnbilliris marked this conversation as resolved.
Outdated
|
||
| version: "0.0.0-placeholder" | ||
| description: 'Assess an AKS cluster against Microsoft Learn practices and Azure Well-Architected AKS service guide. WHEN: "AKS practices review", "validate AKS posture", "AKS compliance checklist", "AKS remediation report".' | ||
| argument-hint: 'Provide subscription, resource group, AKS cluster name, and kube context.' | ||
|
saikoumudi marked this conversation as resolved.
Outdated
|
||
| --- | ||
|
|
||
| # Azure Kubernetes Service Review | ||
|
saikoumudi marked this conversation as resolved.
Outdated
|
||
|
|
||
| Evidence-driven AKS assessment against [AKS best practices](https://learn.microsoft.com/en-us/azure/aks/best-practices), [Well-Architected AKS guide](https://learn.microsoft.com/en-us/azure/well-architected/service-guides/azure-kubernetes-service), [AKS Checklist](https://www.the-aks-checklist.com/), live diagnostics detectors, and [container best practices](./references/aks-container-best-practices.md). | ||
|
johnbilliris marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## When to Use | ||
|
|
||
| - Audit an AKS cluster against Well-Architected pillars | ||
| - Validate AKS operator and developer best-practice controls | ||
| - Produce command-backed pass/fail findings with remediation | ||
| - Generate a comprehensive Markdown compliance report | ||
|
|
||
| ## Required Inputs | ||
|
|
||
| | Input | Required | Default | | ||
| |-------|----------|---------| | ||
| | `subscriptionId` | Yes | — | | ||
| | `resourceGroup` | Yes | — | | ||
| | `clusterName` | Yes | — | | ||
| | `kubeContext` | Yes | — | | ||
| | `reportOutputPath` | No | `./reports/azure kubernetes review - <clusterName> - <yyyymmddhhmm>.md` | | ||
| | `namespaceFilter` | No | all | | ||
| | `nodePoolFilter` | No | all | | ||
| | `excludeChecks` | No | none | | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. **Establish scope** — Confirm cluster identity, state in/out-of-scope, record limitations. See [Scope & Checklist](./references/workflow-scope-and-checklist.md). | ||
| 2. **Load canonical checklist** — Use [AKS Checklist Matrix](./references/aks-checklist-matrix.md) with Microsoft Learn precedence. See [Scope & Checklist](./references/workflow-scope-and-checklist.md). | ||
| 3. **Run diagnostics detectors** — Query 8 core + supplemental categories via AKS MCP or `az rest`. See [Diagnostics Workflow](./references/workflow-diagnostics.md). | ||
| 4. **Collect warning events** — Gather Warning-type Kubernetes events per namespace, correlate to workloads, deep-dive probe failures. See [Warning Events Workflow](./references/workflow-warning-events.md). | ||
| 5. **Run container assessment** — Execute all `CTR-*` checks. See [Container Assessment Workflow](./references/workflow-container-assessment.md). | ||
| 6. **Run validation commands** — Execute `az`/`kubectl` checks, determine pass/fail per checklist item. See [Validation & Findings](./references/workflow-validation-and-findings.md). | ||
| 7. **Produce detailed findings** — Build analysis tables, rollups, diagnostics impact, container results, warning events. See [Validation & Findings](./references/workflow-validation-and-findings.md). | ||
| 8. **Generate report** — Fill [AKS Audit Report Template](./assets/aks-audit-report-template.md). See [Report Generation](./references/workflow-report.md). | ||
| 9. **Quality gates** — Verify completeness. See [Quality Gates & Decision Logic](./references/quality-gates.md). | ||
|
|
||
| ## Decision Logic | ||
|
|
||
| See [Quality Gates & Decision Logic](./references/quality-gates.md) for full rules. Key principles: | ||
|
|
||
| - If `az` unavailable → `kubectl` only, mark Azure checks `Not assessed` | ||
| - If `kubectl` unavailable → `az aks command invoke`, then `Not assessed` | ||
| - If MCP unavailable → `az rest`, then `Not assessed` | ||
| - Never infer `Meets` from absent evidence | ||
|
|
||
| ## MCP Tools | ||
|
|
||
| | Tool | Purpose | | ||
| |------|---------| | ||
| | `mcp_azure_mcp_aks` | AKS MCP entry point — discover callable AKS tools | | ||
|
|
||
| ## Error Handling | ||
|
|
||
| | Error | Cause | Fix | | ||
| |-------|-------|-----| | ||
| | MCP tool fails/times out | Invalid credentials or context | Verify `az login`, confirm subscription with `az account show` | | ||
|
|
||
| ## Output | ||
|
|
||
| One Markdown file at `reportOutputPath`: `Azure Kubernetes Service Review - <clusterName> - <yyyymmddhhmm>.md` | ||
|
|
||
| ## Guardrails | ||
|
|
||
| - Do not skip execution of any checklist, matrix, detector or workflow step. | ||
| - ALL diagnostics detectors MUST be run to surface evidence and findings. Do not skip or cherry-pick based on expected outcomes. Do not skip even if they are expected to return no findings. Do not skip even if you think it would be inefficient. | ||
| - Do not request or output secrets (tokens, keys). | ||
| - Follow this skill's instructions and [template](./assets/aks-audit-report-template.md) only — no other scripts or existing reports | ||
| - Place temporary files in `<reportOutputPath>/<clusterName> - <yyyymmddhhmm>/` | ||
|
johnbilliris marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## References | ||
|
|
||
| - [AKS Checklist Matrix](./references/aks-checklist-matrix.md) | ||
| - [AKS Diagnostics Detectors](./references/aks-diagnostics-detectors.md) | ||
| - [AKS Container Best Practices](./references/aks-container-best-practices.md) | ||
| - [AKS Audit Report Template](./assets/aks-audit-report-template.md) | ||
| - [Scope & Checklist Workflow](./references/workflow-scope-and-checklist.md) | ||
| - [Diagnostics Workflow](./references/workflow-diagnostics.md) | ||
| - [Warning Events Workflow](./references/workflow-warning-events.md) | ||
| - [Container Assessment Workflow](./references/workflow-container-assessment.md) | ||
| - [Validation & Findings](./references/workflow-validation-and-findings.md) | ||
| - [Report Generation](./references/workflow-report.md) | ||
| - [Quality Gates & Decision Logic](./references/quality-gates.md) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.