Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to set up OpenShift confidential clusters on Azure

Enhanced data security

April 1, 2025
Thomas Huth
Related topics:
ContainersVirtualization
Related products:
Azure Red Hat OpenShiftRed Hat OpenShiftRed Hat OpenShift Container Platform

Share:

    Confidential computing is a set of hardware and software technologies designed to protect data in use. This is the second of a series of articles about how you can integrate confidential computing into the Red Hat OpenShift Container Platform (RHOCP) cluster. Our goal is to enhance data security, so all data processed by workloads running on Red Hat OpenShift can remain confidential at every stage.

    We assume our readers have background knowledge of confidential computing and OpenShift. For additional details, we recommend reading confidential computing primer and Red Hat OpenShift Overview. 

    Be sure to read the first article of this series, Confidential cluster: Running Red Hat OpenShift clusters on confidential nodes. In this second article, we will focus on AMD SEV-SNP hardware in the public cloud, Azure from Microsoft. We will examine how a self-managed OpenShift Container Platform installation into confidential VMs can be performed for setting up a system for development or experiments (initially still without attestation here). Deploying Red Hat OpenShift on Azure with all nodes running as confidential VMs using AMD SEV-SNP technology is currently a technology preview.

    Prerequisites

    Before we can start the installation, there are a few preparation steps. 

    • Make sure you have your account for Microsoft Azure.

    • You must have a Red Hat account. If you don’t have a Red Hat account, create one for free at www.redhat.com.

    • We also assume that you are using a Linux environment (preferably Fedora or RHEL) on your local machine. Otherwise, please set up a virtual machine with Fedora or RHEL that you can use as a local host machine for the installation.

    • You also need a public internet domain and the corresponding DNS zone set up for your Azure subscription. Please review the RHOCP documentation for details. 
    • Alternatively, if you don’t want to or cannot provide a public domain, it is also possible to run the installation with this workaround providing pseudo-public entries for the created servers in the /etc/hosts file of your local machine. But this is very cumbersome and error-prone; thus not recommended here.

    Create an ssh key

    To access the cluster nodes via SSH later, we need an ssh key first. So if you don’t have a key yet, create one now and add it to your ssh-agent, as follows:

    ssh-keygen -t ed25519 -f ~/.ssh/openshift_key
    ssh-add ~/.ssh/openshift_key

    Make sure to remember your key passphrase if you specified one, otherwise you won’t be able to use your key again later.

    Install the OpenShift client and installer

    Now we will download and install the OpenShift client and installer on your local host. 

    Create a folder for storing the files related to the installation:

    mkdir openshift
    cd openshift

    Next download the installer and client. Then copy the binaries to a folder in your $PATH, as follows:

    curl -O \
      https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.17.15/openshift-install-linux.tar.gz
    tar -xaf openshift-install-linux.tar.gz
    mkdir ~/bin                              # If you don’t have a private “bin” directory yet
    mv -v openshift-install ~/bin/
    
    curl -O \
      https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.17.15/openshift-client-linux.tar.gz
    tar -xaf openshift-client-linux.tar.gz
    mv -v oc ~/bin/

    You should now be able to run the commands in the shell. You can check with the oc --help command to see the help text of the oc command.

    Obtain an OpenShift pull secret

    To run the installer, we also need to obtain an OpenShift pull secret by visiting OpenShift downloads and login with your Red Hat account. Then complete the following steps:

    1. In the left menu, click on Cluster List.
    2. Click the Create Cluster button.
    3. Locate the Run it yourself section and select Azure (x86_64).
    4. Click on Automated to select the installer provisioned infrastructure.
    5. Click the Download pull secret button and save the file under the name “pull-secret” in the OpenShift folder you created earlier. Make sure nobody else gets access to it.

    In case you haven’t installed the openshift-installer and client in the previous step, you can also download the corresponding packages.

    Get a Service Principal with client secret on Azure

    Now that we have everything we need from the Red Hat side, we can continue on Azure. Go to the Azure portal and log in.

    To allow the RHOCP installer to create virtual machines for us, we require a Service Principal with a client secret. If you don’t have a Service Principal for this yet, follow these steps to create one:

    • In the upper search box, type in "Microsoft Entra ID" and click on the result in the Services section to get to the corresponding page (Figure 1).
    A screenshot that shows where to search for "Microsoft Entra ID"
    Figure 1: A screenshot that shows where to search for “Microsoft Entra ID” in the Azure portal.
    • On the Overview screen, copy the Tenant ID and store it for later.
    • In the left hand menu, click on App registrations in the Manage section.
    • Now click on + New Registration, provide a name for the service principal and click Register.
    • From the overview page, copy the Application (client) ID of the service principal that you just created and store it for later.
    • Next click on the Add certificate or secret link.
    • Click on + New Client secret, add a short description and expiry date and click Add.
    • Locate the secret under Value and save it in a file on your local machine. Please note that you cannot view this value again later, so this needs to be done immediately.

    Configure access permissions of your Service Principal

    Switch to your home screen in Azure and select Subscriptions. You should have a subscription ready to use for the installation. Note the corresponding subscription ID from the list, since we will need it again later. Then complete the following steps:

    • Click on the “Subscription Name” of your subscription and then select Access Control (IAM) in the left-hand column.
    • Select + Add in the upper left and choose Add role assignment.
    • Switch to the Privileged administrator roles tab and select Contributor. 
    • Click the Next button at the bottom of the page.
    • Click on + Select members and search for the name of the Service Principal that you want to use. 
    • Choose the entry, then click on the Select button at the bottom of the page.
    • Click the Next button to get to the Assignment type tab and double check the information.
    • Click on the Next button again to get to the Review + assign tab. Double check the information here. If it looks sane, press the Review + assign button at the bottom left of the page to finalize the role assignment.

    Once you finish the previous setting, do the same steps again. But this time, use these modified steps instead:

    • When you come to the Privileged administrator roles tab, select User Access Administrator instead of Contributor this time. 
    • Then click the Next button and select the Service Principal as a member again. 
    • Go to the Conditions tab and select Allow User to assign all roles. 
    • Finally finish the setup by reviewing and confirming the information in the Review + assign tab.

    Install OpenShift

    Now that we finished all the preparation work, we can start the installation itself.

    Create the install-config file

    Run the following command to create a configuration file with the installer:

    openshift-install create install-config --dir ./installer-dir

    Answer the installer questions to set up the required information as follows:

    • Enter file name of your SSH key (.../openshift_key.pub).
    • Select Azure as platform.
    • If this is the first time you are installing, be prepared to provide answers to these questions:
      • Your Azure subscription ID
      • The tenant ID
      • The service principal client ID (i.e. its application ID)
      • The client secret of the service principal
    • Select a region close to you.
    • Select your base domain.
    • Provide a name for your cluster.
    • Paste-in the pull secret that you downloaded from cloud.redhat.com.

    This should create an “install-config.yaml” file in the installer-dir. To continue with installing RHOCP on confidential VMs, open the file. Replace the compute and controlPlane sections with the following settings:

    compute:
    - architecture: amd64
      hyperthreading: Enabled
      name: worker
      platform:
        azure:
          type: Standard_DC4ads_v5
          settings:
            securityType: ConfidentialVM
            confidentialVM:
              uefiSettings:
                secureBoot: Enabled
                virtualizedTrustedPlatformModule: Enabled
          osDisk:
            securityProfile:
              securityEncryptionType: VMGuestStateOnly
            diskSizeGB: 256
      replicas: 3
    controlPlane:
      architecture: amd64
      hyperthreading: Enabled
      name: master
      platform:
        azure:
          type: Standard_DC8ads_v5
          settings:
            securityType: ConfidentialVM
            confidentialVM:
              uefiSettings:
                secureBoot: Enabled
                virtualizedTrustedPlatformModule: Enabled
          osDisk:
            securityProfile:
              securityEncryptionType: VMGuestStateOnly
            diskSizeGB: 256
      replicas: 3

    You can find additional information in the Enabling confidential VMs section of the RHOCP installing instructions.

    Starting the installation

    Now we should be all set to do the installation. Run the following command to start it:

    openshift-install create cluster --dir ./installer-dir

    Once the installation is finished, write down the password for the kubeadmin user printed at the end of the log.

    Testing the installation

    Open the console-openshift-console.apps… link in your browser. You should see the RHOCP user interface there. Log in as “kubeadmin” with the password that you got at the end of the installation.

    Now you can enjoy exploring your RHOCP installation. If you want to test deployment of a container, you can use nginxinc/nginx-unprivileged as a very simple test.

    To test whether the nodes of the cluster run on SEV-enabled hardware, you can install the openshift-clients tool and execute the following in the shell of your local machine:

    export KUBECONFIG=$PWD/installer-dir/auth/kubeconfig
    for node in $(oc get nodes -o=custom-columns=NAME:.metadata.name --no-headers) ; do \
      echo "$node:" $(oc debug -q "node/$node" -- dmesg -t | grep SEV) ; \
    done

    This should print out the name of each node, followed by the string, “Memory Encryption Features active: AMD SEV.” Of course this is only an indication that the nodes are running on secure hardware, not a sufficient reason to fully trust this installation. For the latter, proper attestation is required, too. We will talk about this in a future article.

    Shutting down the cluster

    If you don’t actively work with your RHOCP installation anymore, you should shut down the VMs to avoid costs for the VMs. Please refer to the RHOCP documentation for the instructions on how to do this gracefully.

    And if you don’t need your installation at all anymore, you can destroy the cluster completely by running the following command: openshift-install destroy cluster --dir ./installer-dir.

    Summary

    In this article, you learned how a user can leverage the available AMD SEV-SNP support on Azure to deploy an OpenShift cluster on confidential nodes. This way, you can use strong memory encryption and isolation mechanisms to protect the confidentiality of nodes on the Azure infrastructure. For more information, refer to the article, Confidential computing platform-specific details. 

    For a full installation for production needs, please visit the documentation for installing RHOCP on Azure instead. If you are just looking for a managed, non-confidential RHOCP installation, you may want to consider using Azure Red Hat OpenShift” (ARO) instead.

    Related Posts

    • Create software templates for VMs with OpenShift Virtualization

    • How to deploy confidential containers on bare metal

    • Deallocate an Azure VM Using the Azure CLI on RHEL

    • How to deploy JBoss EAP on an Azure virtual machine

    Recent Posts

    • Build container images in CI/CD with Tekton and Buildpacks

    • How to deploy OpenShift AI & Service Mesh 3 on one cluster

    • JVM tuning for Red Hat Data Grid on Red Hat OpenShift 4

    • Exploring Llama Stack with Python: Tool calling and agents

    • Enhance data security in OpenShift Data Foundation

    What’s up next?

    Download the OpenShift command-line essentials cheat sheet for developers to discover the most useful commands for working with the oc CLI.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue