Using Kubernetes Secrets with Azure Storage connection data

Using K8s Secrets with Azure Storage Accounts

Creating a Storage Account and File Shares

Refer to the DupoCloud documentation to configure Storage Account and File Share in Azure.

Copy the Storage Account Key and File Share Name from the DuploCloud Portal to prepare to create Kubernetes Secrets in the next step.

Creating Kubernetes Secret

Navigate to Kubernetes -> Secrets. Create a Kubernetes Secret Object using an Azure Storage Account.

For more information, see Kubernetes Configs and Secrets.

SecretDetails example
azurestorageaccountkey: >-
    <storage-account-key>
azurestorageaccountname: <storage-account-name>

Mounting the Azure Storage connection in your deployment

While creating a deployment, provide the configuration below under Other Pod Config and Other Container Config to create and mount the storage volume for your Service. In the configuration below, shareName is the File Share name, which you can get from the Storage Account screen.

Other Pod Config
PodLabels:
  app: azuretest
Volumes:
  - name: azurefileshare
    azureFile:
      secretName: my-storage-account-key
      shareName: fileshare1
      readOnly: false
Other Container Config
VolumesMounts:
  - name: azurefileshare
    mountPath: /myfileshare

Last updated

Logo

© DuploCloud, Inc. All rights reserved. DuploCloud trademarks used herein are registered trademarks of DuploCloud and affiliates