You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Prepare Azure container technical assets for a Kubernetes app
@@ -57,10 +57,15 @@ In addition to your solution domain, your engineering team should have knowledge
57
57
58
58
## Publishing overview
59
59
60
-
The first step to publish your Kubernetes app-based Container offer on the Azure Marketplace is to package your application as a [Cloud Native Application Bundle (CNAB)][cnab]. This CNAB, comprised of your application’s artifacts, will be first published to your private Azure Container Registry (ACR) and later pushed to an Azure Marketplace-specific public ACR and will be used as the single artifact you reference in Partner Center.
60
+
The first step to publish your Kubernetes app-based Container offer on the Azure Marketplace is to package your application as a [Cloud Native Application Bundle (CNAB)][cnab]. This CNAB, comprised of your application’s artifacts, will be first published to your private Azure Container Registry (ACR) and later pushed to a Microsoft-owned ACR and will be used as the single artifact you reference in Partner Center.
61
+
62
+
From there, vulnerability scanning is performed to ensure images are secure. Finally, the Kubernetes application is registered as an extension type for an Azure Kubernetes Service (AKS) cluster.
61
63
62
64
Once your offer is published, your application will leverage the [cluster extensions for AKS][cluster-extensions] feature to manage your application lifecycle inside an AKS cluster.
63
65
66
+
:::image type="content" source="./media/azure-container/bundle-processing.png" alt-text="A diagram showing the three stages of bundle processing, flowing from 'Copy the bundle to a Microsoft-owned registry' to 'Vulnerability scanning' to 'Extension type registration'.":::
67
+
68
+
64
69
## Grant access to your Azure Container Registry
65
70
66
71
As part of the publishing process, Microsoft will deep copy your CNAB from your ACR to a Microsoft-owned, Azure Marketplace-specific ACR. This step requires you to grant Microsoft access to your registry.
@@ -264,6 +269,24 @@ The fields used in the manifest are as follows:
264
269
265
270
For a sample configured for the voting app, see the following [manifest file example][manifest-sample].
266
271
272
+
### User parameter flow
273
+
274
+
It's important to understand how user parameters flow throughout the artifacts you're creating and packaging. Parameters are initially defined when creating the UI through a *createUiDefinition.json* file:
275
+
276
+
:::image type="content" source="./media/azure-container/user-param-ui.png" alt-text="A screenshot of the createUiDefinition example linked in this article. Definitions for 'value1' and 'value2' are shown.":::
277
+
278
+
and are exported via the `outputs` section:
279
+
280
+
:::image type="content" source="./media/azure-container/user-param-ui-2.png" alt-text="A screenshot of the createUiDefinition example linked in this article. Output lines for application title, 'value1', and 'value2' are shown.":::
281
+
282
+
From there, the values are passed to the Azure Resource Manager template and will be propagated to the Helm chart during deployment:
283
+
284
+
:::image type="content" source="./media/azure-container/user-param-arm.png" alt-text="A screenshot of the Azure Resource Manager template example linked in this article. Under 'configurationSettings', the parameters for application title, 'value1', and 'value2' are shown.":::
285
+
286
+
Finally, the values are consumed by the Helm chart:
287
+
288
+
:::image type="content" source="./media/azure-container/user-param-helm.png" alt-text="A screenshot of the Helm chart example linked in this article. Values for application title, 'value1', and 'value2' are shown.":::
289
+
267
290
### Structure your application
268
291
269
292
Place the createUiDefinition, ARM template, and manifest file beside your application's Helm chart.
@@ -289,6 +312,8 @@ The following Docker command pulls the latest packaging tool image and also moun
289
312
Assuming `~\<path-to-content>` is a directory containing the contents to be packaged, the following docker command will mount `~/<path-to-content>` to `/data` in the container. Be sure to replace `~/<path-to-content>` with your own app's location.
Assuming `D:\<path-to-content>` is a directory containing the contents to be packaged, the following docker command will mount `d:/<path-to-content>` to `/data` in the container. Be sure to replace `d:/<path-to-content>` with your own app's location.
# Troubleshoot issues while publishing a Kubernetes application-based Container offer
13
+
14
+
Once published, a Kubernetes application based Container offer goes through the following high level flow for bundle processing.
15
+
16
+
:::image type="content" source="./media/azure-container/bundle-processing.png" alt-text="A diagram showing the three stages of bundle processing, flowing from 'Copy the bundle to a Microsoft-owned registry' to 'Vulnerability scanning' to 'Extension type registration'.":::
17
+
18
+
First, the contents of the Cloud Native Application Bundle (CNAB) are copied from your own registry to a Microsoft-owned Azure Container Registry (ACR). From there, vulnerability scanning is performed to ensure images are secure. Finally, the Kubernetes application is registered as an [extension][cluster-extension] type for an Azure Kubernetes Service (AKS) cluster. If the publish fails, it may be an issue with one of these components. See below for common errors and related mitigation steps.
19
+
20
+
## Common issues
21
+
22
+
### Publishing fails with missing artifacts in the CNAB
23
+
24
+
|Error|Description|Action|
25
+
|--|:--|--|
26
+
|"extensionRegistrationParameters cannot be null or empty in manifest.yaml of your package. For more details, please refer to https://aka.ms/K8sOfferAssets#create-the-manifest-file"|Kubernetes applications are packaged as AKS cluster extensions. The manifest file provides input for the Extension Type creation.|Read the description for each property and provide the information.|
27
+
|"namespace cannot be null or empty for defaultScope as cluster in extensionRegistrationParameters in manifest.yaml of your package. For more details, please refer to https://aka.ms/K8sOfferAssets#create-the-manifest-file"|Kubernetes applications that are installed at Cluster scope will use the default scope provided as the namespace.|Be sure to provide a namespace in the `extensionRegistrationParameters` section in your manifest file|
28
+
29
+
### Publishing fails while copying the artifacts from your ACR to a Microsoft-owned ACR
30
+
31
+
|Error|Description|Action|
32
+
|--|--|--|
33
+
|"Access to registry {sourceACRName} was denied. Please provide MarketPlace access to registry. please refer: https://aka.ms/K8sOfferAssets#grant-access-to-your-azure-container-registry"|During the publishing process, Microsoft moves your Kubernetes application, which is packaged as a CNAB and uploaded to an ACR, to a Microsoft-owned registry. <br><br/> To do so, Microsoft's first party app responsible for this process must be provided with permissions. This error appears if the Marketplace publishing was done without providing the permissions.|[Provide Microsoft's first party app with the proper permissions][grant-access].|
34
+
|"CNAB repository {cnabBundle} cannot be found in registry {sourceACRName}. Please provide MarketPlace access to registry. please refer: https://aka.ms/K8sOfferAssets#grant-access-to-your-azure-container-registry"|The Kubernetes application that has been packaged using the CPA tool can't be found in your ACR.|Ensure the bundle has been successfully uploaded to your registry, and [provide Microsoft's first party app with the proper permissions][grant-access].|
35
+
|"The CNAB repository name {cnabBundle} with digest {targetDigest} already exists and is different than your provided CNAB digest {sourcedigest}."|A plan with the same version is already published using a different CNAB.|If your CNAB contents have changed, increment the plan version and try publishing again.|
36
+
37
+
### Publishing fails with Platform errors
38
+
39
+
|Error|Description|Action|
40
+
|--|--|--|
41
+
|Internal server error|May be a transient error.|Try publishing again.|
42
+
43
+
### Vulnerability scanning
44
+
45
+
You may also encounter errors due to vulnerabilities in your images. For more information on vulnerability scanning and how to mitigate issues, see [Container certification troubleshooting][container-certification-troubleshooting].
0 commit comments