How vmware-archive/load-balancer-and-ingress-services-for-kubernetes works
AKO provides Kubernetes L4–L7 load balancing: it observes cluster resources, builds Avi configuration, and relies on the Avi Controller to program traffic routing. The repository also has Gateway API and VCF infrastructure controllers, plus operators for configuration and Avi-related custom resources. The principal flow is documented in the README; sampled controller excerpts show event queuing and model ingestion, but do not expose every downstream call, so unsampled relationships are not expanded.
Main entry points: infra-main/main.go Infra Runtime · nodes/dequeue_ingestion.go Model Ingestion · nodes/dequeue_ingestion.go Gateway Ingestion · gateway-api/main.go Gateway Runtime
Components 27
AKO Core
- AKO Runtime
cmd/ako-main/main.go - Resource Watchers
internal/k8s/controller.go - AKO CRD Watchers
internal/k8s/crdcontroller.go - Object Cache
internal/cache/controller_obj_cache.go - Model Ingestion
internal/nodes/dequeue_ingestion.go - Avi Model Graph
internal/objects/avigraph.go - Avi REST Operations
internal/rest/rest_operation.go - Resource Status
internal/status/status_publisher.go
Gateway API
- Gateway Runtime
cmd/gateway-api/main.go - Gateway Watchers
ako-gateway-api/k8s/gateway_controller.go - Gateway CRD Watchers
ako-gateway-api/k8s/gateway_crd_controller.go - Gateway Store
ako-gateway-api/objects/gateway_store.go - Gateway Ingestion
ako-gateway-api/nodes/dequeue_ingestion.go - Gateway Translation
ako-gateway-api/nodes/avi_model_l7_translator.go - Gateway Status
ako-gateway-api/status/gateway_status.go
VCF Infrastructure
- Infra Runtime
cmd/infra-main/main.go - VCF Cluster Ingestion
ako-infra/ingestion/vcf_k8s_controller.go - Avi Infra Controller
ako-infra/ingestion/avi_infra_controller.go - Network REST Handlers
ako-infra/avirest/networking_handler.go - Management Service
ako-infra/proxy/management_service_controller.go - VKS Cluster Webhook
ako-infra/webhook/vks_cluster_webhook.go
Kubernetes Operators
- AKO Config Operator
ako-operator/internal/controller/akoconfig_controller.go - Avi CRD Operator
ako-crd-operator/internal/controller/applicationprofile_controller.go - Health Monitor Reconciler
ako-crd-operator/internal/controller/healthmonitor_controller.go - Avi Session
ako-crd-operator/internal/session/aviclient.go
Other components
- Kubernetes API
- Avi Controller
Connections 28
- Kubernetes API → AKO Runtime: provides objects
README.md - AKO Runtime → Resource Watchers: starts watchers
cmd/ako-main/main.go - Resource Watchers → Model Ingestion: queues changes
internal/k8s/controller.go - AKO CRD Watchers → Model Ingestion: queues changes
internal/k8s/crdcontroller.go - Model Ingestion → Object Cache: reads and updates
internal/nodes/dequeue_ingestion.go - Model Ingestion → Avi Model Graph: builds models
- Avi Model Graph → Avi REST Operations: publishes models
- Avi REST Operations → Avi Controller: configures datapath
README.md - Model Ingestion → Resource Status: updates status
- Kubernetes API → Gateway Runtime: provides objects
README.md - Gateway Runtime → Gateway Watchers: starts watchers
cmd/gateway-api/main.go - Gateway Watchers → Gateway Ingestion: queues changes
ako-gateway-api/k8s/gateway_controller.go - Gateway CRD Watchers → Gateway Ingestion: queues changes
- Gateway Ingestion → Gateway Store: reads and updates
- Gateway Ingestion → Gateway Translation: translates routes
- Gateway Ingestion → Gateway Status: updates status
- Gateway Runtime → Avi Controller: configures datapath
- Kubernetes API → Infra Runtime: provides cluster data
README.md - Infra Runtime → VCF Cluster Ingestion: starts ingestion
cmd/infra-main/main.go - Infra Runtime → Avi Infra Controller: starts controller
cmd/infra-main/main.go - Avi Infra Controller → Network REST Handlers: uses REST handlers
ako-infra/ingestion/avi_infra_controller.go - Infra Runtime → Management Service: starts service controller
- Infra Runtime → VKS Cluster Webhook: registers webhook
- Infra Runtime → Avi Controller: configures infrastructure
README.md - Kubernetes API → AKO Config Operator: provides config resources
- Kubernetes API → Avi CRD Operator: provides custom resources
- Avi CRD Operator → Health Monitor Reconciler: shares reconciliation domain
- Health Monitor Reconciler → Avi Session: uses Avi session