You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'This prompt is used to check the health status of nodes in an Azure Kubernetes Service (AKS) cluster.'
4
+
---
5
+
6
+
# Check for AKS Nodes Health Issues
7
+
8
+
Check the health status of all nodes in an Azure Kubernetes Service (AKS) cluster and identify any nodes that are not in a 'Ready' state. Provide a summary of the issues found and suggest possible remediation steps.
9
+
10
+
### Run these Commands
11
+
12
+
```bash
13
+
kubectl get nodes
14
+
kubectl describe node <node-name>
15
+
kubectl top nodes
16
+
kubectl cluster-info
17
+
```
18
+
19
+
20
+
### Output
21
+
The output a report in a readable format (e.g., plain text, JSON) that includes:
22
+
- Cluster Name
23
+
- Node Name
24
+
- Node Status
25
+
- Issues Found (if any)
26
+
- Suggested Remediation Steps
27
+
28
+
### Remediation Suggestions
29
+
For nodes that are not in the 'Ready' state, suggest possible remediation steps such as:
30
+
- Checking for resource constraints (CPU, memory)
31
+
- Reviewing node logs for errors
32
+
- Scaling the cluster if resource limits are being hit
33
+
- Contacting Azure support if the issue persists
34
+
35
+
### Note
36
+
Ensure that you have the necessary permissions to access the AKS clusters and perform the required operations.
description: 'This prompt is used to check the health status of pods in an Azure Kubernetes Service (AKS) cluster.'
4
+
---
5
+
6
+
# Check for Pod Health Issues
7
+
8
+
Check the health status of all pods in an Azure Kubernetes Service (AKS) cluster and identify any pods that are not in a 'Running' state. Provide a summary of the issues found and suggest possible remediation steps.
9
+
10
+
### Run these Commands
11
+
12
+
```bash
13
+
kubectl get pods -n <namespace>
14
+
kubectl describe pod <pod-name> -n <namespace>
15
+
kubectl logs <pod-name> -n <namespace>
16
+
```
17
+
18
+
### Output
19
+
The output a report in a readable format (e.g., plain text, JSON) that includes:
20
+
- Cluster Name
21
+
- Pod Name
22
+
- Pod Status
23
+
- Issues Found (if any)
24
+
- Suggested Remediation Steps
25
+
26
+
### Remediation Suggestions
27
+
For pods that are not in the 'Running' state, suggest possible remediation steps such as:
28
+
- Checking for resource constraints (CPU, memory)
29
+
- Reviewing pod logs for errors
30
+
- Scaling the cluster if resource limits are being hit
31
+
- Redeploying the pod if it is in a crash loop
32
+
33
+
### Note
34
+
Do not generate any scripts.
35
+
Do not directly fix the issues; only provide analysis and suggestions.
description: 'This prompt is used to provide remediation suggestions for pods in an Azure Kubernetes Service (AKS) cluster.'
4
+
---
5
+
6
+
# AKS Remediation for cluster issues
7
+
8
+
Provide remediation based on analysis and suggestions from the previous steps.
9
+
10
+
### Proposed Remediation Steps
11
+
Be specific in your remediation suggestions, including commands to run, configuration changes to make, or resources to consult. Tailor the suggestions based on the identified issues.
12
+
13
+
# Notes
14
+
- Do not generate any scripts.
15
+
- Always ask for confirmation before applying any remediation steps.
Kubernetes becomes the operational choke point and your team in having a hard time dealing with misconfigurations, failed deployments and runtime issues.
5
+
Your team, platform engineering, is busy firefight instead of improving the platform. The deep Kubernetes expertise on your team doesn't scale across teams.
6
+
7
+
Answer:
8
+
Let agents give your team a hand, turning a siloed operational knowledge into a shared capability.
9
+
10
+
## Crawl
11
+
12
+
A Senior member of the team (Steve) has created a reusable prompts that can run arbitrarily when someone needs to troubleshoot a container workload on an AKS cluster. Steve made this available in the repo and this can be used in GitHub Copilot in VSCode via "Slash Commands" if you follow the folder/naming convension set out by GitHub/VScode (i.e. `<repo-root>/.github/prompts/<prompt-name>.prompt.md`).
13
+
14
+
Execute this prompt locally:
15
+
16
+

17
+
18
+
## Walk/Run
19
+
20
+
Create a GitHub Action Workflow that will be called upon for each push to the repo. For this example it will be just for the main branch, but you can set up the triggers/rules for when the workflow gets run. See the docs about [Events That Trigger Workflows](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows).
21
+
22
+
> [!NOTE]
23
+
> We will use the GitHub Copilot CLI to automate the execution of our custom prompt in a scripted CI Runner - GitHub Actions.
24
+
25
+
We have an example of this in [Act-2 .github/workflows](../.github/workflows/copilot.generate-docs.yml).
26
+
27
+
### What does this do?
28
+
29
+
- The GitHub Action Workflow triggers on each push to the main branch - this ensures that documentation is created, if and when needed regardless if you remembered or not. This ensures that all team members have docs created for them, even if they did not run the `/write-docs` prompt manually before committing their changes. It also can be run manually in GitHub Actions since it also has the `workflow_dispatch` trigger enabled...this is optional of course but we have it here as an example anyways.
30
+
- It installs the GitHub Copilot CLI
31
+
- It ensures that we provide it credentials to call GitHub Copilot
32
+
> [!NOTE]
33
+
> Currently calling GitHub Copilot is a User only ability - meaning that GitHub Copilot is licensed to and therefore only callable by a human user account. In this example we have stored a Fine-Grained GitHub Personal Access Token (PAT -> a user bound API Key) that has been scoped with the `Copilot-Requests: Read-only` Permission. As such this will consume GitHub Copilot PRUs (Premium Request Units) from the tied user account. Today this is the only billing model to consume GitHub Copilot.
34
+
- Store the required prompt file contents as an environment variable
35
+
- Pass in the prompt and call GitHub Copilot CLI to generate docs
0 commit comments