CmdID

CmdID / az / az fleet

az fleet get-credentials

For hubful fleets, gets the kubeconfig for the fleet's hub cluster. Azure CLI extensions reference

3 examples 4 options Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Get a fleet's hub cluster kubeconfig.

az fleet get-credentials -g MyFleetResourceGroup -n MyFleetNameIdentify
-gName of resource group.
-nSpecify the fleet name.

Get a fleet's hub cluster kubeconfig, and save it to a specific file.

az fleet get-credentials -g MyFleetResourceGroup -n MyFleetName -f ~/mykubeconfigfile.txtIdentify
-gName of resource group.
-nSpecify the fleet name.
-fKubernetes configuration file to update.

Get kubeconfig from a specific fleet member's managed cluster.

az fleet get-credentials -g MyFleetResourceGroup -n MyFleetName --member MyFleetMemberIdentify
-gName of resource group.
-nSpecify the fleet name.
--memberSpecify the fleet member name to get credentials from its associated managed cluster.

Options

4 in the Azure CLI extensions reference
--contextIf specified, overwrite the default context name.
--file, -fKubernetes configuration file to update.
--member, -mSpecify the fleet member name to get credentials from its associated managed cluster.
--overwrite-existingOverwrite any existing cluster entry with the same name.