Edit

Share via


View and access Managed Fleet Namespaces (preview)

Applies to: ✔️ Fleet Manager with hub cluster

This article is intended for users of a managed namespace who need to discover and access those namespaces. If you're looking to create and configure managed namespaces, see create and configure Managed Fleet Namespaces.

Important

Azure Kubernetes Fleet Manager preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. Azure Kubernetes Fleet Manager previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use.

Before you begin

  • You need an Azure account with an active subscription. Create an account for free.

  • You need an existing Managed Fleet Namespace. If you don't have one, see create a multi-cluster Managed Fleet Namespace.

  • Understand the Managed Fleet Namespace concept by reading the overview.

  • You need Azure CLI version 2.78.0 or later installed to complete this article. To install or upgrade, see Install Azure CLI.

  • You need the fleet Azure CLI extension version 1.8.0 or later. You can install it and update to the latest version using the az extension add and az extension update commands.

    # Install the extension
    az extension add --name fleet
    
    # Update the extension
    az extension update --name fleet
    
  • Confirm the fleet extension version is at least 1.8.0 using the az extension show command.

    az extension show --name fleet
    
  • Set the following environment variables for your subscription ID, resource group, and Fleet:

    export SUBSCRIPTION_ID=<subscription-id>
    export GROUP=<resource-group-name>
    export FLEET=<fleet-name>
    export FLEET_NAMESPACE_NAME=<fleet-namespace-name>
    
  • Set the default Azure subscription using the az account set command.

    az account set --subscription ${SUBSCRIPTION_ID}
    

View the Managed Fleet Namespaces you can access

View the multi-cluster managed namespaces you can access using the az fleet namespace list command.

az fleet namespace list  
    --resource-group ${GROUP} \ 
    --fleet-name ${FLEET} \ 
    -o table 

Your output should resemble the following example output:

AdoptionPolicy  DeletePolicy   ETag                                    Location   Name                  ProvisioningState   ResourceGroup
--------------  ------------   -------------------------------------   --------   --------------------  -----------------   -------------
Always          Delete         "aaaaaaaa-0b0b-1c1c-2d2d-333333333333   westus2    my-managed-namespace  Succeeded           test-rg

View a Managed Fleet Namespace's configuration

View a specific multi-cluster managed namespace's details by using the az fleet namespace show command.

az fleet namespace show \ 
    --resource-group ${GROUP} \ 
    --fleet-name ${FLEET} \ 
    --name ${FLEET_NAMESPACE_NAME} \ 
    -o table 

Your output should resemble the following example output:

AdoptionPolicy  DeletePolicy   ETag                                    Location   Name                  ProvisioningState   ResourceGroup
--------------  ------------   -------------------------------------   --------   --------------------  -----------------   -------------
Always          Delete         "aaaaaaaa-0b0b-1c1c-2d2d-333333333333   westus2    my-managed-namespace  Succeeded           test-rg

Retrieve the kubeconfig for a Managed Fleet Namespace

You can retrieve either the kubeconfig to access the multi-cluster managed namespace on the Fleet Manager hub cluster, or on a specific member cluster. If you access the hub cluster, you can utilize Fleet Manager's intelligent resource placement to replicate your resources to member clusters.

Access Managed Fleet Namespace on Fleet Manager hub clusters

az fleet namespace get-credentials \ 
    --resource-group ${GROUP} \ 
    --fleet-name ${FLEET} \ 
    --name ${FLEET_NAMESPACE_NAME}

Access Managed Fleet Namespace on a specific member cluster

az fleet namespace get-credentials \ 
    --resource-group ${GROUP} \ 
    --fleet-name ${FLEET} \ 
    --name ${FLEET_NAMESPACE_NAME} \ 
    --member myMemberCluster

Next steps