Create Storage Account (Azure only)

This section will guide you through creating an Azure Storage Account for Rok to store its snapshot data. If you already have an Azure Storage Account, you may proceed to the Verify section.

What You’ll Need

Procedure

  1. Switch to your management environment and define the following alias to sanitize components of the storage account name Rok will use:

    root@rok-tools:~# alias sanitize="tr -cd '[:alnum:]' | tr '[:upper:]' '[:lower:]'"
    
  2. Sanitize the subscription ID:

    root@rok-tools:~# export STORAGE_ACCOUNT_SID=$(echo ${SUBSCRIPTION_ID?} | sanitize)
    
  3. Sanitize the resource group:

    root@rok-tools:~# export STORAGE_ACCOUNT_RGRP=$(echo ${AZ_RESOURCE_GROUP?} | sanitize)
    
  4. Sanitize the AKS cluster name:

    root@rok-tools:~# export STORAGE_ACCOUNT_CLUSTER=$(echo ${CLUSTERNAME?} | sanitize)
    
  5. Create the name of the storage account your Rok cluster will use:

    root@rok-tools:~# export STORAGE_ACCOUNT_NAME="rok${STORAGE_ACCOUNT_SID:0:7}${STORAGE_ACCOUNT_RGRP:0:7}${STORAGE_ACCOUNT_CLUSTER:0:7}"
    
  6. Copy the name of the storage account to your clipboard so you can paste it in the Azure portal UI in the following steps:

    root@rok-tools:~# echo ${STORAGE_ACCOUNT_NAME?}
    roka8eb022arriktoarrikto
    
  7. Go to the Storage Accounts service in Azure Portal.

  8. Click Create.

  9. On the Basics page, set the following options:

    1. Set Subscription to your desired subscription.
    2. Set Resource Group to arrikto, so it matches the resource group of your AKS cluster.
    3. Set Storage account name to the storage account name you created earlier.
    4. Set Region to East US, so it matches the region of your AKS cluster.
    5. Set Performance to Standard (general-purpose v2).
    ../../_images/storageaccount-create.png
    Troubleshooting
    The storage account name already exists

    It is possible that a storage account already exists with the same name. In this case, the Azure portal UI displays the following error:

    ../../_images/storageaccount-already-exists.png

    If you see this error please go back to the previous step and select a new, unique name for the storage account by setting the STORAGE_ACCOUNT_NAME environment variable and then use it in the Storage account name field. If the new name is indeed unique, the above error will disappear.

  10. Click Review + create to use the defaults in all remaining options.

  11. Click Create.

Verify

You can verify that the required storage account exists via the following steps:

  1. Go to the Storage Accounts service in Azure Portal.

  2. Verify that the storage account you created above is in the list, its Kind is StorageV2, and belongs to the expected resource group, location and subscription.

    ../../_images/storageaccount-verify.png

Summary

You have successfully created an Azure Storage Account for Rok.

What’s Next

The next step is to create an Azure Managed Identity and provide it with permissions on your storage account so Rok can use it to access Azure Blob Storage.