0
0
Azurecloud~5 mins

Cloud deployment models (public, private, hybrid) in Azure - Commands & Configuration

Choose your learning style9 modes available
Introduction
Cloud deployment models describe where and how cloud services are hosted and accessed. They solve the problem of choosing the right environment for your applications and data based on security, control, and cost needs.
When you want to use cloud services managed by a provider without managing hardware, use a public cloud.
When your company needs full control over data and infrastructure for security, use a private cloud.
When you want to combine both public and private clouds to balance flexibility and control, use a hybrid cloud.
When you need to keep sensitive data on-premises but use cloud for extra capacity during peak times.
When you want to test new applications in the public cloud before moving them to your private cloud.
Commands
This command shows details about your current Azure subscription and environment, helping you confirm you are connected to the public cloud.
Terminal
az account show
Expected OutputExpected
{ "environmentName": "AzureCloud", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "isDefault": true, "name": "My Azure Subscription", "state": "Enabled", "tenantId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", "user": { "name": "user@example.com", "type": "user" } }
This command checks the status of a private cloud machine connected to Azure Arc, showing how private resources can be managed from Azure.
Terminal
az connectedmachine show --name my-private-machine --resource-group my-resource-group
Expected OutputExpected
{ "name": "my-private-machine", "resourceGroup": "my-resource-group", "status": "Connected", "osName": "Windows Server 2019", "location": "eastus" }
--name - Specifies the name of the connected machine
--resource-group - Specifies the Azure resource group containing the machine
This command creates a virtual network in Azure to connect resources in a hybrid cloud setup, allowing communication between public and private environments.
Terminal
az network vnet create --name hybrid-vnet --resource-group my-resource-group --address-prefixes 10.0.0.0/16 --subnet-name hybrid-subnet --subnet-prefix 10.0.1.0/24
Expected OutputExpected
{ "newVNet": { "addressSpace": { "addressPrefixes": [ "10.0.0.0/16" ] }, "location": "eastus", "name": "hybrid-vnet", "resourceGroup": "my-resource-group", "subnets": [ { "name": "hybrid-subnet", "addressPrefix": "10.0.1.0/24" } ] } }
--name - Sets the name of the virtual network
--resource-group - Specifies the resource group for the network
--address-prefixes - Defines the IP address range for the virtual network
Key Concept

If you remember nothing else from this pattern, remember: public clouds share resources managed by providers, private clouds are dedicated to you, and hybrid clouds combine both for flexibility.

Common Mistakes
Trying to manage private cloud resources without connecting them to Azure Arc.
Azure cannot manage private resources unless they are connected, so you won't see or control them from Azure.
Use Azure Arc to connect private machines to Azure for unified management.
Creating a virtual network without specifying the correct address space.
Incorrect address space can cause IP conflicts or prevent resources from communicating properly.
Plan and specify non-overlapping IP ranges when creating virtual networks.
Assuming public cloud data is private and secure without additional controls.
Public cloud data is shared infrastructure; sensitive data needs encryption and access controls.
Use encryption and identity management to protect data in public clouds.
Summary
Use 'az account show' to confirm you are working in the public Azure cloud environment.
Use Azure Arc commands like 'az connectedmachine show' to manage private cloud resources connected to Azure.
Create virtual networks with 'az network vnet create' to enable hybrid cloud connectivity between public and private resources.