Skip to content
71 changes: 4 additions & 67 deletions content/nginxaas-azure/loadbalancer-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,75 +69,12 @@ The steps in this section must be completed once for each new setup. We will ins

#### Create an NGINXaaS data plane API key

{{< call-out "note" >}}
The data plane API key has the following requirements:

- The key should have an expiration date. The default expiration date is six months from the date of creation. The expiration date cannot be longer than two years from the date of creation.
- The key should be at least 12 characters long.
- The key requires three out of four of the following types of characters:
- lowercase characters.
- uppercase characters.
- symbols.
- numbers.

A good example of an API key that will satisfy the requirements is UUIDv4.

{{< /call-out >}}

The data plane API key can be created using the Azure CLI or portal.

##### Create an NGINXaaS data plane API key using the Azure portal

1. Go to your NGINXaaS for Azure deployment.
1. Select **NGINXaaS Loadbalancer for Kubernetes** on the left blade.
1. Select **New API Key**.
1. Provide a name for the new API key in the right panel, and select an expiration date.
1. Select the **Add API Key** button.
1. Copy the value of the new API key.

{{< call-out "note" >}}
Make sure to write down the key value in a safe location after creation, as you cannot retrieve it again. If you lose the generated value, delete the existing key and create a new one.
{{< /call-out >}}

##### Create an NGINXaaS data plane API key using the Azure CLI

Set shell variables about the name of the NGINXaaS you've already created:

```shell
## Customize this to provide the details about my already created NGINXaaS deployment
nginxName=myNginx
nginxGroup=myNginxGroup
```

Generate a new random data plane API key:

```shell
# Generate a new random key or specify a value for it.
keyName=myKey
keyValue=$(uuidgen --random)
```

Create the key for your NGINXaaS deployment:
For detailed instructions on creating the dataplane API key and obtaining the API endpoint, see [Create NGINXaaS Dataplane API Key]({{< ref "/nginxaas-azure/quickstart/dataplane-api-key/" >}}).

```shell
az nginx deployment api-key create --name $keyName --secret-text $keyValue --deployment-name $nginxName --resource-group $nginxGroup
```
Make note of:

#### NGINXaaS data plane API endpoint

The data plane API endpoint can be retrieved using the Azure CLI or portal.

##### View NGINXaaS data plane API endpoint using the Azure portal

1. Go to your NGINXaaS for Azure deployment.
1. Select **NGINXaaS Loadbalancer for Kubernetes** on the left blade.
1. The data plane API endpoint associated with the deployment is available at the top of the screen.

##### View NGINXaaS data plane API endpoint using the Azure CLI

```shell
dataplaneAPIEndpoint=$(az nginx deployment show -g "$nginxGroup" -n "$nginxName" --query properties.dataplaneApiEndpoint -o tsv)
```
- The API key value (you'll need this for the NLK configuration)
- The dataplane API endpoint (you'll need this with the `/nplus` suffix)

#### Install the NLK controller

Expand Down
Loading