AZKube is a command-line tool that allows you to quickly switch between multiple Azure Kubernetes Service (AKS) clusters across different Azure subscriptions. It automates the process of selecting a subscription, listing AKS clusters, and updating the kubectl context.
-
Fetch and list all Azure subscriptions.
-
Select an AKS cluster from a fuzzy search interface.
-
Automatically switch Azure subscriptions.
-
Updates kubectl context for the selected AKS cluster.
-
Supports manual configuration of subscriptions via
azkube.yaml
. -
Detects private clusters and applies
--public-fqdn
when necessary.
Ensure you have the following installed:
-
Go (1.18+ recommended)
-
Azure CLI (az command must be available)
-
kubectl
Clone the repository and build the binary:
# Clone the repository
git clone https://github.com/kejrak/azkube.git
cd azkube
# Build the executable
go build -o azkube
Simply execute the built binary:
./azkube
By default, AZKube looks for ~/.kube/azkube.yaml. You can specify a custom path using an environment variable:
export AZKUBE_CONFIG=/path/to/config.yaml
./azkube
AZKube supports manual subscription selection via a configuration file (azkube.yaml).
use_manual_subscriptions: true
subscriptions:
- id: "1234abcd-5678-efgh-9101-ijklmnopqrst"
name: "Production Subscription"
- id: "abcd1234-efgh-5678-9101-mnopqrstijkl"
name: "Development Subscription"
- use_manual_subscriptions: true → Only use the subscriptions listed in the config.
- use_manual_subscriptions: false → Fetch all subscriptions from Azure dynamically.