> [!CAUTION]
> You are currently viewing version 1.2 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.2 (unsupported)</button>

- Supported versions:
- [v1.17 (latest)](https://docs.cloud.google.com/apigee/docs/hybrid/v1.17/install-create-cluster-aks.html)
- [v1.16](https://docs.cloud.google.com/apigee/docs/hybrid/v1.16/install-create-cluster-aks.html)
- [v1.15](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/install-create-cluster-aks.html)
- [v1.14](https://docs.cloud.google.com/apigee/docs/hybrid/v1.14/install-create-cluster-aks.html)
- [List of supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions)
- Unsupported versions:
- [v1.13](https://docs.cloud.google.com/apigee/docs/hybrid/v1.13/install-create-cluster-aks.html)
- [v1.12](https://docs.cloud.google.com/apigee/docs/hybrid/v1.12/install-create-cluster-aks.html)
- [v1.11](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-create-cluster-aks.html)
- [v1.10](https://docs.cloud.google.com/apigee/docs/hybrid/v1.10/install-create-cluster-aks.html)
- [v1.9](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/install-create-cluster-aks.html)
- [v1.8](https://docs.cloud.google.com/apigee/docs/hybrid/v1.8/install-create-cluster-aks.html)
- [v1.7](https://docs.cloud.google.com/apigee/docs/hybrid/v1.7/install-create-cluster-aks.html)
- [v1.6](https://docs.cloud.google.com/apigee/docs/hybrid/v1.6/install-create-cluster-aks.html)
- [v1.5](https://docs.cloud.google.com/apigee/docs/hybrid/v1.5/install-create-cluster-aks.html)
- [v1.4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.4/install-create-cluster-aks.html)
- [v1.3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.3/install-create-cluster-aks.md.txt)
- [v1.2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-create-cluster-aks.md.txt)
- [v1.1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.1/install-create-cluster-aks.md.txt)

> [!WARNING]
> **UPGRADING:** If you are upgrading from v1.1.x to v1.2.0, see [Upgrading Apigee hybrid](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/upgrade.md.txt) for instructions. If you are performing a new installation, continue with the configurations described below.


This step explains how to set up your shell environment and create a Microsoft®
Azure Kubernetes Service
(AKS) cluster suitable for testing Apigee hybrid.
There are many variations on how to create clusters in AKS. This topic walks through a basic scenario to help get you started with hybrid. For more detailed information about create clusters on AKS, see also [Quickstart:
Deploy an Azure Kubernetes Service cluster using the Azure CLI](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough) and [Quickstart: Deploy
an Azure Kubernetes Service (AKS) cluster using the Azure portal](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough)

## Set up your terminal shell

Be sure you have the [Azure CLI (az)](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
installed in your local shell. The Azure CLI
tool provides the primary command-line interface for Azure, and `kubectl` provides the primary
command-line interface for running commands against Kubernetes clusters.

## Create a resource group


Create a resource group either using Azure console or with the Azure CLI. For example:

```
az group create --name my-hybrid-rg --location eastus
```

## Create a virtual network


Create a virtual network with a non-conflicting CIDR range. For example:
For example:

<br />

### Syntax

```
az network vnet create \
 --name vnet-name \
 --resource-group my-hybrid-rg \
 --address-prefixes vnet-address-range \
 --subnet-name vnet-subnet-name \
 --subnet-prefix subnet-address-range
```

### Example

```
az network vnet create \
 --name my-hybrid-rg-vnet \
 --resource-group my-hybrid-rg \
 --address-prefixes 120.38.1.0/14 \
 --subnet-name my-hybrid-rg-vnet-subnet \
 --subnet-prefix 120.38.1.0/16
```


Where:

1. `my-hybrid-rg` is the name of the virtual network.
2. `vnet-address-range` is a list of address blocks reserved for this virtual network in CIDR notation.
3. `vnet-subnet-name` is the name of the subnet within the virtual network.
4. `subnet-address-range` is a list of address blocks reserved for this subnet in CIDR notation.

## Create an AKS cluster

> [!WARNING]
> **Note:** Apigee does not support [GKE Sandbox](https://cloud.google.com/kubernetes-engine/docs/concepts/sandbox-pods) or [gVisor](https://github.com/google/gvisor).


In this step, you will create an AKS cluster.

1. Open the [Microsoft® Azure Portal](https://portal.azure.com/).
2. Click **Kubernetes services**.
3. Create a cluster with the following minimum configuration settings.

   > [!NOTE]
   > The configuration values shown below are for example purposes only. They are generally the default values and are suitable for testing purposes. It is up to you to decide how to configure your cluster to suit your requirements.


   **Recommended minimum storage**: Review the AKS disk specifications and choose a storage volume size
   based on your IOPs and cost requirements.

   | Tab | Attribute | Value |
   |---|---|---|
   | **Basics** | Subscription | Your subscription name |
   |   | Resource group | The resource group you created previously |
   |   | Region | The region you specified previously. For example: (US) East US |
   |   | Kubernetes cluster name | The name of the cluster. For example: `my-hybrid-aks-cluster` |
   |   | Kubernetes version | Choose version 1.14.x or a later version |
   |   | DNS name prefix | The DNS name prefix. For example: `my-hybrid-aks-cluster-dns` |
   |   | Node count | 3 |
   |   | Node size | DS3 Standard > [!NOTE] > Using virtual cpus less than 4 may result in the failure of Cassandra pod creation due to not enough cpus. Storage will be provisioned using kubernetes stateful dynamic provisioner |
   | **Scale** | Virtual nodes | Disabled |
   |   | VM scale sets | Enabled |
   | **Authentication** | Enable RBAC | Yes |
   |   | Service principal | Default |
   | **Networking** | HTTP application routing | No |
   |   | Load balancer | Standard |
   |   | Network configuration | Advanced |
   |   | Virtual network | The virtual network name. You can select the virtual network you created previously, or create a new one by clicking the **Create new** link. For example: `my-hybrid-rg-vnet` |
   |   | Cluster subnet | Example: `default (10.240.0.0/16)` |
   |   | Kubernetes service address range | The service address range. Be sure to use a non-competing address range. For example: `10.0.0.0/16` |
   |   | Kubernetes DNS service IP address | For example: `10.0.0.10` |
   |   | Docker Bridge address | For example: `172.17.0.1/16` |
   | **Monitoring** | Enable container monitoring | Yes |
   |   | Log Analytics workspace | For example: `DefaultWorkspace-66f9d75c-2cd9-47dd-ad0f-c43d888e9cef-EUS` |
   | **Tags** |   | None |

4. Click **Review and Create**.
5. When the cluster creation completes, go to the next step.

## Set cluster credentials


Add the kubernetes cluster credentials for the newly created cluster using the following command
if not already added. For example:

```
az aks get-credentials --resource-group my-hybrid-rg --name my-hybrid-aks-cluster
```

## Set the current context


A *context* is a group of access parameters. Each context contains a Kubernetes cluster,
a user and a namespace. The current context is the cluster that is currently the default for
`kubectl`: all `kubectl` commands run against that cluster.


Make sure the current context is set to the cluster you just created. For example:

```
kubectl config current-context
 my-hybrid-aks-cluster-context
```


If the context is not set to your cluster as expected, follow these steps to change it:

1. List all the contexts to determine which is the *current* context. In the following example, the context is set to the `my-hybrid-aks-ext01`:

   ```
   kubectl config get-contexts
   CURRENT   NAME                            CLUSTER                                 AUTHINFO
             my-hybrid-aks-cluster    my-hybrid-aks-cluster          clusterUser_my-hybrid-rg2_myhybrid-aks-cluster
   *         my-hybrid-aks-ext01      my-hybrid-aks-ext01            clusterUser_my-hybrid-rg_my-hybrid-aks-ext01

   ```
2. If necessary, set the current context to the cluster you just created (the cluster into which you intend to install Apigee hybrid). Assuming the previous `get-contexts` output, if the cluster name you created were `my-hybrid-aks-cluster`, you would switch to the `my-hybrid-aks-cluster` context, as follows:

   ```
   kubectl config use-context my-hybrid-aks-cluster
   ```

   Where `my-hybrid-aks-cluster` is the name of the cluster context to switch to.

## Summary


You now have a Kubernetes cluster running in AKS. Your shell environment is
set up, and you are ready to install the Apigee hybrid runtime software
on your local machine.
[1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-create-cluster-aks.md.txt) [(NEXT) Step 2: Install apigeectl](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-download-install-aks.md.txt) [3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-copy-overrides-aks.md.txt) [4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-apply-hybrid-aks.md.txt)

<br />