0% found this document useful (0 votes)
113 views107 pages

Midentitylogs

Uploaded by

shivangrana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views107 pages

Midentitylogs

Uploaded by

shivangrana123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 107

Microsoft Windows [Version 10.0.22631.

4460]
(c) Microsoft Corporation. All rights reserved.

C:\GithubProjects\ManagedIdentity\RdWebApp>az group create --name rd-resource-group


--location centralus
{
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group",
"location": "centralus",
"managedBy": null,
"name": "rd-resource-group",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}

C:\GithubProjects\ManagedIdentity\RdWebApp>az sql server create --name rd-sql-


server --resource-group rd-resource-group--location centralus --admin-user rd-admin
--admin-password rdAdmin123@
(PasswordNotComplex) Password validation failed. The password does not meet policy
requirements because it is not complex enough.
Code: PasswordNotComplex
Message: Password validation failed. The password does not meet policy requirements
because it is not complex enough.

C:\GithubProjects\ManagedIdentity\RdWebApp>az sql server create --name rd-sql-


server --resource-group rd-resource-group--location centralus --admin-user rd-admin
--admin-password rdNoida123@
{
"administratorLogin": "rd-admin",
"administratorLoginPassword": null,
"administrators": null,
"externalGovernanceStatus": "Disabled",
"federatedClientId": null,
"fullyQualifiedDomainName": "rd-sql-server.database.windows.net",
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server",
"identity": null,
"isIPv6Enabled": null,
"keyId": null,
"kind": "v12.0",
"location": "centralus",
"minimalTlsVersion": "1.2",
"name": "rd-sql-server",
"primaryUserAssignedIdentityId": null,
"privateEndpointConnections": [],
"publicNetworkAccess": "Enabled",
"resourceGroup": "rd-resource-group",
"restrictOutboundNetworkAccess": "Disabled",
"state": "Ready",
"tags": null,
"type": "Microsoft.Sql/servers",
"version": "12.0",
"workspaceFeature": null
}
C:\GithubProjects\ManagedIdentity\RdWebApp>az sql db create --name rd-sql-db --
resource-group rd-resource-group --server rd-sql-server --service-objective S1
{
"autoPauseDelay": null,
"availabilityZone": "NoPreference",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"createMode": null,
"creationDate": "2024-12-10T15:48:56.927000+00:00",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S1",
"currentSku": {
"capacity": 20,
"family": null,
"name": "Standard",
"size": null,
"tier": "Standard"
},
"databaseId": "3a9335dd-24ad-4f4a-a6e9-d1274a7076e7",
"defaultSecondaryLocation": "eastus2",
"earliestRestoreDate": null,
"edition": "Standard",
"elasticPoolId": null,
"elasticPoolName": null,
"encryptionProtector": null,
"encryptionProtectorAutoRotation": null,
"failoverGroupId": null,
"federatedClientId": null,
"freeLimitExhaustionBehavior": null,
"highAvailabilityReplicaCount": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db",
"identity": null,
"isInfraEncryptionEnabled": false,
"keys": null,
"kind": "v12.0,user",
"ledgerOn": false,
"licenseType": null,
"location": "centralus",
"longTermRetentionBackupResourceId": null,
"maintenanceConfigurationId": "/subscriptions/3510f376-2d4c-4c44-9e12-
d72afb4c31fc/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/
SQL_Default",
"managedBy": null,
"manualCutover": null,
"maxLogSizeBytes": null,
"maxSizeBytes": 268435456000,
"minCapacity": null,
"name": "rd-sql-db",
"pausedDate": null,
"performCutover": null,
"preferredEnclaveType": null,
"readScale": "Disabled",
"recoverableDatabaseId": null,
"recoveryServicesRecoveryPointId": null,
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S1",
"resourceGroup": "rd-resource-group",
"restorableDroppedDatabaseId": null,
"restorePointInTime": null,
"resumedDate": null,
"sampleName": null,
"secondaryType": null,
"sku": {
"capacity": 20,
"family": null,
"name": "Standard",
"size": null,
"tier": "Standard"
},
"sourceDatabaseDeletionDate": null,
"sourceDatabaseId": null,
"sourceResourceId": null,
"status": "Online",
"tags": null,
"type": "Microsoft.Sql/servers/databases",
"useFreeLimit": null,
"zoneRedundant": false
}

C:\GithubProjects\ManagedIdentity\RdWebApp>az sql server identity assign --name rd-


sql-server --resource-group rd-resource-group
'identity' is misspelled or not recognized by the system.

Examples from AI knowledge base:


https://aka.ms/cli_ref
Read more about the command in reference docs

C:\GithubProjects\ManagedIdentity\RdWebApp>az aks create --resource-group rd-


resource-group --name rd-aks-cluster --node-count 1 --enable-managed-identity --
enable-addons monitoring --generate-ssh-keys
Bad Request({"error":{"code":"InvalidPayload","message":"Data collection rule is
invalid","details":[{"code":"InvalidOutputTable","message":"Table for output stream
'Microsoft-Perf' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
ContainerInventory' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
ContainerLog' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
ContainerLogV2' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
ContainerNodeInventory' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubeEvents' is notavailable for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubeMonAgentEvents' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubeNodeInventory' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubePodInventory' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubePVInventory' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
KubeServices' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"},
{"code":"InvalidOutputTable","message":"Table for output stream 'Microsoft-
InsightsMetrics' is not available for destination 'la-
workspace'.","target":"properties.dataFlows[0]"}]}})

C:\GithubProjects\ManagedIdentity\RdWebApp>az aks create --resource-group rd-


resource-group --name rd-aks-cluster --node-count 1 --enable-managed-identity --
enable-addons monitoring --generate-ssh-keys
{
"aadProfile": null,
"addonProfiles": {
"omsagent": {
"config": {
"logAnalyticsWorkspaceResourceID": "/subscriptions/3510f376-2d4c-4c44-9e12-
d72afb4c31fc/resourceGroups/DefaultResourceGroup-CUS/providers/
Microsoft.OperationalInsights/workspaces/DefaultWorkspace-3510f376-2d4c-4c44-9e12-
d72afb4c31fc-CUS",
"useAADAuth": "true"
},
"enabled": true,
"identity": null
}
},
"agentPoolProfiles": [
{
"availabilityZones": null,
"capacityReservationGroupId": null,
"count": 1,
"creationData": null,
"currentOrchestratorVersion": "1.30.6",
"eTag": null,
"enableAutoScaling": false,
"enableEncryptionAtHost": false,
"enableFips": false,
"enableNodePublicIp": false,
"enableUltraSsd": false,
"gpuInstanceProfile": null,
"hostGroupId": null,
"kubeletConfig": null,
"kubeletDiskType": "OS",
"linuxOsConfig": null,
"maxCount": null,
"maxPods": 250,
"minCount": null,
"mode": "System",
"name": "nodepool1",
"networkProfile": null,
"nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0",
"nodeLabels": null,
"nodePublicIpPrefixId": null,
"nodeTaints": null,
"orchestratorVersion": "1.30",
"osDiskSizeGb": 128,
"osDiskType": "Managed",
"osSku": "Ubuntu",
"osType": "Linux",
"podSubnetId": null,
"powerState": {
"code": "Running"
},
"provisioningState": "Succeeded",
"proximityPlacementGroupId": null,
"scaleDownMode": null,
"scaleSetEvictionPolicy": null,
"scaleSetPriority": null,
"securityProfile": {
"enableSecureBoot": false,
"enableVtpm": false
},
"spotMaxPrice": null,
"tags": null,
"type": "VirtualMachineScaleSets",
"upgradeSettings": {
"drainTimeoutInMinutes": null,
"maxSurge": "10%",
"nodeSoakDurationInMinutes": null
},
"vmSize": "Standard_DS2_v2",
"vnetSubnetId": null,
"windowsProfile": null,
"workloadRuntime": null
}
],
"apiServerAccessProfile": null,
"autoScalerProfile": null,
"autoUpgradeProfile": {
"nodeOsUpgradeChannel": "NodeImage",
"upgradeChannel": null
},
"azureMonitorProfile": {
"metrics": null
},
"azurePortalFqdn": "rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.portal.hcp.centralus.azmk8s.io",
"currentKubernetesVersion": "1.30.6",
"disableLocalAccounts": false,
"diskEncryptionSetId": null,
"dnsPrefix": "rd-aks-clu-rd-resource-grou-3510f3",
"eTag": null,
"enablePodSecurityPolicy": null,
"enableRbac": true,
"extendedLocation": null,
"fqdn": "rd-aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io",
"fqdnSubdomain": null,
"httpProxyConfig": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/rd-
resource-group/providers/Microsoft.ContainerService/managedClusters/rd-aks-
cluster",
"identity": {
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"identityProfile": {
"kubeletidentity": {
"clientId": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"objectId": "b027f198-e912-4133-917c-903dba7ec313",
"resourceId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool"
}
},
"ingressProfile": null,
"kubernetesVersion": "1.30",
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": "ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQCfv4yGZmtEcQNKynjTVjKI4HwqyDqBBPfYq/rTctutZ/u46IiW/
bdoppLC/yRbhQ9k98in/
WcPrt1RO9xqQfp+Ef66mmfg5E8AffZpBITZmdQAMs361aASGJd43LGfT2leU69z1SHxYvBBKpV5xki7CqTs
nWKPrXDo9R0inxjB35S1x4TrpolJ7+0sNoHez0M4l1CNiJE8MYNqm2AQva7l/
IADmC+on8+GJ176fw8BlTYRL7+NizrtoYNa/
+Fo+LKCZ8sk0oXPaxJpspeIUaK7fgNJ2GU9bkbusnlnPsUMEQe5+UkHAH2ROjcaH7r1YeOJUDtgdWuAT1I/
9fHgOLoR"
}
]
}
},
"location": "centralus",
"maxAgentPools": 100,
"metricsProfile": {
"costAnalysis": {
"enabled": false
}
},
"name": "rd-aks-cluster",
"networkProfile": {
"advancedNetworking": null,
"dnsServiceIp": "10.0.0.10",
"ipFamilies": [
"IPv4"
],
"loadBalancerProfile": {
"allocatedOutboundPorts": null,
"backendPoolType": "nodeIPConfiguration",
"effectiveOutboundIPs": [
{
"id":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.Network/publicIPAddresses/
f47be2c2-c86f-43f4-8ffc-0514e6b514c3",
"resourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus"
}
],
"enableMultipleStandardLoadBalancers": null,
"idleTimeoutInMinutes": null,
"managedOutboundIPs": {
"count": 1,
"countIpv6": null
},
"outboundIPs": null,
"outboundIpPrefixes": null
},
"loadBalancerSku": "standard",
"natGatewayProfile": null,
"networkDataplane": "azure",
"networkMode": null,
"networkPlugin": "azure",
"networkPluginMode": "overlay",
"networkPolicy": "none",
"outboundType": "loadBalancer",
"podCidr": "10.244.0.0/16",
"podCidrs": [
"10.244.0.0/16"
],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": [
"10.0.0.0/16"
]
},
"nodeResourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus",
"nodeResourceGroupProfile": null,
"oidcIssuerProfile": {
"enabled": false,
"issuerUrl": null
},
"podIdentityProfile": null,
"powerState": {
"code": "Running"
},
"privateFqdn": null,
"privateLinkResources": null,
"provisioningState": "Succeeded",
"publicNetworkAccess": null,
"resourceGroup": "rd-resource-group",
"resourceUid": "675863feed90cf0001b8e71f",
"securityProfile": {
"azureKeyVaultKms": null,
"defender": null,
"imageCleaner": null,
"workloadIdentity": null
},
"serviceMeshProfile": null,
"servicePrincipalProfile": {
"clientId": "msi",
"secret": null
},
"sku": {
"name": "Base",
"tier": "Free"
},
"storageProfile": {
"blobCsiDriver": null,
"diskCsiDriver": {
"enabled": true
},
"fileCsiDriver": {
"enabled": true
},
"snapshotController": {
"enabled": true
}
},
"supportPlan": "KubernetesOfficial",
"systemData": null,
"tags": null,
"type": "Microsoft.ContainerService/ManagedClusters",
"upgradeSettings": null,
"windowsProfile": null,
"workloadAutoScalerProfile": {
"keda": null,
"verticalPodAutoscaler": null
}
}

C:\GithubProjects\ManagedIdentity\RdWebApp>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --query"identity" -o json
{
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApp>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
A different object named rd-aks-cluster already exists in your kubeconfig file.
Overwrite? (y/n): y
A different object named clusterUser_rd-resource-group_rd-aks-cluster already
exists in your kubeconfig file.
Overwrite? (y/n): y
Merged "rd-aks-cluster" as current context in C:\Users\srana\.kube\config

C:\GithubProjects\ManagedIdentity\RdWebApp>kubectl get nodes


NAME STATUS ROLES AGE VERSION
aks-nodepool1-49218028-vmss000000 Ready <none> 13m v1.30.6

C:\GithubProjects\ManagedIdentity\RdWebApp>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --
queryidentityProfile.kubeletidentity.clientId -o tsv
9e15df05-bc39-4b1f-93ae-00d874e0d297

C:\GithubProjects\ManagedIdentity\RdWebApp>az sql server ad-admin create --


resource-group rd-resource-group --server rd-sql-server --display-name RdAdmin --
object-id 9e15df05-bc39-4b1f-93ae-00d874e0d297
{
"administratorType": "ActiveDirectory",
"azureAdOnlyAuthentication": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/administrators/
ActiveDirectory",
"login": "RdAdmin",
"name": "ActiveDirectory",
"resourceGroup": "rd-resource-group",
"sid": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "Microsoft.Sql/servers"
}

C:\GithubProjects\ManagedIdentity\RdWebApp>az role assignment create --assignee


bd6ade3a-d0ae-4ecd-82df-768a781a04bf --role Contributor --scope
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-resource-
group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db
Cannot find user or service principal in graph database for 'bd6ade3a-d0ae-4ecd-
82df-768a781a04bf'. If the assignee is an appId, make sure the corresponding
service principal is created with 'az ad sp create --id bd6ade3a-d0ae-4ecd-82df-
768a781a04bf'.

C:\GithubProjects\ManagedIdentity\RdWebApp>az role assignment create --assignee


9e15df05-bc39-4b1f-93ae-00d874e0d297 --role Contributor --scope
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-resource-
group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db
{
"condition": null,
"conditionVersion": null,
"createdBy": null,
"createdOn": "2024-12-10T16:15:19.077123+00:00",
"delegatedManagedIdentityResourceId": null,
"description": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db/
providers/Microsoft.Authorization/roleAssignments/7b210e17-16f7-40bd-a2a2-
ca9ed063357f",
"name": "7b210e17-16f7-40bd-a2a2-ca9ed063357f",
"principalId": "b027f198-e912-4133-917c-903dba7ec313",
"principalType": "ServicePrincipal",
"resourceGroup": "rd-resource-group",
"roleDefinitionId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/providers/Microsoft.Authorizat
ion/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c",
"scope": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db",
"type": "Microsoft.Authorization/roleAssignments",
"updatedBy": "d9c96717-80e2-4d88-b425-997fb2334163",
"updatedOn": "2024-12-10T16:15:20.686594+00:00"
}

C:\GithubProjects\ManagedIdentity\RdWebApp>cd..

C:\GithubProjects\ManagedIdentity>cd RdWebApi

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package Azure.Identity

Build succeeded in 0.9s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Azure.Identity' into project 'C:\
GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json
info : GET
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : GET
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : OK
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json 1881ms
info : OK
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0 284ms
info : OK
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0 294ms
info : Restoring packages for C:\GithubProjects\ManagedIdentity\RdWebApi\
RdWebApi.csproj...
info : CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.25.23.06.43/vulnerability.base.jso
n
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.26.11.06.45/2024.11.26.11.06.45/
vulnerability.update.json
info : Package 'Azure.Identity' is compatible with all the specified frameworks in
project 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : PackageReference for package 'Azure.Identity' version '1.13.1' added to file
'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : Generating MSBuild file C:\GithubProjects\ManagedIdentity\RdWebApi\obj\
RdWebApi.csproj.nuget.g.targets.
info : Writing assets file to disk. Path: C:\GithubProjects\ManagedIdentity\
RdWebApi\obj\project.assets.json
log : Restored C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj (in 467
ms).

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package


Microsoft.Data.SqlClient

Build succeeded in 0.9s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Microsoft.Data.SqlClient' into project
'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/microsoft.data.sqlclient/
index.json
info : OK
https://api.nuget.org/v3/registration5-gz-semver2/microsoft.data.sqlclient/
index.json 645ms
info : GET
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : GET
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : OK
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0 280ms
info : OK
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0 303ms
info : Restoring packages for C:\GithubProjects\ManagedIdentity\RdWebApi\
RdWebApi.csproj...
info : CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.25.23.06.43/vulnerability.base.jso
n
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.26.11.06.45/2024.11.26.11.06.45/
vulnerability.update.json
info : Package 'Microsoft.Data.SqlClient' is compatible with all the specified
frameworks in project 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : PackageReference for package 'Microsoft.Data.SqlClient' version '5.2.2'
added to file 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : Writing assets file to disk. Path: C:\GithubProjects\ManagedIdentity\
RdWebApi\obj\project.assets.json
log : Restored C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj (in 855
ms).

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr create --resource-group rd-


resource-group --name rdregistry --sku Basic
{
"adminUserEnabled": false,
"anonymousPullEnabled": false,
"creationDate": "2024-12-10T16:53:44.208118+00:00",
"dataEndpointEnabled": false,
"dataEndpointHostNames": [],
"encryption": {
"keyVaultProperties": null,
"status": "disabled"
},
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.ContainerRegistry/registries/rdregistry",
"identity": null,
"location": "centralus",
"loginServer": "rdregistry.azurecr.io",
"metadataSearch": "Disabled",
"name": "rdregistry",
"networkRuleBypassOptions": "AzureServices",
"networkRuleSet": null,
"policies": {
"azureAdAuthenticationAsArmPolicy": {
"status": "enabled"
},
"exportPolicy": {
"status": "enabled"
},
"quarantinePolicy": {
"status": "disabled"
},
"retentionPolicy": {
"days": 7,
"lastUpdatedTime": "2024-12-10T16:53:52.017845+00:00",
"status": "disabled"
},
"softDeletePolicy": {
"lastUpdatedTime": "2024-12-10T16:53:52.017898+00:00",
"retentionDays": 7,
"status": "disabled"
},
"trustPolicy": {
"status": "disabled",
"type": "Notary"
}
},
"privateEndpointConnections": [],
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled",
"resourceGroup": "rd-resource-group",
"sku": {
"name": "Basic",
"tier": "Basic"
},
"status": null,
"systemData": {
"createdAt": "2024-12-10T16:53:44.208118+00:00",
"createdBy": "Shivang.Rana@watchguard.com",
"createdByType": "User",
"lastModifiedAt": "2024-12-10T16:53:44.208118+00:00",
"lastModifiedBy": "Shivang.Rana@watchguard.com",
"lastModifiedByType": "User"
},
"tags": {},
"type": "Microsoft.ContainerRegistry/registries",
"zoneRedundancy": "Disabled"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest .


[+] Building 24.5s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.3s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:c47082926b9814a26457e056992a611236350d4aefe
8864efbcf 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 5.57kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
15.3s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.1s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.3s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:614abeb7c8f4bb8938a4848f6f9b78b24554ea2852fefa53e8b470fc0849a24d
0.0s
=> => naming to docker.io/library/rdwebapi:latest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry


Login Succeeded

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest


rdregistry.azurecr.io/rdwebapi:latest

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
198cc9e73713: Pushed
5f70bf18a086: Pushed
0095a57d6d0b: Pushed
029b5e5a6bb4: Pushed
bce859c4da42: Pushed
c91bbd2d7529: Pushed
d1368047a87c: Pushed
6a4fdc7ff1bf: Pushed
latest: digest:
sha256:93679ca273d8d26ca4364d7786f7a2cdef7eeb5111a232945b9bf977e3fa60f0 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi-deployment created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ErrImagePull 0 58s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 70s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 74s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 78s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 81s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 90s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ErrImagePull 0 110s

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest .


[+] Building 9.3s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.6s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:c47082926b9814a26457e056992a611236350d4aefe
8864efbcf 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 812B
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.2s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.2s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> CACHED [final 2/2] COPY --from=publish /app/publish .
0.0s
=> exporting to image
0.0s
=> => exporting layers
0.0s
=> => writing image
sha256:614abeb7c8f4bb8938a4848f6f9b78b24554ea2852fefa53e8b470fc0849a24d
0.0s
=> => naming to docker.io/library/rdwebapi:latest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest


rdregistry.azurecr.io/rdwebapi:latest

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
198cc9e73713: Layer already exists
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest: digest:
sha256:93679ca273d8d26ca4364d7786f7a2cdef7eeb5111a232945b9bf977e3fa60f0 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 2m43s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f service.yaml


service/rdwebapi-service created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 4m22s

C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>az aks update --name rd-aks-cluster --
resource-group rd-resource-group --atta
ch-acr rdregistry
Could not find service principal or user assigned MSI for roleassignment
AAD role propagation done[############################################]
100.0000%keyvaultid: None, enable_kv: None
{
"aadProfile": null,
"addonProfiles": {
"omsagent": {
"config": {
"logAnalyticsWorkspaceResourceID": "/subscriptions/3510f376-2d4c-4c44-9e12-
d72afb4c31fc/resourceGroups/DefaultResourceGroup-CUS/providers/
Microsoft.OperationalInsights/workspaces/DefaultWorkspace-3510f376-2d4c-4c44-9e12-
d72afb4c31fc-CUS",
"useAADAuth": "true"
},
"enabled": true,
"identity": null
}
},
"agentPoolProfiles": [
{
"availabilityZones": null,
"capacityReservationGroupId": null,
"count": 1,
"creationData": null,
"currentOrchestratorVersion": "1.30.6",
"eTag": null,
"enableAutoScaling": false,
"enableEncryptionAtHost": false,
"enableFips": false,
"enableNodePublicIp": false,
"enableUltraSsd": false,
"gpuInstanceProfile": null,
"hostGroupId": null,
"kubeletConfig": null,
"kubeletDiskType": "OS",
"linuxOsConfig": null,
"maxCount": null,
"maxPods": 250,
"minCount": null,
"mode": "System",
"name": "nodepool1",
"networkProfile": null,
"nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0",
"nodeLabels": null,
"nodePublicIpPrefixId": null,
"nodeTaints": null,
"orchestratorVersion": "1.30",
"osDiskSizeGb": 128,
"osDiskType": "Managed",
"osSku": "Ubuntu",
"osType": "Linux",
"podSubnetId": null,
"powerState": {
"code": "Running"
},
"provisioningState": "Succeeded",
"proximityPlacementGroupId": null,
"scaleDownMode": null,
"scaleSetEvictionPolicy": null,
"scaleSetPriority": null,
"securityProfile": {
"enableSecureBoot": false,
"enableVtpm": false
},
"spotMaxPrice": null,
"tags": null,
"type": "VirtualMachineScaleSets",
"upgradeSettings": {
"drainTimeoutInMinutes": null,
"maxSurge": "10%",
"nodeSoakDurationInMinutes": null
},
"vmSize": "Standard_DS2_v2",
"vnetSubnetId": null,
"windowsProfile": null,
"workloadRuntime": null
}
],
"apiServerAccessProfile": null,
"autoScalerProfile": null,
"autoUpgradeProfile": {
"nodeOsUpgradeChannel": "NodeImage",
"upgradeChannel": null
},
"azureMonitorProfile": {
"metrics": null
},
"azurePortalFqdn": "rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.portal.hcp.centralus.azmk8s.io",
"currentKubernetesVersion": "1.30.6",
"disableLocalAccounts": false,
"diskEncryptionSetId": null,
"dnsPrefix": "rd-aks-clu-rd-resource-grou-3510f3",
"eTag": null,
"enablePodSecurityPolicy": null,
"enableRbac": true,
"extendedLocation": null,
"fqdn": "rd-aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io",
"fqdnSubdomain": null,
"httpProxyConfig": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/rd-
resource-group/providers/Microsoft.ContainerService/managedClusters/rd-aks-
cluster",
"identity": {
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"identityProfile": {
"kubeletidentity": {
"clientId": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"objectId": "b027f198-e912-4133-917c-903dba7ec313",
"resourceId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool"
}
},
"ingressProfile": null,
"kubernetesVersion": "1.30",
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": "ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQCfv4yGZmtEcQNKynjTVjKI4HwqyDqBBPfYq/rTctutZ/u46IiW/
bdoppLC/yRbhQ9k98in/
WcPrt1RO9xqQfp+Ef66mmfg5E8AffZpBITZmdQAMs361aASGJd43LGfT2leU69z1SHxYvBBKpV5xki7CqTs
nWKPrXDo9R0inxjB35S1x4TrpolJ7+0sNoHez0M4l1CNiJE8MYNqm2AQva7l/
IADmC+on8+GJ176fw8BlTYRL7+NizrtoYNa/
+Fo+LKCZ8sk0oXPaxJpspeIUaK7fgNJ2GU9bkbusnlnPsUMEQe5+UkHAH2ROjcaH7r1YeOJUDtgdWuAT1I/
9fHgOLoR"
}
]
}
},
"location": "centralus",
"maxAgentPools": 100,
"metricsProfile": {
"costAnalysis": {
"enabled": false
}
},
"name": "rd-aks-cluster",
"networkProfile": {
"advancedNetworking": null,
"dnsServiceIp": "10.0.0.10",
"ipFamilies": [
"IPv4"
],
"loadBalancerProfile": {
"allocatedOutboundPorts": null,
"backendPoolType": "nodeIPConfiguration",
"effectiveOutboundIPs": [
{
"id":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.Network/publicIPAddresses/
f47be2c2-c86f-43f4-8ffc-0514e6b514c3",
"resourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus"
}
],
"enableMultipleStandardLoadBalancers": null,
"idleTimeoutInMinutes": null,
"managedOutboundIPs": {
"count": 1,
"countIpv6": null
},
"outboundIPs": null,
"outboundIpPrefixes": null
},
"loadBalancerSku": "standard",
"natGatewayProfile": null,
"networkDataplane": "azure",
"networkMode": null,
"networkPlugin": "azure",
"networkPluginMode": "overlay",
"networkPolicy": "none",
"outboundType": "loadBalancer",
"podCidr": "10.244.0.0/16",
"podCidrs": [
"10.244.0.0/16"
],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": [
"10.0.0.0/16"
]
},
"nodeResourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus",
"nodeResourceGroupProfile": null,
"oidcIssuerProfile": {
"enabled": false,
"issuerUrl": null
},
"podIdentityProfile": null,
"powerState": {
"code": "Running"
},
"privateFqdn": null,
"privateLinkResources": null,
"provisioningState": "Succeeded",
"publicNetworkAccess": null,
"resourceGroup": "rd-resource-group",
"resourceUid": "675863feed90cf0001b8e71f",
"securityProfile": {
"azureKeyVaultKms": null,
"defender": null,
"imageCleaner": null,
"workloadIdentity": null
},
"serviceMeshProfile": null,
"servicePrincipalProfile": {
"clientId": "msi",
"secret": null
},
"sku": {
"name": "Base",
"tier": "Free"
},
"storageProfile": {
"blobCsiDriver": null,
"diskCsiDriver": {
"enabled": true
},
"fileCsiDriver": {
"enabled": true
},
"snapshotController": {
"enabled": true
}
},
"supportPlan": "KubernetesOfficial",
"systemData": null,
"tags": null,
"type": "Microsoft.ContainerService/ManagedClusters",
"upgradeSettings": null,
"windowsProfile": null,
"workloadAutoScalerProfile": {
"keda": null,
"verticalPodAutoscaler": null
}
}

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 10m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 0/1 ImagePullBackOff 0 10m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl restart
error: unknown command "restart" for "kubectl"

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 1/1 Running 0 11m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 1/1 Running 0 11m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-deployment-8598756c9d-r7k7h 1/1 Running 0 16m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get services


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP
88m
rdwebapi-service LoadBalancer 10.0.135.250 48.214.172.236 80:30206/TCP
12m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get service rdwebapi-service -o


yaml
apiVersion: v1
kind: Service
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":
{},"name":"rdwebapi-service","namespace":"default"},"spec":{"ports":
[{"port":80,"protocol":"TCP","targetPort":80}],"selector":
{"app":"rdwebapi"},"type":"LoadBalancer"}}
creationTimestamp: "2024-12-10T17:10:19Z"
finalizers:
- service.kubernetes.io/load-balancer-cleanup
name: rdwebapi-service
namespace: default
resourceVersion: "18172"
uid: d59838ea-76d4-4827-95ee-89b29e0f615f
spec:
allocateLoadBalancerNodePorts: true
clusterIP: 10.0.135.250
clusterIPs:
- 10.0.135.250
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- nodePort: 30206
port: 80
protocol: TCP
targetPort: 80
selector:
app: rdwebapi
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer:
ingress:
- ip: 48.214.172.236
ipMode: VIP

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get service rdwebapi-service


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
rdwebapi-service LoadBalancer 10.0.135.250 48.214.172.236 80:30206/TCP
25m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get service rdwebapi-service


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
rdwebapi-service LoadBalancer 10.0.135.250 48.214.172.236 80:30206/TCP
10h

C:\GithubProjects\ManagedIdentity\RdWebApi>az role assignment create --assignee


9e15df05-bc39-4b1f-93ae-00d874e0d297 --role Contributor --scope
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-resource-
group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db
{
"condition": null,
"conditionVersion": null,
"createdBy": "d9c96717-80e2-4d88-b425-997fb2334163",
"createdOn": "2024-12-10T16:15:20.686594+00:00",
"delegatedManagedIdentityResourceId": null,
"description": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db/
providers/Microsoft.Authorization/roleAssignments/7b210e17-16f7-40bd-a2a2-
ca9ed063357f",
"name": "7b210e17-16f7-40bd-a2a2-ca9ed063357f",
"principalId": "b027f198-e912-4133-917c-903dba7ec313",
"principalName": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"principalType": "ServicePrincipal",
"resourceGroup": "rd-resource-group",
"roleDefinitionId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/providers/Microsoft.Authorizat
ion/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c",
"roleDefinitionName": "Contributor",
"scope": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db",
"type": "Microsoft.Authorization/roleAssignments",
"updatedBy": "d9c96717-80e2-4d88-b425-997fb2334163",
"updatedOn": "2024-12-10T16:15:20.686594+00:00"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az sql server ad-admin create --


resource-group rd-resource-group --server rd-sql-server --display-name RdAdmin --
object-id 9e15df05-bc39-4b1f-93ae-00d874e0d297
{
"administratorType": "ActiveDirectory",
"azureAdOnlyAuthentication": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/administrators/
ActiveDirectory",
"login": "RdAdmin",
"name": "ActiveDirectory",
"resourceGroup": "rd-resource-group",
"sid": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "Microsoft.Sql/servers"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az role assignment create --assignee


9e15df05-bc39-4b1f-93ae-00d874e0d297 --role Contributor --scope
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-resource-
group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db
{
"condition": null,
"conditionVersion": null,
"createdBy": "d9c96717-80e2-4d88-b425-997fb2334163",
"createdOn": "2024-12-10T16:15:20.686594+00:00",
"delegatedManagedIdentityResourceId": null,
"description": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db/
providers/Microsoft.Authorization/roleAssignments/7b210e17-16f7-40bd-a2a2-
ca9ed063357f",
"name": "7b210e17-16f7-40bd-a2a2-ca9ed063357f",
"principalId": "b027f198-e912-4133-917c-903dba7ec313",
"principalName": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"principalType": "ServicePrincipal",
"resourceGroup": "rd-resource-group",
"roleDefinitionId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/providers/Microsoft.Authorizat
ion/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c",
"roleDefinitionName": "Contributor",
"scope": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-
resource-group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db",
"type": "Microsoft.Authorization/roleAssignments",
"updatedBy": "d9c96717-80e2-4d88-b425-997fb2334163",
"updatedOn": "2024-12-10T16:15:20.686594+00:00"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package


Microsoft.Data.SqlClient

Build succeeded in 0.5s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Microsoft.Data.SqlClient' into project
'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/microsoft.data.sqlclient/
index.json
info : OK
https://api.nuget.org/v3/registration5-gz-semver2/microsoft.data.sqlclient/
index.json 334ms
info : GET
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : GET
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : OK
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0 558ms
info : OK
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0 552ms
info : Restoring packages for C:\GithubProjects\ManagedIdentity\RdWebApi\
RdWebApi.csproj...
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
info : An error was encountered when fetching 'GET
https://api.nuget.org/v3/vulnerabilities/index.json'. The request will now be
retried.
info : No such host is known. (api.nuget.org:443)
info : No such host is known.
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
info : An error was encountered when fetching 'GET
https://api.nuget.org/v3/vulnerabilities/index.json'. The request will now be
retried.
info : No such host is known. (api.nuget.org:443)
info : No such host is known.
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
warn : NU1900: Error occurred while getting package vulnerability data: No such
host is known. (api.nuget.org:443)
info : Package 'Microsoft.Data.SqlClient' is compatible with all the specified
frameworks in project 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : PackageReference for package 'Microsoft.Data.SqlClient' version '5.2.2'
updated in file 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : Writing assets file to disk. Path: C:\GithubProjects\ManagedIdentity\
RdWebApi\obj\project.assets.json
log : Restored C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj (in
11.33 sec).

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package Azure.Identity

Build succeeded in 0.4s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Azure.Identity' into project 'C:\
GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json
info : GET
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : GET
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : OK
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0 274ms
info : OK
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0 279ms
info : An error was encountered when fetching 'GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json'. The
request will now be retried.
info : No such host is known. (api.nuget.org:443)
info : No such host is known.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json
info : An error was encountered when fetching 'GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json'. The
request will now be retried.
info : No such host is known. (api.nuget.org:443)
info : No such host is known.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json
error: No such host is known. (api.nuget.org:443)
error: No such host is known.

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get service rdwebapi-service


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
AGE
rdwebapi-service LoadBalancer 10.0.135.250 48.214.172.236 80:30206/TCP
10h

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package


Microsoft.Data.SqlClient

Build succeeded in 0.6s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Microsoft.Data.SqlClient' into project
'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : CACHE
https://api.nuget.org/v3/registration5-gz-semver2/microsoft.data.sqlclient/
index.json
info : CACHE
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : CACHE
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Microsoft.Data.SqlClient'&semVerLevel=2.0.0
info : Restoring packages for C:\GithubProjects\ManagedIdentity\RdWebApi\
RdWebApi.csproj...
info : GET https://api.nuget.org/v3/vulnerabilities/index.json
info : OK https://api.nuget.org/v3/vulnerabilities/index.json 674ms
info : GET
https://api.nuget.org/v3-vulnerabilities/2024.11.25.23.06.43/vulnerability.base.jso
n
info : GET
https://api.nuget.org/v3-vulnerabilities/2024.11.26.11.06.45/2024.11.26.11.06.45/
vulnerability.update.json
info : OK
https://api.nuget.org/v3-vulnerabilities/2024.11.25.23.06.43/vulnerability.base.jso
n 18ms
info : OK
https://api.nuget.org/v3-vulnerabilities/2024.11.26.11.06.45/2024.11.26.11.06.45/
vulnerability.update.json 31ms
info : Package 'Microsoft.Data.SqlClient' is compatible with all the specified
frameworks in project 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : PackageReference for package 'Microsoft.Data.SqlClient' version '5.2.2'
updated in file 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : Writing assets file to disk. Path: C:\GithubProjects\ManagedIdentity\
RdWebApi\obj\project.assets.json
log : Restored C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj (in 907
ms).

C:\GithubProjects\ManagedIdentity\RdWebApi>dotnet add package Azure.Identity

Build succeeded in 0.4s


info : X.509 certificate chain validation will use the default trust store selected
by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected
by .NET for timestamping.
info : Adding PackageReference for package 'Azure.Identity' into project 'C:\
GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : GET
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json
info : OK
https://api.nuget.org/v3/registration5-gz-semver2/azure.identity/index.json 998ms
info : CACHE
https://nugetpackages.watchguard.com/ReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : CACHE
https://nugetpackages.watchguard.com/PreReleaseGallery/api/v2/FindPackagesById()?
id='Azure.Identity'&semVerLevel=2.0.0
info : Restoring packages for C:\GithubProjects\ManagedIdentity\RdWebApi\
RdWebApi.csproj...
info : CACHE https://api.nuget.org/v3/vulnerabilities/index.json
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.25.23.06.43/vulnerability.base.jso
n
info : CACHE
https://api.nuget.org/v3-vulnerabilities/2024.11.26.11.06.45/2024.11.26.11.06.45/
vulnerability.update.json
info : Package 'Azure.Identity' is compatible with all the specified frameworks in
project 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : PackageReference for package 'Azure.Identity' version '1.13.1' updated in
file 'C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj'.
info : Assets file has not changed. Skipping assets file writing. Path: C:\
GithubProjects\ManagedIdentity\RdWebApi\obj\project.assets.json
log : Restored C:\GithubProjects\ManagedIdentity\RdWebApi\RdWebApi.csproj (in 151
ms).

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest .


[+] Building 9.9s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
5.3s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 17.38kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.6s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:6e8594f723968677a0b797e4bc132dbaba434a46824e0981b7dffcebfb252b62
0.0s
=> => naming to docker.io/library/rdwebapi:latest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest


rdregistry.azurecr.io/rdwebapi:latest
C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
5639ee0df2b9: Retrying in 1 second
5f70bf18a086: Preparing
0095a57d6d0b: Retrying in 1 second
029b5e5a6bb4: Retrying in 1 second
bce859c4da42: Retrying in 1 second
c91bbd2d7529: Retrying in 1 second
d1368047a87c: Waiting
6a4fdc7ff1bf: Waiting
unauthorized:

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
5639ee0df2b9: Preparing
5f70bf18a086: Preparing
0095a57d6d0b: Preparing
029b5e5a6bb4: Preparing
bce859c4da42: Waiting
c91bbd2d7529: Waiting
d1368047a87c: Waiting
6a4fdc7ff1bf: Waiting
unauthorized:

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry


Login Succeeded

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
5639ee0df2b9: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest: digest:
sha256:dd9fa2037c7092ef80f552d152f6c2edc9a34a4f9413f304ff506fd18222f689 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f service.yaml


service/rdwebapi-service unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew .


[+] Building 6.9s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.4s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 2.91kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:dfc4144fceb92d9dd6fd84ce0f45e3d2eabbf08ae0ab80c6a681c6034e3d0b15
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
tag does not exist: rdregistry.azurecr.io/rdwebapi:latestnew

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew


rdregistry.azurecr.io/rdwebapi:latestnew
C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
88f719b57ad7: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew: digest:
sha256:f34264c5c5b6ac7316455914d053a9b70a5e9b657258c14beca4960de803bfba size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew2 .


[+] Building 5.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.9s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 2.28kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.6s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:bcef34e4fe6f02b30ab829dc6aab14c543e41915a9228763db46a5403f00cc97
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew2
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew2


rdregistry.azurecr.io/rdwebapi:latestnew2

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew2
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
b0e99a4d7a7f: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew2: digest:
sha256:b96cba7b05f3ba6f532276289f1f8fc857ebe6e548f3d33728d511a2f7c033be size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentity
{
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az ad sp show --id de8ceba2-7a89-45f9-


bd9c-6ef4713cb301
{
"@odata.context":
"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals/$entity",
"accountEnabled": true,
"addIns": [],
"alternativeNames": [
"isExplicit=False",
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/rd-
resource-group/providers/Microsoft.ContainerService/managedClusters/rd-aks-cluster"
],
"appDescription": null,
"appDisplayName": null,
"appId": "57a9ee48-68ed-45f2-9967-e1c45d3c874b",
"appOwnerOrganizationId": null,
"appRoleAssignmentRequired": false,
"appRoles": [],
"applicationTemplateId": null,
"createdDateTime": "2024-12-10T15:53:32Z",
"deletedDateTime": null,
"description": null,
"disabledByMicrosoftStatus": null,
"displayName": "rd-aks-cluster",
"homepage": null,
"id": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"info": null,
"keyCredentials": [],
"loginUrl": null,
"logoutUrl": null,
"notes": null,
"notificationEmailAddresses": [],
"oauth2PermissionScopes": [],
"passwordCredentials": [],
"preferredSingleSignOnMode": null,
"preferredTokenSigningKeyThumbprint": null,
"replyUrls": [],
"resourceSpecificApplicationPermissions": [],
"samlSingleSignOnSettings": null,
"servicePrincipalNames": [
"57a9ee48-68ed-45f2-9967-e1c45d3c874b",
"https://identity.azure.net/n1oTydm+2ieX6nbcVTX1uFpr1UBjSFvlvYU+5XKTMic="
],
"servicePrincipalType": "ManagedIdentity",
"signInAudience": null,
"tags": [],
"tokenEncryptionKeyId": null,
"verifiedPublisher": {
"addedDateTime": null,
"displayName": null,
"verifiedPublisherId": null
}
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentity.principalId
"de8ceba2-7a89-45f9-bd9c-6ef4713cb301"

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew3 .


[+] Building 6.7s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.8s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.14kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.9s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:ac01ba5d54bbc2a617e78ef5a14beb26d4a1195a64d83768f6243cd4a0564d73
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew3
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew3


rdregistry.azurecr.io/rdwebapi:latestnew3

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew3
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
9fc377980be4: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew3: digest:
sha256:0eb8a5120661dbde6d85192dbd83f094d7667269d9d9d95b96ac3627d6be0f15 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew4 .


[+] Building 5.5s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.9s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.33kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.5s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:4679c5dcfcf0882e7f16e71ec59faaf8d313d44f70266dbe3d3bca207b786e5e
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew4
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew4


rdregistry.azurecr.io/rdwebapi:latestnew4

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew4
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
0a65d11be413: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew4: digest:
sha256:18e3fb067cb19ca103b641a7b5362b4a8183abf48eb85abccd2bb3bd71d3e0fb size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew4
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
0a65d11be413: Layer already exists
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew4: digest:
sha256:18e3fb067cb19ca103b641a7b5362b4a8183abf48eb85abccd2bb3bd71d3e0fb size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew5 .


[+] Building 6.2s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.6s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 1.77kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> CACHED [final 2/2] COPY --from=publish /app/publish .
0.0s
=> exporting to image
0.0s
=> => exporting layers
0.0s
=> => writing image
sha256:4679c5dcfcf0882e7f16e71ec59faaf8d313d44f70266dbe3d3bca207b786e5e
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew5
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew5


rdregistry.azurecr.io/rdwebapi:latestnew5
C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew5
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
0a65d11be413: Layer already exists
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew5: digest:
sha256:18e3fb067cb19ca103b641a7b5362b4a8183abf48eb85abccd2bb3bd71d3e0fb size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew6 .


[+] Building 5.6s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.9s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 2.95kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.7s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:370b93bec9429a1eaeac20cfe70ed0fff139b44a6f112fac1bdff1d7e276ce57
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew6
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnew6


rdregistry.azurecr.io/rdwebapi:latestnew6

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnew6
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
25c26bb01df6: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnew6: digest:
sha256:cf0c05c32b9c64b2d2e22920dd7633dd97ec07468dee905e9a972cf5b0e358e4 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentity
{
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks update --resource-group rd-


resource-group --name rd-aks-cluster --enable-managed-identity
Could not find service principal or user assigned MSI for roleassignment
keyvaultid: None, enable_kv: None
{
"aadProfile": null,
"addonProfiles": {
"omsagent": {
"config": {
"logAnalyticsWorkspaceResourceID": "/subscriptions/3510f376-2d4c-4c44-9e12-
d72afb4c31fc/resourceGroups/DefaultResourceGroup-CUS/providers/
Microsoft.OperationalInsights/workspaces/DefaultWorkspace-3510f376-2d4c-4c44-9e12-
d72afb4c31fc-CUS",
"useAADAuth": "true"
},
"enabled": true,
"identity": null
}
},
"agentPoolProfiles": [
{
"availabilityZones": null,
"capacityReservationGroupId": null,
"count": 1,
"creationData": null,
"currentOrchestratorVersion": "1.30.6",
"eTag": null,
"enableAutoScaling": false,
"enableEncryptionAtHost": false,
"enableFips": false,
"enableNodePublicIp": false,
"enableUltraSsd": false,
"gpuInstanceProfile": null,
"hostGroupId": null,
"kubeletConfig": null,
"kubeletDiskType": "OS",
"linuxOsConfig": null,
"maxCount": null,
"maxPods": 250,
"minCount": null,
"mode": "System",
"name": "nodepool1",
"networkProfile": null,
"nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0",
"nodeLabels": null,
"nodePublicIpPrefixId": null,
"nodeTaints": null,
"orchestratorVersion": "1.30",
"osDiskSizeGb": 128,
"osDiskType": "Managed",
"osSku": "Ubuntu",
"osType": "Linux",
"podSubnetId": null,
"powerState": {
"code": "Running"
},
"provisioningState": "Succeeded",
"proximityPlacementGroupId": null,
"scaleDownMode": null,
"scaleSetEvictionPolicy": null,
"scaleSetPriority": null,
"securityProfile": {
"enableSecureBoot": false,
"enableVtpm": false
},
"spotMaxPrice": null,
"tags": null,
"type": "VirtualMachineScaleSets",
"upgradeSettings": {
"drainTimeoutInMinutes": null,
"maxSurge": "10%",
"nodeSoakDurationInMinutes": null
},
"vmSize": "Standard_DS2_v2",
"vnetSubnetId": null,
"windowsProfile": null,
"workloadRuntime": null
}
],
"apiServerAccessProfile": null,
"autoScalerProfile": null,
"autoUpgradeProfile": {
"nodeOsUpgradeChannel": "NodeImage",
"upgradeChannel": null
},
"azureMonitorProfile": {
"metrics": null
},
"azurePortalFqdn": "rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.portal.hcp.centralus.azmk8s.io",
"currentKubernetesVersion": "1.30.6",
"disableLocalAccounts": false,
"diskEncryptionSetId": null,
"dnsPrefix": "rd-aks-clu-rd-resource-grou-3510f3",
"eTag": null,
"enablePodSecurityPolicy": null,
"enableRbac": true,
"extendedLocation": null,
"fqdn": "rd-aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io",
"fqdnSubdomain": null,
"httpProxyConfig": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/rd-
resource-group/providers/Microsoft.ContainerService/managedClusters/rd-aks-
cluster",
"identity": {
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"identityProfile": {
"kubeletidentity": {
"clientId": "9e15df05-bc39-4b1f-93ae-00d874e0d297",
"objectId": "b027f198-e912-4133-917c-903dba7ec313",
"resourceId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool"
}
},
"ingressProfile": null,
"kubernetesVersion": "1.30",
"linuxProfile": {
"adminUsername": "azureuser",
"ssh": {
"publicKeys": [
{
"keyData": "ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQCfv4yGZmtEcQNKynjTVjKI4HwqyDqBBPfYq/rTctutZ/u46IiW/
bdoppLC/yRbhQ9k98in/
WcPrt1RO9xqQfp+Ef66mmfg5E8AffZpBITZmdQAMs361aASGJd43LGfT2leU69z1SHxYvBBKpV5xki7CqTs
nWKPrXDo9R0inxjB35S1x4TrpolJ7+0sNoHez0M4l1CNiJE8MYNqm2AQva7l/
IADmC+on8+GJ176fw8BlTYRL7+NizrtoYNa/
+Fo+LKCZ8sk0oXPaxJpspeIUaK7fgNJ2GU9bkbusnlnPsUMEQe5+UkHAH2ROjcaH7r1YeOJUDtgdWuAT1I/
9fHgOLoR"
}
]
}
},
"location": "centralus",
"maxAgentPools": 100,
"metricsProfile": {
"costAnalysis": {
"enabled": false
}
},
"name": "rd-aks-cluster",
"networkProfile": {
"advancedNetworking": null,
"dnsServiceIp": "10.0.0.10",
"ipFamilies": [
"IPv4"
],
"loadBalancerProfile": {
"allocatedOutboundPorts": null,
"backendPoolType": "nodeIPConfiguration",
"effectiveOutboundIPs": [
{
"id":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.Network/publicIPAddresses/
f47be2c2-c86f-43f4-8ffc-0514e6b514c3",
"resourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus"
}
],
"enableMultipleStandardLoadBalancers": null,
"idleTimeoutInMinutes": null,
"managedOutboundIPs": {
"count": 1,
"countIpv6": null
},
"outboundIPs": null,
"outboundIpPrefixes": null
},
"loadBalancerSku": "standard",
"natGatewayProfile": null,
"networkDataplane": "azure",
"networkMode": null,
"networkPlugin": "azure",
"networkPluginMode": "overlay",
"networkPolicy": "none",
"outboundType": "loadBalancer",
"podCidr": "10.244.0.0/16",
"podCidrs": [
"10.244.0.0/16"
],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": [
"10.0.0.0/16"
]
},
"nodeResourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus",
"nodeResourceGroupProfile": null,
"oidcIssuerProfile": {
"enabled": false,
"issuerUrl": null
},
"podIdentityProfile": null,
"powerState": {
"code": "Running"
},
"privateFqdn": null,
"privateLinkResources": null,
"provisioningState": "Succeeded",
"publicNetworkAccess": null,
"resourceGroup": "rd-resource-group",
"resourceUid": "675863feed90cf0001b8e71f",
"securityProfile": {
"azureKeyVaultKms": null,
"defender": null,
"imageCleaner": null,
"workloadIdentity": null
},
"serviceMeshProfile": null,
"servicePrincipalProfile": {
"clientId": "msi",
"secret": null
},
"sku": {
"name": "Base",
"tier": "Free"
},
"storageProfile": {
"blobCsiDriver": null,
"diskCsiDriver": {
"enabled": true
},
"fileCsiDriver": {
"enabled": true
},
"snapshotController": {
"enabled": true
}
},
"supportPlan": "KubernetesOfficial",
"systemData": null,
"tags": null,
"type": "Microsoft.ContainerService/ManagedClusters",
"upgradeSettings": null,
"windowsProfile": null,
"workloadAutoScalerProfile": {
"keda": null,
"verticalPodAutoscaler": null
}
}
C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-
resource-group --name rd-aks-cluster --queryservicePrincipalProfile
{
"clientId": "msi"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az extension add --name


serviceconnector-passwordless --upgrade
- Installing ..
C:\GithubProjects\ManagedIdentity\RdWebApi>az aks connection create sql --
connection sql_6ba30 --source-id /subscriptions/3510f376-2d4c-4c44-9e12-
d72afb4c31fc/resourceGroups/rd-resource-group/providers/
Microsoft.ContainerService/managedClusters/rd-aks-cluster --target-id
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/rd-resource-
group/providers/Microsoft.Sql/servers/rd-sql-server/databases/rd-sql-db --client-
type none --workload-identity
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool
The behavior of this command has been altered by the following extension:
serviceconnector-passwordless
Connecting to database...
Fail to connect sql.('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL
Server]Named Pipes Provider: Could not open aconnection to SQL Server [53]. (53)
(SQLDriverConnect); [08001] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout
expired (0); [08001] [Microsoft][ODBC Driver 17 for SQL Server]A network-related or
instance-specific error has occurred while establishing a connection to SQL Server.
Server is not found or not accessible. Check if instance name is correct and if SQL
Server is configured to allow remote connections. For more information see SQL
Server Books Online. (53)')

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnewnew .


[+] Building 8.0s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.2s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 2.52kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
3.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:180ec00aee1fb980cb772fb1f39063d9038ae628841bee0624419bbb730acfa2
0.0s
=> => naming to docker.io/library/rdwebapi:latestnewnew
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latestnewnew


rdregistry.azurecr.io/rdwebapi:latestnewnew

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latestnewnew
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
fbfd5ce6a616: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latestnewnew: digest:
sha256:3d3f021d17cec6c4bea7f38a610abc583c978d7da57ebae52c3821a7b1777653 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest10 .


[+] Building 9.5s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.1s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.1s
=> => transferring context: 3.69kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.1s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.4s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.4s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:93cd4f4a798b29b3f0c589eae273b2b8fde115e5aa3e125ca630fb67c9f5cef6
0.0s
=> => naming to docker.io/library/rdwebapi:latest10
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest12 .


[+] Building 8.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 1.77kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.4s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> CACHED [final 2/2] COPY --from=publish /app/publish .
0.0s
=> exporting to image
0.0s
=> => exporting layers
0.0s
=> => writing image
sha256:93cd4f4a798b29b3f0c589eae273b2b8fde115e5aa3e125ca630fb67c9f5cef6
0.0s
=> => naming to docker.io/library/rdwebapi:latest12
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest12


rdregistry.azurecr.io/rdwebapi:latest12

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest12
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
6b89e19a5a16: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest12: digest:
sha256:a168cac7c9896160312fbaea381bb7a020114a03ae14a22c7f61bd9b73e30598 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest13 .


[+] Building 9.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.1s
=> => transferring context: 2.95kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.1s
=> [build 6/7] WORKDIR /src/.
0.1s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.6s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.3s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:49cd0783d4f5dec84e478393599743863b31c46eda7a90ae7e7ac197b855e2e6
0.0s
=> => naming to docker.io/library/rdwebapi:latest13
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest13


rdregistry.azurecr.io/rdwebapi:latest13

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest13
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
9853d8c5e379: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest13: digest:
sha256:dc3766f33eef1d534ad3327f3a2d8f4a4a11f006983eb23aaa0eebc417430aa7 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest15 .


[+] Building 9.8s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.9s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.1s
=> => transferring context: 3.29kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.3s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.1s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:263450fa9a924c1dcef4fdf0634fa3c55fc5b6ede562bbe775ff551d59554965
0.0s
=> => naming to docker.io/library/rdwebapi:latest15
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest15


rdregistry.azurecr.io/rdwebapi:latest15

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest15
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
4894bee405b4: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest15: digest:
sha256:b595992c6ba6366d34f13dbc981762bb7840dcd1080aaf32155cfcec66a934df size: 1994
C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml
deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest16 .


[+] Building 9.0s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.4s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.1s
=> => transferring context: 4.86kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.1s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.1s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.2s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:baa5c94b785b0e1620afdd8ffd2e79ed10facebc168630e4b665d5a3f9041a40
0.0s
=> => naming to docker.io/library/rdwebapi:latest16
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest16


rdregistry.azurecr.io/rdwebapi:latest16

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest16
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
17fb0fd06e12: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest16: digest:
sha256:0b8a011e9a4d3bedd4600e7d2c48a4542f1bc7c8f263239ba5e4c3b8661b2f61 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml
deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-5bbd9fbc65-gcgvw 1/1 Running 0 40s
rdwebapi-deployment-8598756c9d-r7k7h 1/1 Running 0 13h

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl describe pods rdwebapi-


deployment-8598756c9d-r7k7h
Name: rdwebapi-deployment-8598756c9d-r7k7h
Namespace: default
Priority: 0
Service Account: default
Node: aks-nodepool1-49218028-vmss000000/10.224.0.4
Start Time: Tue, 10 Dec 2024 22:36:03 +0530
Labels: app=rdwebapi
pod-template-hash=8598756c9d
Annotations: <none>
Status: Running
IP: 10.244.0.241
IPs:
IP: 10.244.0.241
Controlled By: ReplicaSet/rdwebapi-deployment-8598756c9d
Containers:
rdwebapi:
Container ID:
containerd://73a9d4832fe793ece38a5ef98bd055b06444e31bd59419b8d994d8089de36cfc
Image: rdregistry.azurecr.io/rdwebapi:latest
Image ID:
rdregistry.azurecr.io/rdwebapi@sha256:93679ca273d8d26ca4364d7786f7a2cdef7eeb5111a23
2945b9bf977e3fa60f0
Port: 80/TCP
Host Port: 0/TCP
State: Running
Started: Tue, 10 Dec 2024 22:47:05 +0530
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-z8dh9 (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
kube-api-access-z8dh9:
Type: Projected (a volume that contains injected data from
multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for
300s
node.kubernetes.io/unreachable:NoExecute op=Exists for
300s
Events: <none>

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest17 .


[+] Building 6.3s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.6s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.86kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:68f627dce4b0204001bff30726ae956ab16d6d0dbb00ddd7d356a8ccb90c7e91
0.0s
=> => naming to docker.io/library/rdwebapi:latest17
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest17


rdregistry.azurecr.io/rdwebapi:latest17

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest17
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
11a9d545b85d: Preparing
5f70bf18a086: Preparing
0095a57d6d0b: Preparing
029b5e5a6bb4: Preparing
bce859c4da42: Preparing
c91bbd2d7529: Waiting
d1368047a87c: Waiting
6a4fdc7ff1bf: Waiting
unauthorized:

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry


Login Succeeded

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest17
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
11a9d545b85d: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest17: digest:
sha256:dfe2bc76fad98dc5129995d52a94b96dfd5d35a74a9e1441a05bfc128846059f size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest18 .


[+] Building 7.3s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.4s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.86kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.9s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:50ee1dd3cf2da0824f5c174db632f70b89e1ce8645b5d21604fd5bfa1ca55345
0.0s
=> => naming to docker.io/library/rdwebapi:latest18
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest18


rdregistry.azurecr.io/rdwebapi:latest18

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest18
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
b577a2b84dec: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest18: digest:
sha256:89f4dba7de032eea486dd6991198ab189a40a500a0d438260cffbf36a9724bff size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryservicePrincipalProfile
{
"clientId": "msi"
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentity
{
"delegatedResources": null,
"principalId": "de8ceba2-7a89-45f9-bd9c-6ef4713cb301",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry


Login Succeeded

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest .


[+] Building 6.3s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.6s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.87kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.9s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.5s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:d13517458aa3ddc28491aa7cc440b018d80e5404dd3e52a477916b45f3a12367
0.0s
=> => naming to docker.io/library/rdwebapi:latest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest


rdregistry.azurecr.io/rdwebapi:latest

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
d9a92a21c908: Pushed
5f70bf18a086: Pushed
0095a57d6d0b: Pushed
029b5e5a6bb4: Pushed
bce859c4da42: Pushed
c91bbd2d7529: Pushed
d1368047a87c: Pushed
6a4fdc7ff1bf: Pushed
latest: digest:
sha256:7a3e8e1d9ccc416c21ffcdb1138a61b94fe1ac6165b521e9454c73a8e9a51777 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


error: error validating "deployment.yaml": error validating data: failed to
download openapi: Get "https://rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.hcp.centralus.azmk8s.io:443/openapi/v2?timeout=32s": dial tcp: lookup rd-
aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host; if
you choose to ignore these errors, turn validation off with --validate=false

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


error: error validating "deployment.yaml": error validating data: failed to
download openapi: Get "https://rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.hcp.centralus.azmk8s.io:443/openapi/v2?timeout=32s": dial tcp: lookup rd-
aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host; if
you choose to ignore these errors, turn validation off with --validate=false

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


error: error validating "deployment.yaml": error validating data: failed to
download openapi: Get "https://rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.hcp.centralus.azmk8s.io:443/openapi/v2?timeout=32s": dial tcp: lookup rd-
aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host; if
you choose to ignore these errors, turn validation off with --validate=false

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


error: error validating "deployment.yaml": error validating data: failed to
download openapi: Get "https://rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.hcp.centralus.azmk8s.io:443/openapi/v2?timeout=32s": dial tcp: lookup rd-
aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host; if
you choose to ignore these errors, turn validation off with --validate=false

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


Unable to connect to the server: dial tcp: lookup rd-aks-clu-rd-resource-grou-
3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host

C:\GithubProjects\ManagedIdentity\RdWebApi>
C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry
Login Succeeded

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


error: error validating "deployment.yaml": error validating data: failed to
download openapi: Get "https://rd-aks-clu-rd-resource-grou-3510f3-
j8zvn0k0.hcp.centralus.azmk8s.io:443/openapi/v2?timeout=32s": dial tcp: lookup rd-
aks-clu-rd-resource-grou-3510f3-j8zvn0k0.hcp.centralus.azmk8s.io: no such host; if
you choose to ignore these errors, turn validation off with --validate=false

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl config current-context


rd-aks-cluster

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-
cluster' under resource group 'rd-resource-group' was not found. For more details
please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-cluster'
under resource group 'rd-resource-group' was not found. For more details please go
to https://aka.ms/ARMResourceNotFoundFix

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-
cluster' under resource group 'rd-resource-group' was not found. For more details
please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-cluster'
under resource group 'rd-resource-group' was not found. For more details please go
to https://aka.ms/ARMResourceNotFoundFix

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --query"identity" -o json
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-
cluster' under resource group 'rd-resource-group' was not found. For more details
please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-cluster'
under resource group 'rd-resource-group' was not found. For more details please go
to https://aka.ms/ARMResourceNotFoundFix

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-
cluster' under resource group 'rd-resource-group' was not found. For more details
please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-cluster'
under resource group 'rd-resource-group' was not found. For more details please go
to https://aka.ms/ARMResourceNotFoundFix

C:\GithubProjects\ManagedIdentity\RdWebApi>az login
Select the account you want to log in with. For more information on login with
Azure CLI, see https://go.microsoft.com/fwlink/?linkid=2271136
Retrieving tenants and subscriptions for the selection...

[Tenant and subscription selection]

No Subscription name Subscription ID


Tenant
----- ------------------------------------ ------------------------------------
----------------------------
[1] * Visual Studio Professional Subscr... 3510f376-2d4c-4c44-9e12-d72afb4c31fc
WatchGuard Technologies Inc.
[2] WatchGuard NonProd 75946fa7-a9e0-4946-aa94-79a7743457f9
WatchGuard Technologies Inc.
[3] WatchGuard Production 9ef6bd8e-8e56-40b7-ae1c-98f265e50892
WatchGuard Technologies Inc.
[4] WatchGuard Sandbox ee6f0564-07c6-44a9-90b0-e357cb4d70a8
WatchGuard Technologies Inc.

The default is marked with an *; the default tenant is 'WatchGuard Technologies


Inc.' and subscription is 'Visual Studio Professional Subscription' (3510f376-2d4c-
4c44-9e12-d72afb4c31fc).

Select a subscription and tenant (Type a number or Enter for no changes): 1

Tenant: WatchGuard Technologies Inc.


Subscription: Visual Studio Professional Subscription (3510f376-2d4c-4c44-9e12-
d72afb4c31fc)

[Announcements]
With the new Azure CLI login experience, you can select the subscription you want
to use more easily. Learn more about it and its configuration at
https://go.microsoft.com/fwlink/?linkid=2271236

If you encounter any problem, please open an issue at https://aka.ms/azclibug

[Warning] The login output has been updated. Please be aware that it no longer
displays the full list of available subscriptions by default.

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-
cluster' under resource group 'rd-resource-group' was not found. For more details
please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/rd-aks-cluster'
under resource group 'rd-resource-group' was not found. For more details please go
to https://aka.ms/ARMResourceNotFoundFix

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rnd-aks-clus
ter
A different object named rnd-aks-cluster already exists in your kubeconfig file.
Overwrite? (y/n): y
A different object named rnd-aks-cluster already exists in your kubeconfig file.
Overwrite? (y/n): y
Merged "rnd-aks-cluster" as current context in C:\Users\srana\.kube\config

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f service.yaml


service/rdwebapi created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get pods


NAME READY STATUS RESTARTS AGE
rdwebapi-8598756c9d-zvzx7 1/1 Running 0 27s

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl describe pods rdwebapi-


8598756c9d-zvzx7
Name: rdwebapi-8598756c9d-zvzx7
Namespace: default
Priority: 0
Service Account: default
Node: aks-agentpool-30650746-vmss000000/10.224.0.5
Start Time: Wed, 11 Dec 2024 14:15:23 +0530
Labels: app=rdwebapi
pod-template-hash=8598756c9d
Annotations: <none>
Status: Running
IP: 10.244.0.212
IPs:
IP: 10.244.0.212
Controlled By: ReplicaSet/rdwebapi-8598756c9d
Containers:
rdwebapi:
Container ID:
containerd://db95e7e56d95ea79af3ab2c378034b83f519d38a97e2d1c84b8040100ba35023
Image: rdregistry.azurecr.io/rdwebapi:latest
Image ID:
rdregistry.azurecr.io/rdwebapi@sha256:7a3e8e1d9ccc416c21ffcdb1138a61b94fe1ac6165b52
1e9454c73a8e9a51777
Port: 80/TCP
Host Port: 0/TCP
State: Running
Started: Wed, 11 Dec 2024 14:15:26 +0530
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-mjsj9 (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
kube-api-access-mjsj9:
Type: Projected (a volume that contains injected data from
multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for
300s
node.kubernetes.io/unreachable:NoExecute op=Exists for
300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 56s default-scheduler Successfully assigned
default/rdwebapi-8598756c9d-zvzx7 to aks-agentpool-30650746-vmss000000
Normal Pulling 56s kubelet Pulling image
"rdregistry.azurecr.io/rdwebapi:latest"
Normal Pulled 53s kubelet Successfully pulled image
"rdregistry.azurecr.io/rdwebapi:latest" in 2.718s (2.718s including waiting). Image
size: 94164760 bytes.
Normal Created 53s kubelet Created container rdwebapi
Normal Started 53s kubelet Started container rdwebapi

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get services


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 23m
rdwebapi LoadBalancer 10.0.125.240 48.214.225.218 80:32304/TCP 97s
C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl annotate namespace default
azure.workload.identity/use=true
namespace/default annotated

C:\GithubProjects\ManagedIdentity\RdWebApi>az identity list --query "[].{Name:name,


ClientId:clientId}" -o table
Name ClientId
------------------------- ------------------------------------
rnd-aks-cluster-agentpool e7c3f4bc-b064-4172-a1af-5f2b66b75872

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rnd-aks-cluster --query
identityProfile.kubeletidentity.clientId -o tsv
e7c3f4bc-b064-4172-a1af-5f2b66b75872

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest1 .


[+] Building 6.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.7s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 5.43kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:48be10614cd677e2302692743ff6776ede7444f24ba8ab510a87d34d7f71a866
0.0s
=> => naming to docker.io/library/rdwebapi:latest1
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest1


rdregistry.azurecr.io/rdwebapi:latest1

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest1
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
f92a6c5104fb: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest1: digest:
sha256:9ebfa73f7e948c26c19cb3f94e30efb0bd23fa07f6160b0d436c51c1137f49b8 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest2 .


[+] Building 5.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.9s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.50kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:1cb4dbd2d799c50fd10422509da60f54aecd3078185ec752aba45b75cae39cd5
0.0s
=> => naming to docker.io/library/rdwebapi:latest2
0.0s
What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest2


rdregistry.azurecr.io/rdwebapi:latest2

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest2
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
9a61cd26e302: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest2: digest:
sha256:d2d1125d0f01fe32f7d6392a2770dbedad8ff303eba5c86dacb4cb7185df2007 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl annotate namespace default


azure.workload.identity/use=true
namespace/default annotated

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl annotate namespace default


azure.workload.identity/use=true
namespace/default annotated

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rnd-aks-cluster --query
identityProfile.kubeletidentity.clientId -o tsv
e7c3f4bc-b064-4172-a1af-5f2b66b75872

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rnd-aks-cluster --query
identityProfile.kubeletidentity.clientId -o tsv
e7c3f4bc-b064-4172-a1af-5f2b66b75872

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest5 .


[+] Building 6.2s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.6s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.78kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.5s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:6222accc5986606581dda98e4a17fd1ccf1b0e60f75b2f35e2c482b66b4f24c6
0.0s
=> => naming to docker.io/library/rdwebapi:latest5
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest6 .


[+] Building 4.3s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.1s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.06kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.2s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.6s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:7dd45dd7164a7b35d93b2a53141dabad51f619cccc9a95a5035f0d7a0164a9d7
0.0s
=> => naming to docker.io/library/rdwebapi:latest6
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest6


rdregistry.azurecr.io/rdwebapi:latest6

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest6
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
56120662c0f0: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest6: digest:
sha256:553bdae5c8236abf2a40616cda30bc15cef9db5b9f691a36d5febc95cf8330e7 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest7 .


[+] Building 5.7s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.2s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.99kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
2.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 1.5s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.0s
=> => writing image
sha256:effda0945a1dbe8b636dfa230df4e092353ac2e8a47c3461b5078117f2f047f7
0.0s
=> => naming to docker.io/library/rdwebapi:latest7
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest7


rdregistry.azurecr.io/rdwebapi:latest7

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest7
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
d8cb196e7a7f: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest7: digest:
sha256:a6a70c62805237f39013039bbef14526dbe9259a51bccfb74c903bcc48d1652a size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl annotate namespace default


azure.workload.identity/use=true
namespace/default annotated

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi unchanged

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group


rd-resource-group --name rd-aks-cluster
A different object named rd-aks-cluster already exists in your kubeconfig file.
Overwrite? (y/n): y
A different object named clusterUser_rd-resource-group_rd-aks-cluster already
exists in your kubeconfig file.
Overwrite? (y/n): y
Merged "rd-aks-cluster" as current context in C:\Users\srana\.kube\config

C:\GithubProjects\ManagedIdentity\RdWebApi>az acr login --name rdregistry


Login Succeeded
C:\GithubProjects\ManagedIdentity\RdWebApi>az aks get-credentials --resource-group
rd-resource-group --name rd-aks-cluster
Merged "rd-aks-cluster" as current context in C:\Users\srana\.kube\config

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --query
identityProfile.kubeletidentity.clientId -o tsv
5d61e873-5491-4997-9810-8cdd5df869b7

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentityProfile.kubeletidentity -o tsv
5d61e873-5491-4997-9810-8cdd5df869b7 9efdda89-902c-46b5-8839-aed2a21d3f32
/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentityProfile -o tsv

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --queryidentity
{
"delegatedResources": null,
"principalId": "168045b9-e052-490b-9442-15342878c8af",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest .


[+] Building 10.6s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.7s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.50kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.1s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
5.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.5s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:3ddd119c4e728f702fa78f8c45c69c733446ec963401cccb8ccee6e1eba9ba29
0.0s
=> => naming to docker.io/library/rdwebapi:latest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest


rdregistry.azurecr.io/rdwebapi:latest

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
88b2fcadb4b7: Pushed
5f70bf18a086: Pushed
0095a57d6d0b: Pushed
029b5e5a6bb4: Pushed
bce859c4da42: Pushed
c91bbd2d7529: Pushed
d1368047a87c: Pushed
6a4fdc7ff1bf: Pushed
latest: digest:
sha256:b7d94dd0aa6b4d435a710fa07f6eb07ddbbc26c41ab1ac66efdcab0900313311 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f service.yaml


service/rdwebapi created

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get services


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 18m
rdwebapi LoadBalancer 10.0.248.84 48.214.168.107 80:31511/TCP 15s

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks update --resource-group rd-


resource-group --name rd-aks-cluster --enable-managed-identity
{
"aadProfile": null,
"addonProfiles": {
"azureKeyvaultSecretsProvider": {
"config": null,
"enabled": false,
"identity": null
},
"azurepolicy": {
"config": null,
"enabled": false,
"identity": null
}
},
"agentPoolProfiles": [
{
"availabilityZones": null,
"capacityReservationGroupId": null,
"count": 2,
"creationData": null,
"currentOrchestratorVersion": "1.30.6",
"eTag": null,
"enableAutoScaling": true,
"enableEncryptionAtHost": null,
"enableFips": false,
"enableNodePublicIp": false,
"enableUltraSsd": null,
"gpuInstanceProfile": null,
"hostGroupId": null,
"kubeletConfig": null,
"kubeletDiskType": "OS",
"linuxOsConfig": null,
"maxCount": 5,
"maxPods": 110,
"minCount": 2,
"mode": "System",
"name": "agentpool",
"networkProfile": null,
"nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0",
"nodeLabels": null,
"nodePublicIpPrefixId": null,
"nodeTaints": null,
"orchestratorVersion": "1.30.6",
"osDiskSizeGb": 128,
"osDiskType": "Managed",
"osSku": "Ubuntu",
"osType": "Linux",
"podSubnetId": null,
"powerState": {
"code": "Running"
},
"provisioningState": "Succeeded",
"proximityPlacementGroupId": null,
"scaleDownMode": null,
"scaleSetEvictionPolicy": null,
"scaleSetPriority": null,
"securityProfile": {
"enableSecureBoot": false,
"enableVtpm": false
},
"spotMaxPrice": null,
"tags": null,
"type": "VirtualMachineScaleSets",
"upgradeSettings": {
"drainTimeoutInMinutes": null,
"maxSurge": "10%",
"nodeSoakDurationInMinutes": null
},
"vmSize": "Standard_D2as_v4",
"vnetSubnetId": null,
"windowsProfile": null,
"workloadRuntime": null
}
],
"apiServerAccessProfile": null,
"autoScalerProfile": {
"balanceSimilarNodeGroups": "false",
"daemonsetEvictionForEmptyNodes": false,
"daemonsetEvictionForOccupiedNodes": true,
"expander": "random",
"ignoreDaemonsetsUtilization": false,
"maxEmptyBulkDelete": "10",
"maxGracefulTerminationSec": "600",
"maxNodeProvisionTime": "15m",
"maxTotalUnreadyPercentage": "45",
"newPodScaleUpDelay": "0s",
"okTotalUnreadyCount": "3",
"scaleDownDelayAfterAdd": "10m",
"scaleDownDelayAfterDelete": "10s",
"scaleDownDelayAfterFailure": "3m",
"scaleDownUnneededTime": "10m",
"scaleDownUnreadyTime": "20m",
"scaleDownUtilizationThreshold": "0.5",
"scanInterval": "10s",
"skipNodesWithLocalStorage": "false",
"skipNodesWithSystemPods": "true"
},
"autoUpgradeProfile": {
"nodeOsUpgradeChannel": "NodeImage",
"upgradeChannel": "patch"
},
"azureMonitorProfile": null,
"azurePortalFqdn": "rd-aks-cluster-dns-zgwa04hf.portal.hcp.centralus.azmk8s.io",
"currentKubernetesVersion": "1.30.6",
"disableLocalAccounts": false,
"diskEncryptionSetId": null,
"dnsPrefix": "rd-aks-cluster-dns",
"eTag": null,
"enablePodSecurityPolicy": null,
"enableRbac": true,
"extendedLocation": null,
"fqdn": "rd-aks-cluster-dns-zgwa04hf.hcp.centralus.azmk8s.io",
"fqdnSubdomain": null,
"httpProxyConfig": null,
"id": "/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/rd-
resource-group/providers/Microsoft.ContainerService/managedClusters/rd-aks-
cluster",
"identity": {
"delegatedResources": null,
"principalId": "168045b9-e052-490b-9442-15342878c8af",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
},
"identityProfile": {
"kubeletidentity": {
"clientId": "5d61e873-5491-4997-9810-8cdd5df869b7",
"objectId": "9efdda89-902c-46b5-8839-aed2a21d3f32",
"resourceId":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourcegroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/rd-aks-cluster-agentpool"
}
},
"ingressProfile": null,
"kubernetesVersion": "1.30.6",
"linuxProfile": null,
"location": "centralus",
"maxAgentPools": 100,
"metricsProfile": {
"costAnalysis": {
"enabled": false
}
},
"name": "rd-aks-cluster",
"networkProfile": {
"advancedNetworking": null,
"dnsServiceIp": "10.0.0.10",
"ipFamilies": [
"IPv4"
],
"loadBalancerProfile": {
"allocatedOutboundPorts": null,
"backendPoolType": "nodeIPConfiguration",
"effectiveOutboundIPs": [
{
"id":
"/subscriptions/3510f376-2d4c-4c44-9e12-d72afb4c31fc/resourceGroups/MC_rd-resource-
group_rd-aks-cluster_centralus/providers/Microsoft.Network/publicIPAddresses/
25153a4b-8c8b-457c-bc17-bf57239618a8",
"resourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus"
}
],
"enableMultipleStandardLoadBalancers": null,
"idleTimeoutInMinutes": null,
"managedOutboundIPs": {
"count": 1,
"countIpv6": null
},
"outboundIPs": null,
"outboundIpPrefixes": null
},
"loadBalancerSku": "Standard",
"natGatewayProfile": null,
"networkDataplane": "azure",
"networkMode": null,
"networkPlugin": "azure",
"networkPluginMode": "overlay",
"networkPolicy": "none",
"outboundType": "loadBalancer",
"podCidr": "10.244.0.0/16",
"podCidrs": [
"10.244.0.0/16"
],
"serviceCidr": "10.0.0.0/16",
"serviceCidrs": [
"10.0.0.0/16"
]
},
"nodeResourceGroup": "MC_rd-resource-group_rd-aks-cluster_centralus",
"nodeResourceGroupProfile": null,
"oidcIssuerProfile": {
"enabled": true,
"issuerUrl": "https://centralus.oic.prod-aks.azure.com/2563c132-88f5-466f-bbb2-
e83153b3c808/94682693-fb49-453e-97e1-137a18fedcf9/"
},
"podIdentityProfile": null,
"powerState": {
"code": "Running"
},
"privateFqdn": null,
"privateLinkResources": null,
"provisioningState": "Succeeded",
"publicNetworkAccess": null,
"resourceGroup": "rd-resource-group",
"resourceUid": "67596a94f30d610001573006",
"securityProfile": {
"azureKeyVaultKms": null,
"defender": null,
"imageCleaner": {
"enabled": false,
"intervalHours": 168
},
"workloadIdentity": {
"enabled": true
}
},
"serviceMeshProfile": null,
"servicePrincipalProfile": {
"clientId": "msi",
"secret": null
},
"sku": {
"name": "Base",
"tier": "Free"
},
"storageProfile": {
"blobCsiDriver": null,
"diskCsiDriver": {
"enabled": true
},
"fileCsiDriver": {
"enabled": true
},
"snapshotController": {
"enabled": true
}
},
"supportPlan": "KubernetesOfficial",
"systemData": null,
"tags": null,
"type": "Microsoft.ContainerService/ManagedClusters",
"upgradeSettings": null,
"windowsProfile": {
"adminPassword": null,
"adminUsername": "azureuser",
"enableCsiProxy": true,
"gmsaProfile": null,
"licenseType": null
},
"workloadAutoScalerProfile": {
"keda": null,
"verticalPodAutoscaler": null
}
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --query"identity"
{
"delegatedResources": null,
"principalId": "168045b9-e052-490b-9442-15342878c8af",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --
query"identityProfile.kubeletidentity.clientId" -o tsv
5d61e873-5491-4997-9810-8cdd5df869b7

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl pod logs


error: unknown command "pod" for "kubectl"

Did you mean this?


top

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl pod services


error: unknown command "pod" for "kubectl"

Did you mean this?


top

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl get services


NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 39m
rdwebapi LoadBalancer 10.0.248.84 48.214.168.107 80:31511/TCP 21m

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl logs rdwebapi-7b94b74dd8-j8nj6


info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app/
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000002": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000003": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000004": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000005": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000006": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000007": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000008": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:00000009": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:0000000A": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:0000000B": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:0000000C": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LPB", Request id "0HN8PQGMU6LPB:0000000D": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LS5", Request id "0HN8PQGMU6LS5:00000002": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LUS", Request id "0HN8PQGMU6LUS:00000002": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQGMU6LUS", Request id "0HN8PQGMU6LUS:00000003": An
unhandled exception was thrown by the application.
System.InvalidOperationException: Cannot set the AccessToken property if
'Authentication' has been specified in the connection string.
at
Microsoft.Data.SqlClient.SqlConnection.CheckAndThrowOnInvalidCombinationOfConnectio
nOptionAndAccessToken(SqlConnectionString connectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken(String value)
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 27
at RdWebApi.Controllers.DataController.Get() in
/src/Controllers/DataController.cs:line 37
at lambda_method5(Closure , Object )
at
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExec
utor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object
controller, Object[] arguments)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethod
Async>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1
actionResultValueTask)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFi
lterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State
next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecu
tedContextSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next,
Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterA
sync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next,
Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latestnew .


[+] Building 8.9s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.7s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.38kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.6s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.1s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:47d357c7788e0efae2c5533d7eb42dbfc2da89f5e0eb0d973e29da62370cf04e
0.0s
=> => naming to docker.io/library/rdwebapi:latestnew
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latesttest .


[+] Building 6.5s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
0.1s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ec 0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc56486 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 3.06kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
3.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false 2.2s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:7dbdd7316b15dbc2031c448a9d12e2b20cef43fd7244b200d78a6ad2e3bf7937
0.0s
=> => naming to docker.io/library/rdwebapi:latesttest
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latesttest


rdregistry.azurecr.io/rdwebapi:latesttest

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latesttest
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
4f3825fc1857: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latesttest: digest:
sha256:4776964fbe3f8dc48f80ac5982e8a023b0e7b7baa98d1a3c1e08f2c0e2f6a99d size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl pod logs


error: unknown command "pod" for "kubectl"

Did you mean this?


top

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl logs rdwebapi-7b94b74dd8-j8nj6


error: error from server (NotFound): pods "rdwebapi-7b94b74dd8-j8nj6" not found in
namespace "default"

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl logs rdwebapi-db7c9fbc-2zrwd


info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app/
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQQ8TSNGA", Request id "0HN8PQQ8TSNGA:00000003": An
unhandled exception was thrown by the application.
System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported. Path: $.Columns.DataType.
---> System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported.
at
System.Text.Json.Serialization.Converters.UnsupportedTypeConverter`1.Write(Utf8Json
Writer writer, T value, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8
JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack&
state)
at
System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter
writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack&
state, NotSupportedException ex)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter
jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options,
WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBody
Async(OutputFormatterWriteContext context, Encoding selectedEncoding)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsyn
c>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask,
State next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedConte
xtSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterA
sync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQQ8TSNGA", Request id "0HN8PQQ8TSNGA:00000004": An
unhandled exception was thrown by the application.
System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported. Path: $.Columns.DataType.
---> System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported.
at
System.Text.Json.Serialization.Converters.UnsupportedTypeConverter`1.Write(Utf8Json
Writer writer, T value, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8
JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack&
state)
at
System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter
writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack&
state, NotSupportedException ex)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter
jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options,
WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBody
Async(OutputFormatterWriteContext context, Encoding selectedEncoding)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsyn
c>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask,
State next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedConte
xtSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterA
sync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl logs rdwebapi-db7c9fbc-2zrwd


info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app/
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQQ8TSNGA", Request id "0HN8PQQ8TSNGA:00000003": An
unhandled exception was thrown by the application.
System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported. Path: $.Columns.DataType.
---> System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported.
at
System.Text.Json.Serialization.Converters.UnsupportedTypeConverter`1.Write(Utf8Json
Writer writer, T value, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8
JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack&
state)
at
System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter
writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack&
state, NotSupportedException ex)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter
jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options,
WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBody
Async(OutputFormatterWriteContext context, Encoding selectedEncoding)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsyn
c>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask,
State next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedConte
xtSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterA
sync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQQ8TSNGA", Request id "0HN8PQQ8TSNGA:00000004": An
unhandled exception was thrown by the application.
System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported. Path: $.Columns.DataType.
---> System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported.
at
System.Text.Json.Serialization.Converters.UnsupportedTypeConverter`1.Write(Utf8Json
Writer writer, T value, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8
JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack&
state)
at
System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter
writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack&
state, NotSupportedException ex)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter
jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options,
WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBody
Async(OutputFormatterWriteContext context, Encoding selectedEncoding)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsyn
c>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask,
State next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedConte
xtSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterA
sync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HN8PQQ8TSNHP", Request id "0HN8PQQ8TSNHP:00000003": An
unhandled exception was thrown by the application.
System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported. Path: $.Columns.DataType.
---> System.NotSupportedException: Serialization and deserialization of
'System.Type' instances are not supported.
at
System.Text.Json.Serialization.Converters.UnsupportedTypeConverter`1.Write(Utf8Json
Writer writer, T value, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8
JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack&
state)
at
System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter
writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Ob
ject obj, WriteStack& state, Utf8JsonWriter writer)
at
System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8J
sonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack&
state, NotSupportedException ex)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter
writer, T& value, JsonSerializerOptions options, WriteStack& state)
at
System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter
writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter
jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options,
WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream
utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken
cancellationToken)
at
Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBody
Async(OutputFormatterWriteContext context, Encoding selectedEncoding)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsyn
c>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask,
State next, Scope scope, Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedConte
xtSealed context)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterA
sync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>
g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope,
Object state, Boolean isCompleted)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|
17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|
6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext
httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext
httpContext, ISwaggerProvider swaggerProvider)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests
[TContext](IHttpApplication`1 application)

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest2 .


[+] Building 8.4s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.8s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.59kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
3.8s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false
2.3s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:822d382d6683faf72e17131bc768a05d9c91ce7a19594a7062fdd7e545fd689f
0.0s
=> => naming to docker.io/library/rdwebapi:latest2
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest2


rdregistry.azurecr.io/rdwebapi:latest2

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest2
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
c326bccbcaa2: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest2: digest:
sha256:84c79cb884452d813cc1e0b316d18e61e4ee649709093978cb720011f6cb589d size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest3 .


[+] Building 9.5s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
2.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.73kB
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.1s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.7s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false
2.2s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:ecec44585ac9b9c2ef05bd4fec65ca5f845063462a8d813aeb8c8f85aab966bc
0.0s
=> => naming to docker.io/library/rdwebapi:latest3
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest3


rdregistry.azurecr.io/rdwebapi:latest3

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest3
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
6924acb42f95: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest3: digest:
sha256:c707a409e5827e69b73c15b2b7716b6d25b7af13cc68aa77ab668e6922704e82 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured

C:\GithubProjects\ManagedIdentity\RdWebApi>docker build -t rdwebapi:latest4 .


[+] Building 8.7s (18/18) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 1.19kB
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0
1.7s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 464B
0.0s
=> [build 1/7] FROM
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> => resolve
mcr.microsoft.com/dotnet/sdk:6.0@sha256:696d87a7980a9b84d8a1a4d56d1d2287ed13a7cf62e
0d2a971ecc5648669fc39
0.0s
=> [internal] load build context
0.0s
=> => transferring context: 4.75kB
0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0
0.0s
=> CACHED [build 2/7] WORKDIR /src
0.0s
=> CACHED [build 3/7] COPY [RdWebApi.csproj, .]
0.0s
=> CACHED [build 4/7] RUN dotnet restore "./RdWebApi.csproj"
0.0s
=> [build 5/7] COPY . .
0.0s
=> [build 6/7] WORKDIR /src/.
0.0s
=> [build 7/7] RUN dotnet build "./RdWebApi.csproj" -c Release -o /app/build
4.3s
=> [publish 1/1] RUN dotnet publish "./RdWebApi.csproj" -c Release -o /app/publish
/p:UseAppHost=false
2.2s
=> CACHED [base 2/2] WORKDIR /app
0.0s
=> CACHED [final 1/2] WORKDIR /app
0.0s
=> [final 2/2] COPY --from=publish /app/publish .
0.1s
=> exporting to image
0.1s
=> => exporting layers
0.1s
=> => writing image
sha256:42944bea688f04b8dd219572a1cdb50db45844e9604f7fbe41a5fbaa499b1323
0.0s
=> => naming to docker.io/library/rdwebapi:latest4
0.0s

What's next:
View a summary of image vulnerabilities and recommendations → docker scout
quickview

C:\GithubProjects\ManagedIdentity\RdWebApi>docker tag rdwebapi:latest4


rdregistry.azurecr.io/rdwebapi:latest4

C:\GithubProjects\ManagedIdentity\RdWebApi>docker push
rdregistry.azurecr.io/rdwebapi:latest4
The push refers to repository [rdregistry.azurecr.io/rdwebapi]
e5202cc7c6b5: Pushed
5f70bf18a086: Layer already exists
0095a57d6d0b: Layer already exists
029b5e5a6bb4: Layer already exists
bce859c4da42: Layer already exists
c91bbd2d7529: Layer already exists
d1368047a87c: Layer already exists
6a4fdc7ff1bf: Layer already exists
latest4: digest:
sha256:ef8670a36fc2419f2ffedbe67a0e4689a20a698c4cc1402c189db37e7ef93432 size: 1994

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml


deployment.apps/rdwebapi configured
docker push
rdregistry.azurecr.io/rdwebapi:latest3
C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl apply -f deployment.yaml
C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-
resource-group --name rd-aks-cluster --queryidentity
{
"delegatedResources": null,
"principalId": "168045b9-e052-490b-9442-15342878c8af",
"tenantId": "2563c132-88f5-466f-bbb2-e83153b3c808",
"type": "SystemAssigned",
"userAssignedIdentities": null
}

C:\GithubProjects\ManagedIdentity\RdWebApi>az aks show --resource-group rd-


resource-group --name rd-aks-cluster --
query"identityProfile.kubeletidentity.clientId" -o tsv
5d61e873-5491-4997-9810-8cdd5df869b7

C:\GithubProjects\ManagedIdentity\RdWebApi>kubectl annotate namespace default


azure.workload.identity/use=true

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy