vmware-avi 1.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vmware_avi-1.4.4/.gitignore +21 -0
- vmware_avi-1.4.4/PKG-INFO +490 -0
- vmware_avi-1.4.4/README-CN.md +468 -0
- vmware_avi-1.4.4/README.md +468 -0
- vmware_avi-1.4.4/RELEASE_NOTES.md +29 -0
- vmware_avi-1.4.4/config.example.yaml +28 -0
- vmware_avi-1.4.4/evals/evals.json +23 -0
- vmware_avi-1.4.4/examples/mcp-configs/claude-code.json +11 -0
- vmware_avi-1.4.4/examples/mcp-configs/cursor.json +11 -0
- vmware_avi-1.4.4/mcp_server/__init__.py +1 -0
- vmware_avi-1.4.4/mcp_server/server.py +285 -0
- vmware_avi-1.4.4/pyproject.toml +48 -0
- vmware_avi-1.4.4/server.json +55 -0
- vmware_avi-1.4.4/skills/vmware-avi/SKILL.md +241 -0
- vmware_avi-1.4.4/skills/vmware-avi/references/capabilities.md +123 -0
- vmware_avi-1.4.4/skills/vmware-avi/references/cli-reference.md +119 -0
- vmware_avi-1.4.4/skills/vmware-avi/references/setup-guide.md +306 -0
- vmware_avi-1.4.4/tests/__init__.py +0 -0
- vmware_avi-1.4.4/tests/conftest.py +118 -0
- vmware_avi-1.4.4/tests/test_ako_pod.py +103 -0
- vmware_avi-1.4.4/tests/test_ako_sync.py +90 -0
- vmware_avi-1.4.4/tests/test_audit.py +74 -0
- vmware_avi-1.4.4/tests/test_config.py +93 -0
- vmware_avi-1.4.4/tests/test_mcp_tools.py +92 -0
- vmware_avi-1.4.4/tests/test_no_destructive_ops.py +85 -0
- vmware_avi-1.4.4/tests/test_pool_mgmt.py +72 -0
- vmware_avi-1.4.4/tests/test_vs_mgmt.py +89 -0
- vmware_avi-1.4.4/vmware_avi/__init__.py +3 -0
- vmware_avi-1.4.4/vmware_avi/_safety.py +17 -0
- vmware_avi-1.4.4/vmware_avi/cli.py +394 -0
- vmware_avi-1.4.4/vmware_avi/config.py +140 -0
- vmware_avi-1.4.4/vmware_avi/connection.py +81 -0
- vmware_avi-1.4.4/vmware_avi/doctor.py +135 -0
- vmware_avi-1.4.4/vmware_avi/k8s_connection.py +61 -0
- vmware_avi-1.4.4/vmware_avi/notify/__init__.py +1 -0
- vmware_avi-1.4.4/vmware_avi/notify/audit.py +41 -0
- vmware_avi-1.4.4/vmware_avi/ops/__init__.py +1 -0
- vmware_avi-1.4.4/vmware_avi/ops/ako_config.py +70 -0
- vmware_avi-1.4.4/vmware_avi/ops/ako_ingress.py +172 -0
- vmware_avi-1.4.4/vmware_avi/ops/ako_multi_cluster.py +81 -0
- vmware_avi-1.4.4/vmware_avi/ops/ako_pod.py +136 -0
- vmware_avi-1.4.4/vmware_avi/ops/ako_sync.py +99 -0
- vmware_avi-1.4.4/vmware_avi/ops/analytics.py +74 -0
- vmware_avi-1.4.4/vmware_avi/ops/pool_mgmt.py +76 -0
- vmware_avi-1.4.4/vmware_avi/ops/se_mgmt.py +63 -0
- vmware_avi-1.4.4/vmware_avi/ops/ssl_mgmt.py +85 -0
- vmware_avi-1.4.4/vmware_avi/ops/vs_mgmt.py +95 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
.env
|
|
12
|
+
*.log
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
htmlcov/
|
|
17
|
+
.coverage
|
|
18
|
+
*.so
|
|
19
|
+
.DS_Store
|
|
20
|
+
uv.lock
|
|
21
|
+
vmware-avi-workspace/
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vmware-avi
|
|
3
|
+
Version: 1.4.4
|
|
4
|
+
Summary: AVI (NSX Advanced Load Balancer) management and AKO Kubernetes operations tool
|
|
5
|
+
Author: Wei Zhou / 周崴
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: avisdk<31.0,>=22.1
|
|
9
|
+
Requires-Dist: httpx<1.0,>=0.27
|
|
10
|
+
Requires-Dist: kubernetes<33.0,>=28.0
|
|
11
|
+
Requires-Dist: mcp[cli]<2.0,>=1.0
|
|
12
|
+
Requires-Dist: pyaml<27.0,>=24.0
|
|
13
|
+
Requires-Dist: python-dotenv<2.0,>=1.0
|
|
14
|
+
Requires-Dist: rich<15.0,>=13.0
|
|
15
|
+
Requires-Dist: typer<1.0,>=0.12
|
|
16
|
+
Requires-Dist: vmware-policy<2.0,>=1.0.0
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest-cov<8.0,>=5.0; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest<10.0,>=8.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff<1.0,>=0.5; extra == 'dev'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
<!-- mcp-name: io.github.zw008/vmware-avi -->
|
|
24
|
+
# VMware AVI
|
|
25
|
+
|
|
26
|
+
English | [中文](README-CN.md)
|
|
27
|
+
|
|
28
|
+
AVI (NSX Advanced Load Balancer) management and AKO Kubernetes operations tool — 29 tools across 10 categories.
|
|
29
|
+
|
|
30
|
+
> **Dual mode**: Traditional AVI Controller management + AKO K8s operations in one skill.
|
|
31
|
+
>
|
|
32
|
+
> **Companion skills** handle everything else:
|
|
33
|
+
>
|
|
34
|
+
> | Skill | Scope | Install |
|
|
35
|
+
> |-------|-------|---------|
|
|
36
|
+
> | **[vmware-aiops](https://github.com/zw008/VMware-AIops)** | VM lifecycle, deployment, guest ops, cluster | `uv tool install vmware-aiops` |
|
|
37
|
+
> | **[vmware-monitor](https://github.com/zw008/VMware-Monitor)** | Read-only: inventory, health, alarms, events | `uv tool install vmware-monitor` |
|
|
38
|
+
> | **[vmware-storage](https://github.com/zw008/VMware-Storage)** | Datastores, iSCSI, vSAN management | `uv tool install vmware-storage` |
|
|
39
|
+
> | **[vmware-vks](https://github.com/zw008/VMware-VKS)** | Tanzu Namespaces, TKC cluster lifecycle | `uv tool install vmware-vks` |
|
|
40
|
+
> | **[vmware-nsx](https://github.com/zw008/VMware-NSX)** | NSX networking: segments, gateways, NAT | `uv tool install vmware-nsx-mgmt` |
|
|
41
|
+
> | **[vmware-nsx-security](https://github.com/zw008/VMware-NSX-Security)** | DFW firewall rules, security groups | `uv tool install vmware-nsx-security` |
|
|
42
|
+
> | **[vmware-aria](https://github.com/zw008/VMware-Aria)** | Aria Ops: metrics, alerts, capacity | `uv tool install vmware-aria` |
|
|
43
|
+
|
|
44
|
+
[](https://pypi.org/project/vmware-avi/)
|
|
45
|
+
[](https://pypi.org/project/vmware-avi/)
|
|
46
|
+
[](LICENSE)
|
|
47
|
+
[](https://clawhub.ai/skills/vmware-avi)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Quick Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Via uv (recommended)
|
|
55
|
+
uv tool install vmware-avi
|
|
56
|
+
|
|
57
|
+
# Or via pip
|
|
58
|
+
pip install vmware-avi
|
|
59
|
+
|
|
60
|
+
# China mainland mirror
|
|
61
|
+
pip install vmware-avi -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
62
|
+
|
|
63
|
+
# Verify installation
|
|
64
|
+
vmware-avi doctor
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Capabilities Overview
|
|
70
|
+
|
|
71
|
+
### What This Skill Does
|
|
72
|
+
|
|
73
|
+
| Category | Tools | Count |
|
|
74
|
+
|----------|-------|:-----:|
|
|
75
|
+
| **Virtual Service** | list, status, enable/disable | 3 |
|
|
76
|
+
| **Pool Member** | list, enable/disable member (drain/restore traffic) | 3 |
|
|
77
|
+
| **SSL Certificate** | list, expiry check | 2 |
|
|
78
|
+
| **Analytics** | VS metrics overview, request error logs | 2 |
|
|
79
|
+
| **Service Engine** | list, health check | 2 |
|
|
80
|
+
| **AKO Pod Ops** | status, logs, restart, version info | 4 |
|
|
81
|
+
| **AKO Config** | values.yaml view, Helm diff, Helm upgrade | 3 |
|
|
82
|
+
| **Ingress Diagnostics** | annotation validation, VS mapping, error diagnosis, fix recommendation | 4 |
|
|
83
|
+
| **Sync Diagnostics** | K8s-Controller comparison, inconsistency list, force resync | 3 |
|
|
84
|
+
| **Multi-cluster** | cluster list, cross-cluster AKO overview, AMKO status | 3 |
|
|
85
|
+
|
|
86
|
+
### CLI vs MCP: Which Mode to Use
|
|
87
|
+
|
|
88
|
+
| Scenario | Recommended | Why |
|
|
89
|
+
|----------|:-----------:|-----|
|
|
90
|
+
| **Local/small models** (Ollama, Qwen) | **CLI** | ~2K tokens vs ~8K for MCP |
|
|
91
|
+
| **Cloud models** (Claude, GPT-4o) | Either | MCP gives structured JSON I/O |
|
|
92
|
+
| **Automated pipelines** | **MCP** | Type-safe parameters, structured output |
|
|
93
|
+
| **AKO troubleshooting** | **CLI** | Interactive log tailing, Helm diff output |
|
|
94
|
+
|
|
95
|
+
> **Rule of thumb**: Use CLI for cost efficiency and small models. Use MCP for structured automation with large models.
|
|
96
|
+
|
|
97
|
+
### Architecture
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
User (Natural Language)
|
|
101
|
+
|
|
|
102
|
+
AI CLI Tool (Claude Code / Gemini / Codex / Cursor / Trae)
|
|
103
|
+
| reads SKILL.md
|
|
104
|
+
|
|
|
105
|
+
vmware-avi CLI
|
|
106
|
+
|--- avisdk (AVI REST API) ---> AVI Controller ---> Virtual Services / Pools / SEs
|
|
107
|
+
|--- kubectl / kubernetes ---> K8s Cluster ---> AKO Pods / Ingress / Services
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Configuration
|
|
113
|
+
|
|
114
|
+
### Step 1: Create Config Directory
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
mkdir -p ~/.vmware-avi
|
|
118
|
+
vmware-avi init # generates config.yaml and .env templates
|
|
119
|
+
chmod 600 ~/.vmware-avi/.env
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Step 2: Edit config.yaml
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
controllers:
|
|
126
|
+
- name: prod-avi
|
|
127
|
+
host: avi-controller.example.com
|
|
128
|
+
username: admin
|
|
129
|
+
api_version: "22.1.4"
|
|
130
|
+
tenant: admin
|
|
131
|
+
port: 443
|
|
132
|
+
verify_ssl: true
|
|
133
|
+
|
|
134
|
+
default_controller: prod-avi
|
|
135
|
+
|
|
136
|
+
ako:
|
|
137
|
+
kubeconfig: ~/.kube/config
|
|
138
|
+
default_context: ""
|
|
139
|
+
namespace: avi-system
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Step 3: Set Passwords
|
|
143
|
+
|
|
144
|
+
Create `~/.vmware-avi/.env`:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# AVI Controller passwords
|
|
148
|
+
# Format: VMWARE_AVI_{CONTROLLER_NAME_UPPER}_PASSWORD
|
|
149
|
+
VMWARE_AVI_PROD_AVI_PASSWORD=your-password-here
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Password environment variable naming convention:
|
|
153
|
+
```
|
|
154
|
+
VMWARE_AVI_{CONTROLLER_NAME_UPPER}_PASSWORD
|
|
155
|
+
# Replace hyphens with underscores, UPPERCASE
|
|
156
|
+
# Example: controller "prod-avi" -> VMWARE_AVI_PROD_AVI_PASSWORD
|
|
157
|
+
# Example: controller "staging-alb" -> VMWARE_AVI_STAGING_ALB_PASSWORD
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Step 4: Verify
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
vmware-avi doctor # checks Controller connectivity + kubeconfig + avisdk
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## CLI Usage
|
|
169
|
+
|
|
170
|
+
### Virtual Service Management
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# List all virtual services
|
|
174
|
+
vmware-avi vs list [--controller prod-avi]
|
|
175
|
+
|
|
176
|
+
# Check status of a specific VS
|
|
177
|
+
vmware-avi vs status my-webapp-vs
|
|
178
|
+
|
|
179
|
+
# Enable / disable a VS (disable requires double confirmation)
|
|
180
|
+
vmware-avi vs enable my-webapp-vs
|
|
181
|
+
vmware-avi vs disable my-webapp-vs
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Pool Member Drain / Restore
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# List pool members and health status
|
|
188
|
+
vmware-avi pool members my-pool
|
|
189
|
+
|
|
190
|
+
# Graceful drain (disable) — double confirmation required
|
|
191
|
+
vmware-avi pool disable my-pool 10.1.1.5
|
|
192
|
+
|
|
193
|
+
# Restore traffic (enable)
|
|
194
|
+
vmware-avi pool enable my-pool 10.1.1.5
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### SSL Certificate Expiry Check
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# List all certificates
|
|
201
|
+
vmware-avi ssl list
|
|
202
|
+
|
|
203
|
+
# Check certificates expiring within 30 days
|
|
204
|
+
vmware-avi ssl expiry --days 30
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Analytics and Error Logs
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# VS analytics: throughput, latency, error rates
|
|
211
|
+
vmware-avi analytics my-webapp-vs
|
|
212
|
+
|
|
213
|
+
# Request error logs
|
|
214
|
+
vmware-avi logs my-webapp-vs --since 1h
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Service Engine Health
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
vmware-avi se list
|
|
221
|
+
vmware-avi se health
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### AKO Troubleshooting
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Check AKO pod status
|
|
228
|
+
vmware-avi ako status [--context my-k8s-context]
|
|
229
|
+
|
|
230
|
+
# View AKO logs
|
|
231
|
+
vmware-avi ako logs [--tail 100] [--since 30m]
|
|
232
|
+
|
|
233
|
+
# Restart AKO pod (double confirmation)
|
|
234
|
+
vmware-avi ako restart
|
|
235
|
+
|
|
236
|
+
# Show AKO version
|
|
237
|
+
vmware-avi ako version
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### AKO Helm Config Management
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# View current AKO Helm values
|
|
244
|
+
vmware-avi ako config show
|
|
245
|
+
|
|
246
|
+
# Show pending changes (diff)
|
|
247
|
+
vmware-avi ako config diff
|
|
248
|
+
|
|
249
|
+
# Helm upgrade (double confirmation + --dry-run default)
|
|
250
|
+
vmware-avi ako config upgrade
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Ingress Diagnostics
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# Validate Ingress annotations
|
|
257
|
+
vmware-avi ako ingress check <namespace>
|
|
258
|
+
|
|
259
|
+
# Show Ingress-to-VS mapping
|
|
260
|
+
vmware-avi ako ingress map
|
|
261
|
+
|
|
262
|
+
# Diagnose why an Ingress has no VS
|
|
263
|
+
vmware-avi ako ingress diagnose <ingress-name>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Sync Diagnostics
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Check K8s-Controller sync status
|
|
270
|
+
vmware-avi ako sync status
|
|
271
|
+
|
|
272
|
+
# Show inconsistencies between K8s and Controller
|
|
273
|
+
vmware-avi ako sync diff
|
|
274
|
+
|
|
275
|
+
# Force AKO resync (double confirmation)
|
|
276
|
+
vmware-avi ako sync force
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Multi-cluster AKO
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# List clusters with AKO deployed
|
|
283
|
+
vmware-avi ako clusters
|
|
284
|
+
|
|
285
|
+
# Cross-cluster AKO status overview
|
|
286
|
+
vmware-avi ako cluster-overview
|
|
287
|
+
|
|
288
|
+
# AMKO GSLB status
|
|
289
|
+
vmware-avi ako amko status
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## MCP Server
|
|
295
|
+
|
|
296
|
+
The MCP server exposes all 29 tools via the [Model Context Protocol](https://modelcontextprotocol.io). Works with any MCP-compatible client.
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Run via uvx (recommended)
|
|
300
|
+
uvx --from vmware-avi vmware-avi-mcp
|
|
301
|
+
|
|
302
|
+
# With custom config path
|
|
303
|
+
VMWARE_AVI_CONFIG=/path/to/config.yaml uvx --from vmware-avi vmware-avi-mcp
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Claude Desktop Config
|
|
307
|
+
|
|
308
|
+
Add to `claude_desktop_config.json`:
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"mcpServers": {
|
|
313
|
+
"vmware-avi": {
|
|
314
|
+
"command": "uvx",
|
|
315
|
+
"args": ["--from", "vmware-avi", "vmware-avi-mcp"],
|
|
316
|
+
"env": {
|
|
317
|
+
"VMWARE_AVI_CONFIG": "~/.vmware-avi/config.yaml"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### MCP Tools (29)
|
|
325
|
+
|
|
326
|
+
| Category | Tools |
|
|
327
|
+
|----------|-------|
|
|
328
|
+
| Virtual Service (3) | `vs_list`, `vs_status`, `vs_toggle` |
|
|
329
|
+
| Pool Member (3) | `pool_members`, `pool_member_enable`, `pool_member_disable` |
|
|
330
|
+
| SSL Certificate (2) | `ssl_list`, `ssl_expiry_check` |
|
|
331
|
+
| Analytics (2) | `vs_analytics`, `vs_error_logs` |
|
|
332
|
+
| Service Engine (2) | `se_list`, `se_health` |
|
|
333
|
+
| AKO Pod (4) | `ako_status`, `ako_logs`, `ako_restart`, `ako_version` |
|
|
334
|
+
| AKO Config (3) | `ako_config_show`, `ako_config_diff`, `ako_config_upgrade` |
|
|
335
|
+
| Ingress Diagnostics (4) | `ako_ingress_check`, `ako_ingress_map`, `ako_ingress_diagnose`, `ako_ingress_fix_suggest` |
|
|
336
|
+
| Sync Diagnostics (3) | `ako_sync_status`, `ako_sync_diff`, `ako_sync_force` |
|
|
337
|
+
| Multi-cluster (3) | `ako_clusters`, `ako_cluster_overview`, `ako_amko_status` |
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Common Workflows
|
|
342
|
+
|
|
343
|
+
### 1. Maintenance Window -- Drain a Pool Member
|
|
344
|
+
|
|
345
|
+
When taking a backend server offline for patching:
|
|
346
|
+
|
|
347
|
+
1. List pool members and health status
|
|
348
|
+
```bash
|
|
349
|
+
vmware-avi pool members my-pool
|
|
350
|
+
```
|
|
351
|
+
2. Disable the target server (graceful drain)
|
|
352
|
+
```bash
|
|
353
|
+
vmware-avi pool disable my-pool 10.1.1.5
|
|
354
|
+
```
|
|
355
|
+
3. Monitor analytics to confirm active connections are draining
|
|
356
|
+
```bash
|
|
357
|
+
vmware-avi analytics my-vs
|
|
358
|
+
```
|
|
359
|
+
4. Perform maintenance on the server
|
|
360
|
+
5. Re-enable the server
|
|
361
|
+
```bash
|
|
362
|
+
vmware-avi pool enable my-pool 10.1.1.5
|
|
363
|
+
```
|
|
364
|
+
6. Verify health status is green
|
|
365
|
+
```bash
|
|
366
|
+
vmware-avi pool members my-pool
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### 2. AKO Ingress Not Creating VS
|
|
370
|
+
|
|
371
|
+
When a developer reports their Ingress is not producing a Virtual Service:
|
|
372
|
+
|
|
373
|
+
1. Verify AKO is running
|
|
374
|
+
```bash
|
|
375
|
+
vmware-avi ako status
|
|
376
|
+
```
|
|
377
|
+
2. Validate Ingress annotations
|
|
378
|
+
```bash
|
|
379
|
+
vmware-avi ako ingress check <namespace>
|
|
380
|
+
```
|
|
381
|
+
3. Check sync status between K8s and Controller
|
|
382
|
+
```bash
|
|
383
|
+
vmware-avi ako sync status
|
|
384
|
+
```
|
|
385
|
+
4. If annotations are wrong, diagnose the specific Ingress
|
|
386
|
+
```bash
|
|
387
|
+
vmware-avi ako ingress diagnose <ingress-name>
|
|
388
|
+
```
|
|
389
|
+
5. If sync drift is detected, review the diff and force resync if needed
|
|
390
|
+
```bash
|
|
391
|
+
vmware-avi ako sync diff
|
|
392
|
+
vmware-avi ako sync force
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### 3. SSL Certificate Expiry Audit
|
|
396
|
+
|
|
397
|
+
Expired certificates cause outages. Run periodic checks:
|
|
398
|
+
|
|
399
|
+
1. Check all certificates expiring within 30 days
|
|
400
|
+
```bash
|
|
401
|
+
vmware-avi ssl expiry --days 30
|
|
402
|
+
```
|
|
403
|
+
2. Review which VS uses each expiring certificate (output includes VS mapping)
|
|
404
|
+
3. Plan renewal with the certificate team
|
|
405
|
+
4. After renewal, verify the new certificate is in place
|
|
406
|
+
```bash
|
|
407
|
+
vmware-avi ssl list
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## Troubleshooting
|
|
413
|
+
|
|
414
|
+
### "Controller unreachable" error
|
|
415
|
+
|
|
416
|
+
1. Run `vmware-avi doctor` to verify connectivity
|
|
417
|
+
2. Check if the controller address and port are correct in `~/.vmware-avi/config.yaml`
|
|
418
|
+
3. For self-signed certs: set `verify_ssl: false` in config.yaml (lab environments only)
|
|
419
|
+
|
|
420
|
+
### AKO Pod in CrashLoopBackOff
|
|
421
|
+
|
|
422
|
+
1. Check logs: `vmware-avi ako logs --tail 50`
|
|
423
|
+
2. Common causes: wrong controller IP in values.yaml, network policy blocking AKO to Controller, expired credentials
|
|
424
|
+
3. Fix config: `vmware-avi ako config show` to inspect, then Helm upgrade with corrected values
|
|
425
|
+
|
|
426
|
+
### Ingress created but no VS on Controller
|
|
427
|
+
|
|
428
|
+
1. Validate annotations: `vmware-avi ako ingress check <namespace>`
|
|
429
|
+
2. Check AKO logs for rejection reason: `vmware-avi ako logs --since 5m`
|
|
430
|
+
3. Run sync diff: `vmware-avi ako sync diff` to see if the object is stuck
|
|
431
|
+
|
|
432
|
+
### Pool member shows "down" after enable
|
|
433
|
+
|
|
434
|
+
Health monitor may still be failing. The member is enabled but unhealthy. Check the actual health status on the Controller side. Fix the backend service first, then the health status will auto-recover.
|
|
435
|
+
|
|
436
|
+
### SSL expiry check shows 0 certificates
|
|
437
|
+
|
|
438
|
+
Verify the controller connection has tenant-level access. Certificates are tenant-scoped in AVI. The configured user may only see certs in their tenant.
|
|
439
|
+
|
|
440
|
+
### AKO sync force has no effect
|
|
441
|
+
|
|
442
|
+
Force resync triggers AKO to re-reconcile all K8s objects. If the drift persists, the issue is likely in the K8s resource definition itself (bad annotation, missing secret). Use `vmware-avi ako ingress diagnose` to pinpoint the root cause.
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## Safety Features
|
|
447
|
+
|
|
448
|
+
| Feature | Details |
|
|
449
|
+
|---------|---------|
|
|
450
|
+
| **Double Confirmation** | Destructive ops (VS disable, pool member disable, AKO restart, Helm upgrade, force resync) require 2 sequential confirmations |
|
|
451
|
+
| **Dry-Run Default** | `ako config upgrade` defaults to `--dry-run` mode -- user must explicitly confirm to apply |
|
|
452
|
+
| **Audit Trail** | All operations logged to `~/.vmware/audit.db` via vmware-policy (`@vmware_tool` decorator) |
|
|
453
|
+
| **Password Protection** | `.env` file loading with permission check; never in shell history |
|
|
454
|
+
| **SSL Support** | `verify_ssl: false` for self-signed certs in isolated lab environments only |
|
|
455
|
+
| **Prompt Injection Protection** | All API-sourced text truncated (500 chars max) and C0/C1 control characters stripped |
|
|
456
|
+
| **Input Validation** | Pool names, VS names, IP addresses, and namespace names validated before API calls |
|
|
457
|
+
|
|
458
|
+
### Security Details
|
|
459
|
+
|
|
460
|
+
- **Source Code**: [github.com/zw008/VMware-AVI](https://github.com/zw008/VMware-AVI)
|
|
461
|
+
- **Config File Contents**: `config.yaml` stores controller addresses, usernames, and AKO settings. No passwords or tokens. All secrets stored exclusively in `.env`
|
|
462
|
+
- **Webhook Data Scope**: Disabled by default. No third-party data transmission
|
|
463
|
+
- **TLS Verification**: Enabled by default. Disable only for self-signed certificate environments
|
|
464
|
+
- **Prompt Injection Protection**: `_sanitize()` truncation + control character cleanup on all AVI API responses
|
|
465
|
+
- **Least Privilege**: Use a dedicated AVI service account with minimal permissions. AKO operations require only namespace-scoped kubeconfig access
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## Companion Skills
|
|
470
|
+
|
|
471
|
+
| Skill | Scope | Tools | Install |
|
|
472
|
+
|-------|-------|:-----:|---------|
|
|
473
|
+
| **[vmware-avi](https://github.com/zw008/VMware-AVI)** | AVI load balancer, AKO K8s operations | 29 | `uv tool install vmware-avi` |
|
|
474
|
+
| **[vmware-aiops](https://github.com/zw008/VMware-AIops)** | VM lifecycle, deployment, guest ops, cluster | 34 | `uv tool install vmware-aiops` |
|
|
475
|
+
| **[vmware-monitor](https://github.com/zw008/VMware-Monitor)** | Read-only monitoring, alarms, events | 7 | `uv tool install vmware-monitor` |
|
|
476
|
+
| **[vmware-storage](https://github.com/zw008/VMware-Storage)** | Datastores, iSCSI, vSAN | 11 | `uv tool install vmware-storage` |
|
|
477
|
+
| **[vmware-vks](https://github.com/zw008/VMware-VKS)** | Tanzu Namespaces, TKC cluster lifecycle | 20 | `uv tool install vmware-vks` |
|
|
478
|
+
| **[vmware-nsx](https://github.com/zw008/VMware-NSX)** | NSX segments, gateways, NAT, routing | 32 | `uv tool install vmware-nsx-mgmt` |
|
|
479
|
+
| **[vmware-nsx-security](https://github.com/zw008/VMware-NSX-Security)** | DFW firewall, security groups, IDS/IPS | 20 | `uv tool install vmware-nsx-security` |
|
|
480
|
+
| **[vmware-aria](https://github.com/zw008/VMware-Aria)** | Aria Ops: metrics, alerts, capacity | 27 | `uv tool install vmware-aria` |
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Troubleshooting & Contributing
|
|
485
|
+
|
|
486
|
+
If you encounter any errors or issues, please send the error message, logs, or screenshots to **zhouwei008@gmail.com**. Contributions are welcome -- feel free to join us in maintaining and improving this project!
|
|
487
|
+
|
|
488
|
+
## License
|
|
489
|
+
|
|
490
|
+
MIT
|