Skip to content

Commit f030f51

Browse files
authored
Merge pull request #218458 from Nickomang/aks-marketplace-updates
Kubernetes application for Azure Marketplace updates
2 parents c6f8803 + 8e78b1d commit f030f51

File tree

8 files changed

+83
-4
lines changed

8 files changed

+83
-4
lines changed

articles/marketplace/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@
215215
href: azure-container-plan-technical-configuration.md
216216
- name: Plan technical configuration for Kubernetes applications
217217
href: azure-container-plan-technical-configuration-kubernetes.md
218-
- name: Container certification troubleshooting
219-
href: azure-container-certification-faq.yml
218+
- name: Container certification troubleshooting
219+
href: azure-container-certification-faq.yml
220+
- name: Kubernetes application publishing troubleshooting
221+
href: azure-container-troubleshoot.md
220222
- name: Azure virtual machine offer
221223
items:
222224
- name: Plan the offer

articles/marketplace/azure-container-technical-assets-kubernetes.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.subservice: partnercenter-marketplace-publisher
66
ms.topic: conceptual
77
author: nickomang
88
ms.author: nickoman
9-
ms.date: 09/27/2022
9+
ms.date: 11/30/2022
1010
---
1111

1212
# 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
5757
5858
## Publishing overview
5959

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.
6163

6264
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.
6365

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+
6469
## Grant access to your Azure Container Registry
6570

6671
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:
264269

265270
For a sample configured for the voting app, see the following [manifest file example][manifest-sample].
266271

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+
267290
### Structure your application
268291

269292
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
289312
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.
290313

291314
```bash
315+
docker pull mcr.microsoft.com/container-package-app:latest
316+
292317
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/<path-to-content>:/data --entrypoint "/bin/bash" mcr.microsoft.com/container-package-app:latest
293318
```
294319

@@ -297,6 +322,8 @@ docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/<path-to-conten
297322
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.
298323

299324
```bash
325+
docker pull mcr.microsoft.com/container-package-app:latest
326+
300327
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v d:/<path-to-content>:/data --entrypoint "/bin/bash" mcr.microsoft.com/container-package-app:latest
301328
```
302329

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Troubleshoot publishing issues for a Kubernetes application based Container offer in Microsoft AppSource.
3+
description: Learn about potential issue and solutions when publishing a Kubernetes application based Container offer in Microsoft AppSource.
4+
ms.service: marketplace
5+
ms.subservice: partnercenter-marketplace-publisher
6+
ms.topic: article
7+
author: nickomang
8+
ms.author: nickoman
9+
ms.date: 11/14/2022
10+
---
11+
12+
# 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].
46+
47+
<!-- LINKS -->
48+
[container-certification-troubleshooting]: ./azure-container-certification-faq.yml
49+
[cluster-extension]: /azure/aks/integrations#extensions/
50+
[grant-access]: ./azure-container-technical-assets-kubernetes.md#grant-access-to-your-azure-container-registry
62.5 KB
Loading
65.2 KB
Loading
11.4 KB
Loading
5.07 KB
Loading
27.3 KB
Loading

0 commit comments

Comments
 (0)