|
| 1 | +Azure CLI AKS SREClaw Extension |
| 2 | +================================ |
| 3 | + |
| 4 | +This extension provides commands to manage AKS SREClaw, an autonomous AI-powered troubleshooting assistant for Azure Kubernetes Service clusters. |
| 5 | + |
| 6 | +Installation |
| 7 | +------------ |
| 8 | + |
| 9 | +To install the extension: |
| 10 | + |
| 11 | +.. code-block:: bash |
| 12 | +
|
| 13 | + az extension add --name aks-sreclaw |
| 14 | +
|
| 15 | +Usage |
| 16 | +----- |
| 17 | + |
| 18 | +Deploy SREClaw to your AKS cluster |
| 19 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 | + |
| 21 | +Initialize and deploy SREClaw with interactive LLM configuration: |
| 22 | + |
| 23 | +.. code-block:: bash |
| 24 | +
|
| 25 | + az aks claw create --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 26 | +
|
| 27 | +This command will: |
| 28 | + |
| 29 | +1. Prompt you to select an LLM provider (Azure OpenAI or OpenAI) |
| 30 | +2. Guide you through entering model names and API credentials |
| 31 | +3. Validate the connection to your LLM provider |
| 32 | +4. Prompt for a Kubernetes service account name |
| 33 | +5. Deploy the SREClaw helm chart to your cluster |
| 34 | +6. Wait for pods to be ready (up to 5 minutes) |
| 35 | + |
| 36 | +Deploy without waiting for completion |
| 37 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 38 | + |
| 39 | +.. code-block:: bash |
| 40 | +
|
| 41 | + az aks claw create --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system --no-wait |
| 42 | +
|
| 43 | +Check deployment status |
| 44 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 45 | + |
| 46 | +View the current status of your SREClaw deployment: |
| 47 | + |
| 48 | +.. code-block:: bash |
| 49 | +
|
| 50 | + az aks claw status --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 51 | +
|
| 52 | +This displays: |
| 53 | + |
| 54 | +- Helm release status |
| 55 | +- Deployment replica counts |
| 56 | +- Pod status and readiness |
| 57 | +- Configured LLM providers with models and API endpoints |
| 58 | + |
| 59 | +Connect to SREClaw service |
| 60 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 61 | + |
| 62 | +Establish a port-forward connection to access the SREClaw web interface: |
| 63 | + |
| 64 | +.. code-block:: bash |
| 65 | +
|
| 66 | + az aks claw connect --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 67 | +
|
| 68 | +The command will: |
| 69 | + |
| 70 | +- Display the gateway authentication token |
| 71 | +- Create a port-forward to localhost:18789 |
| 72 | +- Provide instructions to open the service in your browser |
| 73 | + |
| 74 | +To use a different local port: |
| 75 | + |
| 76 | +.. code-block:: bash |
| 77 | +
|
| 78 | + az aks claw connect --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system --local-port 8080 |
| 79 | +
|
| 80 | +Press Ctrl+C to stop the port-forwarding. |
| 81 | + |
| 82 | +Delete SREClaw |
| 83 | +~~~~~~~~~~~~~~ |
| 84 | + |
| 85 | +Uninstall SREClaw and clean up all resources: |
| 86 | + |
| 87 | +.. code-block:: bash |
| 88 | +
|
| 89 | + az aks claw delete --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 90 | +
|
| 91 | +This command will: |
| 92 | + |
| 93 | +1. Prompt for confirmation |
| 94 | +2. Uninstall the SREClaw helm chart |
| 95 | +3. Delete all associated secrets and configurations |
| 96 | +4. Wait for pods to be removed |
| 97 | + |
| 98 | +To delete without waiting: |
| 99 | + |
| 100 | +.. code-block:: bash |
| 101 | +
|
| 102 | + az aks claw delete --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system --no-wait |
| 103 | +
|
| 104 | +LLM Provider Configuration |
| 105 | +--------------------------- |
| 106 | + |
| 107 | +Azure OpenAI |
| 108 | +~~~~~~~~~~~~ |
| 109 | + |
| 110 | +When prompted during deployment, select Azure OpenAI and provide: |
| 111 | + |
| 112 | +- **Models**: Comma-separated model names (e.g., ``gpt-5.4,gpt-5.1``) |
| 113 | +- **API Key**: Your Azure OpenAI API key |
| 114 | +- **API Base**: Your Azure OpenAI endpoint (e.g., ``https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/``) |
| 115 | + |
| 116 | +OpenAI |
| 117 | +~~~~~~ |
| 118 | + |
| 119 | +When prompted during deployment, select OpenAI and provide: |
| 120 | + |
| 121 | +- **Models**: Comma-separated model names (e.g., ``gpt-5.4,gpt-5.1``) |
| 122 | +- **API Key**: Your OpenAI API key |
| 123 | + |
| 124 | +Prerequisites |
| 125 | +------------- |
| 126 | + |
| 127 | +- Azure CLI installed |
| 128 | +- An AKS cluster |
| 129 | +- kubectl configured to access your cluster |
| 130 | +- Appropriate permissions to deploy resources to your AKS cluster |
| 131 | +- An LLM provider account (Azure OpenAI or OpenAI) with API access |
| 132 | + |
| 133 | +Service Account Requirements |
| 134 | +----------------------------- |
| 135 | + |
| 136 | +SREClaw requires a Kubernetes service account with: |
| 137 | + |
| 138 | +- Appropriate Role and RoleBinding in the target namespace |
| 139 | +- For Azure resource access: annotation with ``azure.workload.identity/client-id: <managed-identity-client-id>`` |
| 140 | + |
| 141 | +Ensure you create these before running ``az aks claw create``. |
| 142 | + |
| 143 | +Troubleshooting |
| 144 | +--------------- |
| 145 | + |
| 146 | +Check deployment status |
| 147 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 148 | + |
| 149 | +.. code-block:: bash |
| 150 | +
|
| 151 | + az aks claw status --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 152 | +
|
| 153 | +View pod logs |
| 154 | +~~~~~~~~~~~~~ |
| 155 | + |
| 156 | +.. code-block:: bash |
| 157 | +
|
| 158 | + kubectl logs -n kube-system -l app.kubernetes.io/name=aks-sreclaw |
| 159 | +
|
| 160 | +Verify helm release |
| 161 | +~~~~~~~~~~~~~~~~~~~ |
| 162 | + |
| 163 | +.. code-block:: bash |
| 164 | +
|
| 165 | + helm list -n kube-system |
| 166 | +
|
| 167 | +Uninstall and reinstall |
| 168 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 169 | + |
| 170 | +If you encounter issues: |
| 171 | + |
| 172 | +.. code-block:: bash |
| 173 | +
|
| 174 | + az aks claw delete --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 175 | + az aks claw create --resource-group MyResourceGroup --name MyAKSCluster --namespace kube-system |
| 176 | +
|
| 177 | +Support |
| 178 | +------- |
| 179 | + |
| 180 | +For issues and feature requests, please visit: |
| 181 | +https://github.com/Azure/azure-cli-extensions |
| 182 | + |
| 183 | +License |
| 184 | +------- |
| 185 | + |
| 186 | +This extension is licensed under the MIT License. See LICENSE.txt for details. |
0 commit comments