Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Azure icon
Labs

Secure Workload Identity and Secrets Using OIDC and Azure Key Vault

You’re the DevSecOps engineer for an AKS-hosted microservice app that currently renders placeholder data because it has no database connectivity. Your goal is to configure secure secret synchronization with Azure Key Vault so the app can connect to Azure Cosmos DB (MongoDB API). You will enable AKS OIDC Workload Identity to authenticate the pod to Key Vault , store the Cosmos DB connection string (which includes the password) in Azure Key Vault, sync that secret into Kubernetes via the Secrets Store CSI driver, and update the deployment to consume the connection string so the frontend can connect to the database.

Azure icon
Lab platform
Lab Info
Level
Advanced
Last updated
May 08, 2026
Duration
30m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Review the existing configuration

    Retrieve the details of the Kubernetes service named frontend in the simple-grocery-store namespace, and access the Public IP address.

  2. Challenge

    Configure AKS cluster with OIDC and Key Vault secrets provider
    • Enable OIDC issuer and Workload Identity on the AKS cluster
    • Enable Azure Key Vault Secrets Provider on the AKS cluster
  3. Challenge

    Retrieve and store Cosmos DB connection string in Azure Key Vault

    Retrieve the Cosmos DB connection string and store it in the Key Vault in a secret named MongoDb-Connection-String.

  4. Challenge

    Set up workload identity federation for AKS using the managed identity
    • Create a Service account in the simple-grocery-store namespace with an annotation that links it the existing managed identity id-aks-secrets
    • Create a federated identity credential that links the Kubernetes service account to the managed identity
    • Create a SecretProviderClass to sync secrets from Azure Key Vault
  5. Challenge

    Update product service deployment to use workload identity and Key Vault secrets
    • Update the product-service deployment in the simple-grocery-store namespace to use the new service account and mount the secrets from the SecretProviderClass
    • Mount the the mongodb-connection-string secret using the secretProviderClass as an environment variable named MONGO_URI
  6. Challenge

    Verify secret configuration and connectivity to Cosmos DB
    • Confirm the rollout of the updated deployment
    • Retrieve the deployment logs to confirm connectivity to the database
    • Review the web application to confirm products are loaded from the database
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight