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
Copy file name to clipboardExpand all lines: articles/aks/azure-files-dynamic-pv.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure Kubernetes Service
4
4
description: Learn how to dynamically create a persistent volume with Azure Files for use with multiple concurrent pods in Azure Kubernetes Service (AKS)
5
5
services: container-service
6
6
ms.topic: article
7
-
ms.date: 07/01/2020
7
+
ms.date: 03/22/2021
8
8
9
9
10
10
#Customer intent: As a developer, I want to learn how to dynamically create and attach storage using Azure Files to pods in AKS.
@@ -46,6 +46,7 @@ apiVersion: storage.k8s.io/v1
46
46
metadata:
47
47
name: my-azurefile
48
48
provisioner: file.csi.azure.com # replace with "kubernetes.io/azure-file" if aks version is less than 1.21
49
+
allowVolumeExpansion: true
49
50
mountOptions:
50
51
- dir_mode=0777
51
52
- file_mode=0777
@@ -55,7 +56,7 @@ mountOptions:
55
56
- cache=strict
56
57
- actimeo=30
57
58
parameters:
58
-
skuName: Standard_LRS
59
+
skuName: Premium_LRS
59
60
```
60
61
61
62
Create the storage class with the [kubectl apply][kubectl-apply] command:
A persistent volume claim (PVC) uses the storage class object to dynamically provision an Azure file share. The following YAML can be used to create a persistent volume claim *5 GB* in size with *ReadWriteMany* access. For more information on access modes, see the [Kubernetes persistent volume][access-modes] documentation.
70
+
A persistent volume claim (PVC) uses the storage class object to dynamically provision an Azure file share. The following YAML can be used to create a persistent volume claim *100 GB* in size with *ReadWriteMany* access. For more information on access modes, see the [Kubernetes persistent volume][access-modes] documentation.
70
71
71
72
Now create a file named `azure-file-pvc.yaml` and copy in the following YAML. Make sure that the *storageClassName* matches the storage class created in the last step:
72
73
@@ -81,7 +82,7 @@ spec:
81
82
storageClassName: my-azurefile
82
83
resources:
83
84
requests:
84
-
storage: 5Gi
85
+
storage: 100Gi
85
86
```
86
87
87
88
> [!NOTE]
@@ -99,7 +100,7 @@ Once completed, the file share will be created. A Kubernetes secret is also crea
99
100
$ kubectl get pvc my-azurefile
100
101
101
102
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
Copy file name to clipboardExpand all lines: articles/api-management/api-management-cross-domain-policies.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,9 @@ The `cors` policy adds cross-origin resource sharing (CORS) support to an operat
64
64
> [!NOTE]
65
65
> If request matches an operation with an OPTIONS method defined in the API, pre-flight request processing logic associated with CORS policies will not be executed. Therefore, such operations can be used to implement custom pre-flight processing logic.
66
66
67
+
> [!IMPORTANT]
68
+
> If you configure the CORS policy at the product scope, and your API uses subscription key authentication, the policy will only work when requests include a subscription key as a query parameter.
69
+
67
70
CORS allows a browser and a server to interact and determine whether or not to allow specific cross-origin requests (i.e. XMLHttpRequests calls made from JavaScript on a web page to other domains). This allows for more flexibility than only allowing same-origin requests, but is more secure than allowing all cross-origin requests.
68
71
69
72
You need to apply the CORS policy to enable the interactive console in the developer portal. Refer to the [developer portal documentation](./developer-portal-faq.md#cors) for details.
@@ -45,12 +46,12 @@ This quickstart configures an App Service app in the **Free** tier and incurs no
45
46
::: zone-end
46
47
## Create your Node.js application
47
48
48
-
In this step, you create a starter Node.js application and make sure it runs on your computer.
49
+
In this step, you create a basic Node.js application and ensure it runs on your computer.
49
50
50
51
> [!TIP]
51
52
> If you have already completed the [Node.js tutorial](https://code.visualstudio.com/docs/nodejs/nodejs-tutorial), you can skip ahead to [Deploy to Azure](#deploy-to-azure).
52
53
53
-
1. Create a simple Node.js application using the [Express Generator](https://expressjs.com/starter/generator.html), which is installed by default with Node.js and NPM.
54
+
1. Create a Node.js application using the [Express Generator](https://expressjs.com/starter/generator.html), which is installed by default with Node.js and NPM.
54
55
55
56
```bash
56
57
npx express-generator myExpressApp --view ejs
@@ -89,7 +90,7 @@ Before you continue, ensure that you have all the prerequisites installed and co
89
90
90
91
#### Sign in to Azure
91
92
92
-
1. In the terminal, make sure you're in the *myExpressApp* directory, then start Visual Studio Code with the following command:
93
+
1. In the terminal, ensure you're in the *myExpressApp* directory, then start Visual Studio Code with the following command:
93
94
94
95
```bash
95
96
code .
@@ -112,14 +113,14 @@ Before you continue, ensure that you have all the prerequisites installed and co
112
113
113
114
:::image type="content" source="media/quickstart-nodejs/deploy.png" alt-text="Screenshot of the Azure App service in Visual Studio Code showing the blue arrow icon selected.":::
114
115
115
-
1. Choose the *myExpressApp* folder.
116
+
1. Select the *myExpressApp* folder.
116
117
117
118
# [Deploy to Linux](#tab/linux)
118
119
119
-
3. Choose**Create new Web App**. A Linux container is used by default.
120
+
3. Select**Create new Web App**. A Linux container is used by default.
120
121
1. Type a globally unique name for your web app and press **Enter**. The name must be unique across all of Azure and use only alphanumeric characters ('A-Z', 'a-z', and '0-9') and hyphens ('-').
121
122
1. In Select a runtime stack, selectthe Node.js version you want. An **LTS** version is recommended.
122
-
1. In Select a pricing tier, select**Free (F1)** and waitforthe the resources to be provisionedin Azure.
123
+
1. In Select a pricing tier, select**Free (F1)** and waitforthe resources to be provisionedin Azure.
123
124
1. In the popup **Always deploy the workspace "myExpressApp" to \<app-name>"**, select **Yes**. This way, as long as you're in the same workspace, Visual Studio Code deploys to the same App Service app each time.
124
125
125
126
While Visual Studio Code provisions the Azure resources and deploys the code, it shows [progress notifications](https://code.visualstudio.com/api/references/extension-guidelines#notifications).
@@ -128,7 +129,7 @@ Before you continue, ensure that you have all the prerequisites installed and co
128
129
129
130
# [Deploy to Windows](#tab/windows)
130
131
131
-
3. Choose **Create new Web App... Advanced**.
132
+
3. Select **Create new Web App... Advanced**.
132
133
1. Type a globally unique name for your web app and press **Enter**. The name must be unique across all of Azure and use only alphanumeric characters ('A-Z', 'a-z', and '0-9') and hyphens ('-').
133
134
1. Select **Create a new resource group**, then enter a name for the resource group, such as *AppServiceQS-rg*.
134
135
1. Select the Node.js version you want. An **LTS** version is recommended.
@@ -164,7 +165,7 @@ Before you continue, ensure that you have all the prerequisites installed and co
In the terminal, make sure you're in the *myExpressApp* directory, and deploy the code in your local folder (*myExpressApp*) using the [az webapp up](/cli/azure/webapp#az-webapp-up) command:
168
+
In the terminal, ensure you're in the *myExpressApp* directory, and deploy the code in your local folder (*myExpressApp*) using the [az webapp up](/cli/azure/webapp#az-webapp-up) command:
168
169
169
170
# [Deploy to Linux](#tab/linux)
170
171
@@ -180,12 +181,12 @@ az webapp up --sku F1 --name <app-name> --os-type Windows
180
181
181
182
-----
182
183
183
-
- If the `az`command isn't recognized, be sure you have the Azure CLI installed as described in [Set up your initial environment](#set-up-your-initial-environment).
184
+
- If the `az`command isn't recognized, ensure you have the Azure CLI installed as described in [Set up your initial environment](#set-up-your-initial-environment).
184
185
- Replace `<app_name>` with a name that's unique across all of Azure (*valid characters are `a-z`, `0-9`, and `-`*). A good pattern is to use a combination of your company name and an app identifier.
185
186
- The `--sku F1` argument creates the web app on the Free pricing tier, which incurs a no cost.
186
187
- You can optionally include the argument `--location <location-name>` where `<location_name>` is an available Azure region. You can retrieve a list of allowable regions for your Azure account by running the [`az account list-locations`](/cli/azure/appservice#az_appservice_list_locations) command.
187
188
- The command creates a Linux app for Node.js by default. To create a Windows app instead, use the `--os-type` argument.
188
-
- If you see the error, "Could not auto-detect the runtime stack of your app,"make sure you're running the command in the *myExpressApp* directory (See [Troubleshooting auto-detect issues with az webapp up](https://github.com/Azure/app-service-linux-docs/blob/master/AzWebAppUP/runtime_detection.md)).
189
+
- If you see the error, "Could not auto-detect the runtime stack of your app,"ensure you're running the command in the *myExpressApp* directory (See [Troubleshooting auto-detect issues with az webapp up](https://github.com/Azure/app-service-linux-docs/blob/master/AzWebAppUP/runtime_detection.md)).
189
190
190
191
The command may take a few minutes to complete. While running, it provides messages about creating the resource group, the App Service plan, and the app resource, configuring logging, and doing ZIP deployment. It then gives the message, "You can launch the app at http://<app-name>.azurewebsites.net", which is the app's URL on Azure.
191
192
@@ -231,15 +232,15 @@ Sign in to the Azure portal at https://portal.azure.com.
231
232
:::image type="content" source="./media/quickstart-nodejs/portal-search.png?text=Azure portal search details" alt-text="Screenshot of portal search":::
232
233
233
234
1. In the **App Services** page, select **Create**.
234
-
1. In the **Basics** tab, under **Project details**, make sure the correct subscription is selected and then choose to **Create new** resource group. Type *myResourceGroup* for the name.
235
+
1. In the **Basics** tab, under **Project details**, ensure the correct subscription is selected and then select to **Create new** resource group. Type *myResourceGroup* for the name.
235
236
236
237
:::image type="content" source="./media/quickstart-nodejs/project-details.png" alt-text="Screenshot of the Project details section showing where you select the Azure subscription and the resource group for the web app":::
237
238
238
-
1. Under **Instance details**, type a globally unique name for your web app and select **Code**. Choose *Node 14 LTS* **Runtime stack**, an **Operating System**, and a **Region** you want to serve your app from.
239
+
1. Under **Instance details**, type a globally unique name for your web app and select **Code**. Select *Node 14 LTS* **Runtime stack**, an **Operating System**, and a **Region** you want to serve your app from.
239
240
240
241
:::image type="content" source="./media/quickstart-nodejs/instance-details.png" alt-text="Screenshot of the Instance details section where you provide a name for the virtual machine and select its region, image and size":::
241
242
242
-
1. Under **App Service Plan**, choose to **Create new** App Service Plan. Type *myAppServicePlan* for the name. To change to the Free tier, click **Change size**, select **Dev/Test** tab, select **F1**, and select the **Apply** button at the bottom of the page.
243
+
1. Under **App Service Plan**, select **Create new** App Service Plan. Type *myAppServicePlan* for the name. To change to the Free tier, select **Change size**, select **Dev/Test** tab, select **F1**, and select the **Apply** button at the bottom of the page.
243
244
244
245
:::image type="content" source="./media/quickstart-nodejs/app-service-plan-details.png" alt-text="Screenshot of the Administrator account section where you provide the administrator username and password":::
245
246
@@ -255,9 +256,9 @@ Sign in to the Azure portal at https://portal.azure.com.
255
256
256
257
### Get FTP credentials
257
258
258
-
Azure App Service supports [**two types of credentials**](deploy-configure-credentials.md) for FTP/S deployment. These credentials are not the same as your Azure subscription credentials. In this section, you get the *application-scope credentials* to use with FileZilla.
259
+
Azure App Service supports [**two types of credentials**](deploy-configure-credentials.md) for FTP/S deployment. These credentials aren't the same as your Azure subscription credentials. In this section, you get the *application-scope credentials* to use with FileZilla.
259
260
260
-
1. From the App Service app page, click **Deployment Center** in the left-hand menu and select **FTPS credentials** tab.
261
+
1. From the App Service app page, select**Deployment Center**in the left-hand menu and select**FTPS credentials** tab.
1. If asked to restart the app, click**Yes**. Once the app is restarted, the Visual Studio Code output window opens with a connection to the log stream.
338
+
1. If asked to restart the app, select **Yes**. Once the app is restarted, the Visual Studio Code output window opens with a connection to the log stream.
338
339
339
340
1. After a few seconds, the output window shows a message indicating that you're connected to the log-streaming service. You can generate more output activity by refreshing the page in the browser.
340
341
@@ -373,7 +374,7 @@ To stop log streaming at any time, press **Ctrl**+**C** in the terminal.
373
374
374
375
You can access the console logs generated from inside the app and the container in which it runs. You can stream log output (calls to `console.log()`) from the Node.js app directly in the Azure portal.
375
376
376
-
1. In the same **App Service** page for your app, use the left menu to scroll to the *Monitoring* section and click **Log stream**.
377
+
1. In the same **App Service** page for your app, use the left menu to scroll to the *Monitoring* section and select**Log stream**.
377
378
378
379
:::image type="content" source="./media/quickstart-nodejs/log-stream.png" alt-text="Screenshot of Log stream in Azure App service.":::
379
380
@@ -390,7 +391,7 @@ You can access the console logs generated from inside the app and the container
0 commit comments