Cette étape explique comment configurer votre environnement de shell et créer un cluster Microsoft® Azure Kubernetes Service (AKS) adapté au test d'Apigee hybrid.
Configurer l'interface système de votre terminal
Vérifiez que la CLI Azure (az) et l'kubectl sont installés dans votre interface système locale. L'outil Azure CLI est l'interface de ligne de commande principale utilisée sur Azure, et kubectl fournit l'interface de ligne de commande principale permettant d'exécuter des commandes sur les clusters Kubernetes.
Créer un groupe de ressources
Créez un groupe de ressources en utilisant soit la console Azure, soit la CLI Azure avec la commande suivante :
az group create --name my-hybrid-rg --location eastus
Créer un réseau virtuel
Créez un réseau virtuel avec une plage CIDR non conflictuelle.
Cliquez sur Kubernetes services (Services Kubernetes).
Créez un cluster avec les paramètres de configuration minimaux suivants.
Espace de stockage minimal recommandé : examinez les caractéristiques des disques AKS et choisissez une taille de volume de stockage en fonction de vos exigences en termes d'IOPS et de coûts.
Le groupe de ressources que vous avez créé précédemment
Région
La région que vous avez spécifiée précédemment. Par exemple : (US) Est des États-Unis
Nom du cluster Kubernetes
Le nom du cluster. Par exemple : my-hybrid-aks-cluster
Version de Kubernetes
Choisissez la version 1.16.x ou une version ultérieure.
Préfixe du nom DNS
Le préfixe du nom DNS. Par exemple : my-hybrid-aks-cluster-dns
Nombre de nœuds
3
Taille du nœud
Standard DS3
Évoluer
Nœuds virtuels
Désactivé
Ensembles de mise à l'échelle de VM
Activée
Authentification
Activer RBAC
Oui
Entité principale de service
Par défaut
Mise en réseau
Routage des applications HTTP
Non
Équilibreur de charge
Standard
Configuration du réseau
Azure CNI
Réseau virtuel
Le nom du réseau virtuel. Vous pouvez sélectionner le réseau virtuel que vous avez créé précédemment ou en créer un en cliquant sur le lien Créer un nouveau réseau. Par exemple : my-hybrid-rg-vnet
Sous-réseau de cluster
Exemple : default (10.240.0.0/16)
Plage d'adresses de service Kubernetes
La plage d'adresses de service. Veillez à utiliser une plage d'adresses non concurrentielles.
Par exemple : 10.0.0.0/16
Adresse IP du service DNS Kubernetes
Par exemple : 10.0.0.10
Adresse de liaison Docker
Par exemple : 172.17.0.1/16
Monitoring
Activer la surveillance des conteneurs
Oui
Espace de travail Log Analytics
Par exemple : DefaultWorkspace-66f9d75c-2cd9-47dd-ad0f-c43d888e9cef-EUS
Tags
Aucun
Cliquez sur Review and Create (Vérifier et créer).
Une fois la création du cluster terminée, passez à l'étape suivante.
Définir les identifiants du cluster
Si nécessaire, ajoutez les identifiants de cluster Kubernetes pour le cluster que vous venez de créer en utilisant la commande suivante :
az aks get-credentials --resource-group my-hybrid-rg --name my-hybrid-aks-cluster
Définir le contexte actuel
Un contexte est un groupe de paramètres d'accès. Chaque contexte contient un cluster Kubernetes, un utilisateur et un espace de noms. Le contexte actuel est le cluster par défaut actuel de kubectl : toutes les commandes kubectl s'exécutent sur ce cluster.
À l'aide de la commande suivante, vérifiez que le contexte actuel est bien défini sur le cluster que vous venez de créer :
Si le contexte n'est pas défini comme prévu sur votre cluster, procédez comme suit pour le modifier :
Répertoriez tous les contextes pour déterminer lequel est le contexte actuel. Dans l'exemple suivant, le contexte est défini sur 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 nécessaire, définissez le contexte actuel sur le cluster que vous venez de créer (dans lequel vous souhaitez installer Apigee hybrid). En supposant la sortie get-contexts précédente, si le nom du cluster que vous avez créé était my-hybrid-aks-cluster, vous basculeriez vers le contexte my-hybrid-aks-cluster, comme suit :
kubectl config use-context my-hybrid-aks-cluster
Où my-hybrid-aks-cluster est le nom du contexte du cluster vers lequel basculer.
Résumé
Vous disposez maintenant d'un cluster Kubernetes s'exécutant dans AKS. Votre environnement shell est configuré, et vous êtes prêt à installer le logiciel d'exécution Apigee hybrid sur votre machine locale.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis documentation is for Apigee hybrid version 1.3, which is end-of-life, and users should upgrade to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eThe guide provides instructions for setting up a shell environment and creating a Microsoft Azure Kubernetes Service (AKS) cluster for testing Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eUsers are instructed to install the Azure CLI (az) and kubectl tools in their local shell for interacting with Azure and Kubernetes.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation outlines how to create a resource group and virtual network within Azure, including defining address ranges and subnet specifications.\u003c/p\u003e\n"],["\u003cp\u003eThe guide details the process of creating an AKS cluster with recommended minimum configuration settings, including node size, Kubernetes version, networking, and monitoring configurations, suitable for testing purposes.\u003c/p\u003e\n"]]],[],null,["# Step 1: Create a cluster\n\n| You are currently viewing version 1.3 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| **Upgrading:** If you are upgrading to Apigee hybrid v1.3.0, see [Upgrading Apigee hybrid](/apigee/docs/hybrid/v1.3/upgrade) for instructions. If you are performing a new installation, continue with the configurations described below.\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| **Note:** 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 creating clusters on AKS, see [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/)\ntool installed 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 using the following command: \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.\n\n\nFor example: \n\n### Syntax\n\n```\naz network vnet create \\\n --name vnet-name \\\n --resource-group my-hybrid-rg \\\n --address-prefixes vnet-address-range \\\n --subnet-name vnet-subnet-name \\\n --subnet-prefix subnet-address-range\n```\n\n### 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/14 \\\n --subnet-name my-hybrid-rg-vnet-subnet \\\n --subnet-prefix 120.38.1.0/16\n```\n\n\nWhere:\n\n1. \u003cvar translate=\"no\"\u003emy-hybrid-rg\u003c/var\u003e is the name of the virtual network.\n2. \u003cvar translate=\"no\"\u003evnet-address-range\u003c/var\u003e is a list of address blocks reserved for this virtual network in CIDR notation.\n3. \u003cvar translate=\"no\"\u003evnet-subnet-name\u003c/var\u003e is the name of the subnet within the virtual network.\n4. \u003cvar translate=\"no\"\u003esubnet-address-range\u003c/var\u003e is a list of address blocks reserved for this subnet in CIDR notation.\n\nCreate an AKS cluster\n---------------------\n\n| **Caution:** Apigee does not support [GKE Sandbox](https://cloud.google.com/kubernetes-engine/docs/concepts/sandbox-pods) 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. **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.\n\n\n **Recommended minimum storage**: Review the AKS disk specifications and choose a storage volume size\n based on your IOPs and cost requirements.\n\n\n You can see cluster configuration guidelines for Apigee hybrid in\n [Configure Cassandra for production](/apigee/docs/hybrid/v1.3/cassandra-production) and\n [StorageClass configuration](/apigee/docs/hybrid/v1.3/cassandra-config).\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: \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 using the following command: \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.3/install-create-cluster-aks) [(NEXT) Step 2: Install cert-manager and ASM](/apigee/docs/hybrid/v1.3/install-download-cert-manager-istio-aks) [3](/apigee/docs/hybrid/v1.3/install-download-install-aks) [4](/apigee/docs/hybrid/v1.3/install-copy-overrides-aks) [5](/apigee/docs/hybrid/v1.3/install-apply-hybrid-aks)\n\n\u003cbr /\u003e"]]