En este paso se explica cómo configurar el entorno de shell y crear un clúster de Microsoft®
Azure Kubernetes Service
(AKS) adecuado para probar Apigee hybrid.
.
Configurar la shell de la terminal
Asegúrate de que tienes instalados
la CLI de Azure (az) y kubectl en tu shell local. La herramienta de la CLI de Azure proporciona la interfaz de línea de comandos principal de Azure, y kubectl proporciona la interfaz de línea de comandos principal para ejecutar comandos en clústeres de Kubernetes.
Crear un grupo de recursos
Crea un grupo de recursos con la consola de Azure o con la CLI de Azure. Por ejemplo:
az group create --name my-hybrid-rg --location eastus
Crear una red virtual
Crea una red virtual con un intervalo CIDR que no entre en conflicto. Por ejemplo:
Crea un clúster con los siguientes ajustes de configuración mínimos.
Tabulador
Atributo
Valor
Aspectos básicos
Suscripción
Nombre de la suscripción
Grupo de recursos
El grupo de recursos que has creado anteriormente
Región
La región que especificaste anteriormente. Por ejemplo: (US) East US
Nombre del clúster de Kubernetes
Nombre del clúster. Por ejemplo: my-hybrid-aks-cluster
Versión de Kubernetes
Elige la versión 1.13 o una posterior
Prefijo del nombre de DNS
El prefijo del nombre de DNS. Por ejemplo: my-hybrid-aks-cluster-dns
Recuento de nodos
3
Tamaño del nodo
DS3 Standard
Escala
Nodos virtuales
Inhabilitado
Conjuntos de escalado de máquinas virtuales
Habilitado
Autenticación
Habilitar el control de acceso basado en roles
Sí
Entidad de servicio
Predeterminado
Redes
Enrutamiento de aplicaciones HTTP
No
Balanceador de carga
Estándar
Configuración de red
Avanzado
Red virtual
El nombre de la red virtual. Puedes seleccionar la red virtual que hayas creado anteriormente o crear una haciendo clic en el enlace Crear nueva. Por ejemplo: my-hybrid-rg-vnet
Subred de clúster
Ejemplo: default (10.240.0.0/16)
Intervalo de direcciones de servicio de Kubernetes
El intervalo de direcciones de servicio. Asegúrate de usar un intervalo de direcciones que no compita con el tuyo.
Por ejemplo: 10.0.0.0/16
Dirección IP del servicio DNS de Kubernetes
Por ejemplo: 10.0.0.10
Dirección de puente de Docker
Por ejemplo: 172.17.0.1/16
Monitorización
Habilitar la monitorización de contenedores
Sí
Espacio de trabajo de Log Analytics
Por ejemplo: DefaultWorkspace-66f9d75c-2cd9-47dd-ad0f-c43d888e9cef-EUS
Etiquetas
Ninguno
Haz clic en Revisar y crear.
Cuando se haya completado la creación del clúster, ve al siguiente paso.
Definir las credenciales del clúster
Añade las credenciales del clúster de Kubernetes del clúster que acabas de crear con el siguiente comando, si aún no lo has hecho. Por ejemplo:
az aks get-credentials --resource-group my-hybrid-rg --name my-hybrid-aks-cluster
Definir el contexto actual
Un contexto es un grupo de parámetros de acceso. Cada contexto contiene un clúster de Kubernetes, un usuario y un espacio de nombres. El contexto actual es el clúster que está configurado como predeterminado para
kubectl: todos los comandos kubectl se ejecutan en ese clúster.
Asegúrate de que el contexto actual sea el clúster que acabas de crear. Por ejemplo:
Si el contexto no se ha definido en tu clúster como esperabas, sigue estos pasos para cambiarlo:
Lista todos los contextos para determinar cuál es el contexto actual. En el siguiente ejemplo, el contexto se define como 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
Si es necesario, define el contexto actual en el clúster que acabas de crear (el clúster en el que quieres instalar Apigee hybrid). Si se toma como referencia el resultado de get-contexts anterior, si el nombre del clúster que has creado es my-hybrid-aks-cluster, cambiarías al contexto de my-hybrid-aks-cluster de la siguiente manera:
kubectl config use-context my-hybrid-aks-cluster
Donde my-hybrid-aks-cluster es el nombre del contexto del clúster al que quieres cambiar.
Resumen
Ahora tienes un clúster de Kubernetes que se ejecuta en AKS. Tu entorno de shell está configurado y puedes instalar el software de tiempo de ejecución de Apigee hybrid en tu máquina local.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis guide details how to set up a shell environment and create a Microsoft Azure Kubernetes Service (AKS) cluster suitable for testing Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eThe Azure CLI and \u003ccode\u003ekubectl\u003c/code\u003e tools are required and should be installed in your local shell for interacting with Azure and Kubernetes clusters.\u003c/p\u003e\n"],["\u003cp\u003eA resource group and a virtual network must be created within Azure, using the provided Azure CLI commands or through the Azure console.\u003c/p\u003e\n"],["\u003cp\u003eAn AKS cluster needs to be created, with specific configurations detailed in the provided table, ensuring that the node size is set to a minimum of DS3 Standard for sufficient CPU resources.\u003c/p\u003e\n"],["\u003cp\u003eThe current Kubernetes context must be set to the newly created AKS cluster to allow \u003ccode\u003ekubectl\u003c/code\u003e commands to interact with the correct cluster.\u003c/p\u003e\n"]]],[],null,["# Step 1: Create an AKS cluster\n\n| You are currently viewing version 1.1 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nThis step explains how to set up your shell environment and create a Microsoft®\nAzure Kubernetes Service\n(AKS) cluster suitable for testing Apigee hybrid.\n| 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:\n| Deploy an Azure Kubernetes Service cluster using the Azure CLI](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough) and [Quickstart: Deploy\n| an Azure Kubernetes Service (AKS) cluster using the Azure portal](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough)\n\nSet up your terminal shell\n--------------------------\n\nBe 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/)\ninstalled in your local shell. The Azure CLI\ntool provides the primary command-line interface for Azure, and `kubectl` provides the primary\ncommand-line interface for running commands against Kubernetes clusters.\n\nCreate a resource group\n-----------------------\n\n\nCreate a resource group either using Azure console or with the Azure CLI. For example: \n\n```\naz group create --name my-hybrid-rg --location eastus\n```\n\nCreate a virtual network\n------------------------\n\n\nCreate a virtual network with a non-conflicting CIDR range. For example: \n\n```\naz network vnet create \\\n --name my-hybrid-rg-vnet \\\n --resource-group my-hybrid-rg \\\n --address-prefixes 120.38.1.0/24 \\\n --subnet-name my-hybrid-rg-vnet-subnet \\\n --subnet-prefix 120.38.1.0/26\n```\n\nCreate an AKS cluster\n---------------------\n\n| **Note:** Apigee does not support [GKE Sandbox](https://cloud.google.com/kubernetes-engine/sandbox) or [gVisor](https://github.com/google/gvisor).\n\n\nIn this step, you will create an AKS cluster.\n\n1. Open the [Microsoft® Azure Portal](https://portal.azure.com/).\n2. Click **Kubernetes services**.\n3. Create a cluster with the following minimum configuration settings. 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.\n\n4. Click **Review and Create**.\n5. When the cluster creation completes, go to the next step.\n\nSet cluster credentials\n-----------------------\n\n\nAdd the kubernetes cluster credentials for the newly created cluster using the following command\nif not already added. For example: \n\n```\naz aks get-credentials --resource-group my-hybrid-rg --name my-hybrid-aks-cluster\n```\n\nSet the current context\n-----------------------\n\n\nA *context* is a group of access parameters. Each context contains a Kubernetes cluster,\na user and a namespace. The current context is the cluster that is currently the default for\n`kubectl`: all `kubectl` commands run against that cluster.\n\n\nMake sure the current context is set to the cluster you just created. For example: \n\n```\nkubectl config current-context\n my-hybrid-aks-cluster-context\n```\n\n\nIf the context is not set to your cluster as expected, follow these steps to change it:\n\n1. 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`: \n\n ```\n kubectl config get-contexts\n CURRENT NAME CLUSTER AUTHINFO\n my-hybrid-aks-cluster my-hybrid-aks-cluster clusterUser_my-hybrid-rg2_myhybrid-aks-cluster\n * my-hybrid-aks-ext01 my-hybrid-aks-ext01 clusterUser_my-hybrid-rg_my-hybrid-aks-ext01\n\n ```\n2. 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: \n\n ```\n kubectl config use-context my-hybrid-aks-cluster\n ```\n\n Where `my-hybrid-aks-cluster` is the name of the cluster context to switch to.\n\nSummary\n-------\n\n\nYou now have a Kubernetes cluster running in AKS. Your shell environment is\nset up, and you are ready to install the Apigee hybrid runtime software\non your local machine.\n[1](/apigee/docs/hybrid/v1.1/install-create-cluster-aks) [(NEXT) Step 2: Install apigeectl](/apigee/docs/hybrid/v1.1/install-download-install-aks) [3](/apigee/docs/hybrid/v1.1/install-copy-overrides-aks) [4](/apigee/docs/hybrid/v1.1/install-apply-hybrid-aks)\n\n\u003cbr /\u003e"]]