winget install --id=K8stooling.Kubazulo -e
Kubernetes Authentication Tool
Kubazulo is a Kubernetes Authentication Tool designed to implement Azure Active Directory (Azure AD) authentication seamlessly into the Kubernetes API-Server communication process. It functions as an exec plugin within the kubeconfig file, enabling secure and efficient access management.
Key Features:
Audience & Benefits: Kubazulo is ideal for organizations leveraging Azure AD as their identity provider. It simplifies the authentication process for Kubernetes clusters by eliminating the need for additional infrastructure or complex setup steps, enhancing security and operational efficiency. Users benefit from a seamless integration with existing Azure AD configurations, enabling secure access to Kubernetes resources without compromising on performance.
Kubazulo can be installed via winget, ensuring easy deployment across supported environments.
Kubeconfig Authentication Helper for Kubernetes API-Server in cunjunction with kubectl
kubazulo is a client-go credential (exec) plugin implementing azure authentication. It plugs in seemless into the process of communicating to the kubernetes API-Server.
For this the kubeconfig needs to be adapted.
kubazulo can be used to authenticate to general kubernetes clusters using Azure Active Directory as an OIDC provider.
Create an AAD Enterprise Application and the corresponding App Registration. Check the Allow public client flows checkbox. Configure groups to be included in the response. Take a note of the directory (tenant) ID as $AAD_TENANT_ID and the application (client) ID as $AAD_CLIENT_ID
Configure the API server with the following flags:
>See the kubernetes docs for optional flags.
kubectl config set-credentials "kubazulo-azuread" \
--exec-api-version=client.authentication.k8s.io/v1 \
--exec-command=kubazulo \
--exec-arg=get-token \
--exec-arg=--client-id \
--exec-arg=$AAD_CLIENT_ID \
--exec-arg=--tenant-id \
--exec-arg=$AAD_TENANT_ID
kubectl config set-credentials "kubazulo-azuread" \
--exec-api-version=client.authentication.k8s.io/v1beta1 \
--exec-command=kubazulo \
--exec-arg=get-token \
--exec-arg=--client-id \
--exec-arg=$AAD_CLIENT_ID \
--exec-arg=--tenant-id \
--exec-arg=$AAD_TENANT_ID \
--exec-arg=--loginmode \
--exec-arg=interactive \
--exec-arg=--intermediate \
--exec-arg=true \
--exec-arg=--api-token-endpoint \
--exec-arg=$APIGW_ENDPOINT
>Please DON'T FORGET TO SET THE OS-Environment Variables |
Parameter | Description | Mandatory | Choices | Default |
---|---|---|---|---|
--client-id | Azure Application-ID | :heavy_check_mark: | n/a | n/a |
--tenant-id | Azure Tenant-ID | :heavy_check_mark: | n/a | n/a |
--force-login | Re-Usage of Browser Session data | :x: | true, false | false |
--loopbackport | Customize local callback listener | :x: | n/a | 58433 |
--loginmode | Set the Authentication Flow mode | :x: | interactive, devicecode | interactive |
--intermediate | Activate another Token fetcher Endpoint | :x: | true, false | false |
--api-token-endpoint | Define Endpoint from where it gets Token | :x: | n/a | n/a |
kubazulo will also log the operations it is doing to the following folder
$HOME/.kube/kubazulo/application.log
kubectl config set-context "$CLUSTER_NAME" --cluster="$CLUSTER_NAME" --user=kubazulo-azuread
kubectl config use-context "$CLUSTER_NAME"