{"id":18429121,"url":"https://github.com/openliberty/guide-cloud-azure","last_synced_at":"2025-07-11T01:38:44.780Z","repository":{"id":37800151,"uuid":"190787032","full_name":"OpenLiberty/guide-cloud-azure","owner":"OpenLiberty","description":"﻿﻿A guide on how to deploy microservices to Azure Kubernetes Service (AKS) on Microsoft Azure.","archived":false,"fork":false,"pushed_at":"2025-07-02T20:37:41.000Z","size":2306,"stargazers_count":5,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"prod","last_synced_at":"2025-07-02T21:34:09.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openliberty.io/guides/cloud-azure.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenLiberty.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-07T17:57:00.000Z","updated_at":"2025-06-06T15:12:48.000Z","dependencies_parsed_at":"2024-04-23T20:54:43.358Z","dependency_job_id":"b0f7fd4c-c358-4afa-bd65-4a5112da7d42","html_url":"https://github.com/OpenLiberty/guide-cloud-azure","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/OpenLiberty/guide-cloud-azure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLiberty%2Fguide-cloud-azure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLiberty%2Fguide-cloud-azure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLiberty%2Fguide-cloud-azure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLiberty%2Fguide-cloud-azure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenLiberty","download_url":"https://codeload.github.com/OpenLiberty/guide-cloud-azure/tar.gz/refs/heads/prod","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLiberty%2Fguide-cloud-azure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264705445,"owners_count":23652156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T05:15:54.675Z","updated_at":"2025-07-11T01:38:44.762Z","avatar_url":"https://github.com/OpenLiberty.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"// Copyright (c) 2019, 2025 IBM Corporation and others.\n// Licensed under Creative Commons Attribution-NoDerivatives\n// 4.0 International (CC BY-ND 4.0)\n//   https://creativecommons.org/licenses/by-nd/4.0/\n//\n// Contributors:\n//     IBM Corporation\n//\n:projectid: cloud-azure\n:page-layout: guide-multipane\n:page-duration: 1 hour\n:page-releasedate: 2019-08-13\n:page-majorupdateddate: 2025-02-14\n:page-description: Explore how to deploy microservices to Azure Kubernetes Service (AKS).\n:page-tags: ['kubernetes', 'docker', 'cloud']\n:page-permalink: /guides/{projectid}\n:page-related-guides: ['kubernetes-intro', 'kubernetes-microprofile-config', 'kubernetes-microprofile-health']\n:imagesdir: /img/guide/{projectid}\n:common-includes: https://raw.githubusercontent.com/OpenLiberty/guides-common/prod\n:source-highlighter: prettify\n:page-seo-title: Deploying Java microservices to Microsoft Azure Kubernetes Service (AKS)\n:page-seo-description: A getting started tutorial with examples on how to deploy Java microservices to Microsoft Azure Kubernetes Service (AKS) using Azure Container Registry (ACR).\n:guide-author: Open Liberty\n:page-essential: false\n= Deploying microservices to Azure Kubernetes Service\n\n[.hidden]\nNOTE: This repository contains the guide documentation source. To view the guide in published form,\nview it on the https://openliberty.io/guides/{projectid}.html[Open Liberty website].\n\nExplore how to deploy microservices to Azure Kubernetes Service (AKS) on Microsoft Azure.\n\n:kube: Kubernetes\n:hashtag: #\n:win: WINDOWS\n:mac: MAC\n:linux: LINUX\n:system-api: http://[system-EXTERNAL-IP]:9080/system/properties\n:inventory-api: http://[inventory-EXTERNAL-IP]:9081/inventory/systems\n\n// =================================================================================================\n// Introduction\n// =================================================================================================\n\n== What you'll learn\n\nYou will learn how to deploy two microservices in Open Liberty containers to a {kube} cluster on Azure Kubernetes Service (AKS).\n\nKubernetes is an open source container orchestrator that automates many tasks involved in deploying, managing, and scaling containerized applications. To learn more about Kubernetes and how to use it with the Open Liberty Operator, check out the https://openliberty.io/guides/openliberty-operator-intro.html[Deploying a microservice to Kubernetes using Open Liberty Operator^] guide.\n\nThere are different cloud-based solutions for running your {kube} workloads. A cloud-based infrastructure enables you to focus on developing your microservices without worrying about low-level infrastructure details for deployment. Using a cloud helps\nyou to easily scale and manage your microservices in a high-availability setup.\n\nAzure offers a managed {kube} service called Azure Kubernetes Service (AKS). Using AKS simplifies the process of running Kubernetes on Azure without needing to install or maintain your own Kubernetes control plane. It provides a hosted {kube} cluster that you can deploy your microservices to. You will use AKS with Azure Container Registry (ACR). ACR is a private registry that is used to store and distribute your container images. Because AKS is not free, a cost might be associated with running this guide. See the official https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/[AKS pricing^] documentation for more details.\n\nThis guide will introduce the IBM WebSphere Liberty and Open Liberty on AKS plan, a solution that automates most of the standard steps for provisioning WebSphere Liberty or Open Liberty on an AKS cluster. Once the initial provisioning is complete, you can further customize your deployments as needed.\n\nThe two microservices you will deploy are called `system` and `inventory`. \nThe `system` microservice returns the JVM system properties of the running container. \nIt also returns the name of the pod in the HTTP header, making replicas easy to distinguish from each other. \nThe `inventory` microservice adds the properties from the `system` microservice to the inventory. \nThis demonstrates how communication can be established between pods inside a cluster.\n\n// =================================================================================================\n// Prerequisites\n// =================================================================================================\n\n== Additional prerequisites\n\nBefore you begin, the following additional tools need to be installed:\n\n* *Docker:* You need a containerization software for building containers. Kubernetes \nsupports various container types, but you will use Docker in this guide. For installation \ninstructions, refer to the official https://docs.docker.com/install/[Docker^] documentation.\nIf you already have Docker installed, make sure to have it running.\n\n* *Azure subscription*: To run this guide, you will need an Azure subscription. Navigate to the \nhttps://azure.microsoft.com/en-us/pricing/purchase-options/pay-as-you-go/[Microsoft Azure Purchase Options^] \nto create an account with your email and start a Pay-As-You-Go subscription. \n\n* *IBM WebSphere Liberty and Open Liberty on AKS plan*: You will need to use the https://azuremarketplace.microsoft.com/en-us/marketplace/apps/ibm-usa-ny-armonk-hq-6275750-ibmcloud-aiops.20210924-liberty-aks?tab=Overview[IBM WebSphere Liberty and Open Liberty on AKS plan on Azure marketplace^]. See the official\nhttps://learn.microsoft.com/en-us/azure/aks/howto-deploy-java-liberty-app?tabs=in-bash#create-a-liberty-on-aks-deployment-using-the-portal[Create a Liberty on AKS deployment using the portal^] documentation for more information. Or, you can go directly to https://aka.ms/liberty-aks[the plan]. To use this plan, you must have one of the following Azure role-based access control sets: Contributor and User Access Administrator together, or Owner of the current subscription.\n\n* *Azure CLI:* You will need to use the Azure Command Line Interface (CLI). See the official\nhttps://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest[Install the Azure CLI^]\ndocumentation for information about setting up the Azure CLI for your platform. \nTo verify that the Azure CLI is installed correctly, run the following command:\n\n\n+\n[role=command]\n```\naz --version\n```\n\n* *kubectl*: You need the Kubernetes command-line tool `kubectl` to interact with your Kubernetes cluster.\nIf you do not have `kubectl` installed already, use the Azure CLI to download and install `kubectl` with the following command:\n\n[.tab_link.windows_link]\n`*WINDOWS*`\n[.tab_link.mac_link]\n`*MAC*`\n[.tab_link.linux_link]\n`*LINUX*`\n\n[.tab_content.windows_section]\n--\n[role='command']\n```\naz aks install-cli\n```\n--\n\n[.tab_content.mac_section.linux_section]\n--\n[role='command']\n```\nsudo az aks install-cli\n```\n--\n\nTo begin this guide, make sure that you are logged in to Azure to get access to your subscription:\n\n[role=command]\n```\naz login\n```\n\n// =================================================================================================\n// Getting started\n// =================================================================================================\n\n[role=command]\ninclude::{common-includes}/gitclone.adoc[]\n\n// no \"try what you'll build\" section in this guide because it would be too long due to all setup the user will have to do.\n\n== Provisioning resources for Liberty on AKS\n\nTo deploy your microservices to AKS with Liberty, you need to provision the necessary infrastructure. This involves creating an Azure Kubernetes Service (AKS) cluster to host your microservices and an Azure Container Registry (ACR) to store and manage the container images.\n\n=== Creating a resource group\n\nA resource group is an Azure construct to manage a logical collection of resources for your cloud deployments on Azure. You must create a resource group to hold and manage the resources you need for your Kubernetes deployment.\n\nTo create a resource group efficiently, navigate to the https://aka.ms/liberty-aks[IBM WebSphere Liberty and Open Liberty on AKS] plan and click **Create** to begin.\n\nIn the **Basics** pane, for the **Resource group** field, select **Create new** and enter `guideGroup` as the name of the resource group.\n\nimage::AKS_tool_create_resource_group.png[AKS tool create resource group,align=\"center\"]\n\nFor the **Region** field, you must specify an Azure location. This location determines where the metadata for your resources is stored. If additional resources are created without specifying a location, they will default to the region you selected for the resource group. Click the **Region** drop-down menu and select the desired location.\n\nimage::Region_Selection.png[Region Selection,align=\"center\"]\n\nNote that AKS is not available in all regions. Make sure that the region you select is https://azure.microsoft.com/en-us/global-infrastructure/services/?products=kubernetes-service[compatible with AKS^].\n\n=== Setting up ACR and Kubernetes cluster on AKS\n\nAfter you set up the resource group, leave the remaining configuration at its default settings by skipping the **AKS**, **Load balancing**, and **Operator and application** panes. The default configuration automatically sets up an https://azure.microsoft.com/en-ca/products/container-registry[Azure Container Registry^] in the same region where your services are deployed, links it to your resource group, creates an https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-deploy-cluster?tabs=azure-cli[AKS cluster^], and deploys the https://github.com/OpenLiberty/open-liberty-operator/releases/latest[Open Liberty Operator^] to manage your Open Liberty applications.\n\nFor more information on configuring these options, see the https://learn.microsoft.com/en-us/azure/aks/howto-deploy-java-liberty-app?tabs=in-bash#create-a-liberty-on-aks-deployment-using-the-portal[Create a Liberty on AKS deployment using the portal] documentation.\n\nAfter you review the configurations, select **Review + create** to validate your setup. After validation, click **Create** to initiate the deployment, which can take up to 20 minutes to complete. You'll see a `Deployment is in progress` message, and when the deployment is complete, a `Your deployment is complete` message will confirm the creation of the ACR and AKS cluster.\n\n== Uploading images to a container registry\n\nOnce your Azure Container Registry (ACR) is created, you can containerize your microservices and upload their Docker images to the ACR for storage and deployment.\n\n=== Logging into the container registry\n\nBefore uploading your images, you need to log in to your Azure Container Registry (ACR). Navigate to the resource group overview in the Azure Portal and locate the container registry that was created during the deployment. You will find the registry name listed under the **Name** column.\n\nFor example, in the following screenshot, the registry name is `acrc75e71`.\n\nimage::Locate_ACR.png[Locate ACR,align=\"center\"]\n\nUse this registry name in place of `[registry-name]` in the upcoming commands.\n\nAlternatively, if you prefer using the command line, you can retrieve the container registry information by running the following command:\n\n[role=command]\n```\naz acr list --resource-group guideGroup --output table\n```\n\nThis command returns a table with the details of your ACR, including its name. Look for output similar to the following example:\n\n[role=\"no_copy\"]\n----\nNAME       RESOURCE GROUP    LOCATION    SKU    LOGIN SERVER          CREATION DATE         ADMIN ENABLED\n---------  ----------------  ----------  -----  --------------------  --------------------  ---------------\nacrc75e71  guideGroup        eastus      Basic  acrc75e71.azurecr.io  2024-08-09T17:53:38Z  True\n----\n\nOnce you have the registry name, log in to your Azure Container Registry using the following command, replacing `[registry-name]` with the name of your container registry:\n\n[role=command]\n```\naz acr login -n [registry-name]\n```\n\nIf the login is successful, you will see the following message:\n\n[role=\"no_copy\"]\n----\nLogin Succeeded\n----\n\n=== Building your Docker images\n\nThe starting Java project, which you can find in the `start` directory, is a multi-module Maven\nproject. It is made up of the `system` and `inventory` microservices. Each microservice exists in its own directory,\n`start/system` and `start/inventory`. Both of these directories contain a Dockerfile, which is necessary\nfor building the Docker images. If you're unfamiliar with Dockerfiles, check out the\nhttps://openliberty.io/guides/containerize.html[Containerizing microservices^] guide.\n\nNavigate to the `start` directory and run the following command:\n\ninclude::{common-includes}/os-tabs.adoc[]\n\n[.tab_content.windows_section]\n--\n[role='command']\n```\nmvnw.cmd package\n```\n--\n\n[.tab_content.mac_section]\n--\n[role='command']\n```\n./mvnw package\n```\n--\n\n[.tab_content.linux_section]\n--\n[role='command']\n```\n./mvnw package\n```\n--\n\nNow that your microservices are packaged, you can build the Docker images using the `docker build` commands. Ensure that Docker is installed and the Docker daemon is running before proceeding.\n\nRun the following commands to build and containerize the application:\n\n[role='command']\n```\ndocker build --platform linux/amd64 -t system:1.0-SNAPSHOT system/.\ndocker build --platform linux/amd64 -t inventory:1.0-SNAPSHOT inventory/.\n```\n\nTo verify that the images are built, run the `docker images` command to list all local Docker images:\n\n[role='command']\n```\ndocker images\n```\n\nYour two images, `system` and `inventory`, are included in the list of all Docker images:\n\n[role=\"no_copy\"]\n----\nREPOSITORY    TAG             IMAGE ID        CREATED          SIZE\ninventory     1.0-SNAPSHOT    08fef024e986    4 minutes ago    471MB\nsystem        1.0-SNAPSHOT    1dff6d0b4f31    5 minutes ago    470MB\n----\n\n=== Pushing the images to a container registry\n\nPushing the images to a registry allows the cluster to create pods using your container images.\n\nFirst, retrieve your registry server name, which typically be in the following format: `[registry-name].azurecr.io`. You can find the server name by running the following command:\n\n[role=command]\n```\naz acr show -n [registry-name] --query loginServer\n```\n\nLook for output similar to the following example. \n\n[role=\"no_copy\"]\n----\n\"acr31a3a1.azurecr.io\"\n----\n\nTag your container images with your registry by the following commands. Substitute your registry server name for the `[registry-server]` value.\n\n[role=command]\n```\ndocker tag system:1.0-SNAPSHOT [registry-server]/system:1.0-SNAPSHOT\ndocker tag inventory:1.0-SNAPSHOT [registry-server]/inventory:1.0-SNAPSHOT\n```\n\nFinally, push your images to the registry by running the following commands:\n\n[role=command]\n```\ndocker push [registry-server]/system:1.0-SNAPSHOT\ndocker push [registry-server]/inventory:1.0-SNAPSHOT\n```\n\n// =================================================================================================\n// Accessing and configuring an AKS cluster\n// =================================================================================================\n== Accessing and configuring an AKS cluster\n\nSince your Azure Kubernetes Service (AKS) cluster is already set up, you can now access and configure it to deploy your microservices.\n\n=== Connecting the AKS cluster to Kubernetes\n\nTo manage and interact with your AKS cluster using Kubernetes, you need to integrate the AKS cluster credentials into your local Kubernetes configuration. This integration allows your local Kubernetes CLI (`kubectl`) to communicate with the AKS cluster for deploying and managing resources.\n\nTo begin, obtain the information about the Kubernetes cluster created within the `guideGroup` resource group. You can find this information by either viewing the resource group overview in the Azure Portal or running the following command:\n\n[role=command]\n```\naz aks list --resource-group guideGroup --output table\n```\n\nThe cluster name, formatted as `clusterXXXXXX`, is identified in the following output.\n\n[role=\"no_copy\"]\n----\nName           Location    ResourceGroup    KubernetesVersion    CurrentKubernetesVersion    ProvisioningState    Fqdn\n-------------  ----------  ---------------  -------------------  --------------------------  -------------------  -----------------------------------------------\nclusterc75e71  eastus      guideGroup       1.29                 1.29.8                      Succeeded            clusterc75e71-dns-pazznf8n.hcp.eastus.azmk8s.io\n----\n\nMerge the credentials of your cluster into your current Kubernetes configuration by using the `az aks get-credentials` command. Replace `[cluster-name]` with the name of the cluster. The default Kubernetes configuration file that is updated with your cluster credentials is located within the `~/.kube/config` filepath.\n\n[role=command]\n```\naz aks get-credentials -g guideGroup -n [cluster-name]\n```\n\nYou will see an output similar to the following:\n\n[role=\"no_copy\"]\n----\nMerged [cluster-name] as current context in /Users/.kube/config\n----\n\nRun the following command to check the status of the available nodes in your AKS cluster:\n\n[role=command]\n```\nkubectl get nodes\n```\n\nThe `kubectl get nodes` command outputs information about the node. Ensure that the `STATUS` of the node is in the `Ready` state before you proceed. \n\n[role=\"no_copy\"]\n----\nNAME                                STATUS   ROLES    AGE   VERSION\naks-agentpool-15010410-vmss000000   Ready    \u003cnone\u003e   65m   v1.29.8\n----\n\n=== Storing registry credentials in a secret\n\nTo be able to pull the images from your Azure container registry, the credentials of your registry must be added to your service\nthrough a secret. \n\nView the password for your Azure container registry:\n\n[role=command]\n```\naz acr credential show -n [registry-name] --query \"passwords[0].value\" -o tsv\n```\n\nUse the `kubectl create secret docker-registry` command to create a secret to hold your registry credentials. \nReplace `[password]` with the registry password that you viewed with the \n`az acr credential show -n [registry-name]` command. The email that is associated with your Docker account replaces `[email-address]`.\n\n[.tab_link.windows_link]\n`*WINDOWS*`\n[.tab_link.mac_link]\n`*MAC*`\n[.tab_link.linux_link]\n`*LINUX*`\n\n[.tab_content.windows_section]\n--\n[role='command']\n```\nkubectl create secret docker-registry guidesecret ^\n    --docker-server=[registry-server] ^\n    --docker-username=[registry-name] ^\n    --docker-password=[password] ^\n    --docker-email=[email-address]\n```\n--\n\n[.tab_content.mac_section.linux_section]\n--\n[role='command']\n```\nkubectl create secret docker-registry guidesecret \\\n    --docker-server=[registry-server] \\\n    --docker-username=[registry-name] \\\n    --docker-password=[password] \\\n    --docker-email=[email-address]\n```\n--\n\nThe secret is successfully created with the following output:\n\n[role=\"no_copy\"]\n----\nsecret/guidesecret created\n----\n\n// =================================================================================================\n// Deploying microservices to AKS\n// =================================================================================================\n== Deploying microservices to AKS\n\nNow that your container images are built and your Kubernetes cluster is ready, you can deploy your microservices using the Open Liberty Operator. \n\n=== Creating a deployment definition\n\nThe Open Liberty Operator provides custom resource definitions (CRDs) that define how your Open Liberty applications are deployed. These CRDs are described in a YAML file, which outlines the deployment details and services required for your application. You can also delete any resources from the cluster by using the same YAML file that you used to deploy them. In this guide, the [hotspot]`deploy.yaml` resource definition file is provided for you. To learn more about deploying microservices using the Open Liberty Operator, check out the https://openliberty.io/guides/openliberty-operator-intro.html[Deploying a microservice to Kubernetes using Open Liberty Operator^] guide.\n\n[role=\"code_command hotspot file=0\", subs=\"quotes\"]\n----\n#Update the `deploy.yaml` file in the `start` directory.#\n`deploy.yaml`\n----\n[role=\"edit_command_text\"]\nReplace [hotspot=sysImage hotspot=invImage file=0]`[registry-server]` with your container registry server.\nYou can get the login server for your registry by running the `az acr show -n [registry-name] --query loginServer` command.\n\ndeploy.yaml\n[source, Text, linenums, indent=0, role=\"code_column\"]\n----\ninclude::finish/deploy.yaml[]\n----\n\nIn the [hotspot]`deploy.yaml` file, the custom resource (CR) is specified to be [hotspot=sysCr hotspot=invCr file=0]`OpenLibertyApplication`. The [hotspot=sysImage hotspot=invImage file=0]`applicationImage` is the name and tag of the container image that you want \nto use for the container. The [hotspot]`deploy.yaml` file references the images that you pushed to your registry\nfor the [hotspot=sysImage file=0]`system` and [hotspot=invImage file=0]`inventory` repositories. These images can be pulled\nwith the [hotspot=sysSecret hotspot=invSecret file=0]`secret` that you defined before.\n\nThe service that is used to expose your deployments has a type of [hotspot=sysLoadBalancer hotspot=invLoadBalancer file=0]`LoadBalancer`. \nThis means you can access these services from IP addresses that forward incoming traffic to your nodepool via a specific port.\nYou can expose your services in other ways such as using a `NodePort` service type. \n\n=== Deploying your application\n\nTo deploy your microservices to Azure Kubernetes Service, you need Kubernetes to create\nthe contents of the [hotspot]`deploy.yaml` file. \n\nRun the following command to deploy the resources defined in the [hotspot]`deploy.yaml` file:\n\n[role='command']\n```\nkubectl apply -f deploy.yaml\n```\n\nYou will see an output similar to the following:\n\n[role=\"no_copy\"]\n----\nopenlibertyapplication.apps.openliberty.io/system-deployment created\nopenlibertyapplication.apps.openliberty.io/inventory-deployment created\n----\n\nRun the following command to check the status of your pods:\n[role='command']\n```\nkubectl get pods\n```\n\nIf all the pods are healthy and running, you see an output similar to the following:\n[role=\"no_copy\"]\n----\nNAME                                    READY   STATUS    RESTARTS   AGE\ninventory-deployment-5d6bcf79bc-nm6bm   1/1     Running   0          33s\nsystem-deployment-f7757c55-2t7mk        1/1     Running   0          35s\n----\n\n=== Making requests to the microservices\n\nYou need the external IP addresses that are associated with the `system` and `inventory` services to try out your microservices.\n\nTake note of the `EXTERNAL-IP` in the output of the following commands. It is the \nhostname that you will later substitute into `[EXTERNAL-IP]` to access the `system` and `inventory` services.\n\nView the information of the `system` service to see its `EXTERNAL-IP` address:\n\n[role='command']\n```\nkubectl get service/system-deployment\n```\n\nYou need to wait a while for the `EXTERNAL-IP` to change from `\u003cpending\u003e` to an IP address.\n\n[role=\"no_copy\"]\n----\nNAME                TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE\nsystem-deployment   LoadBalancer   10.0.162.69    \u003cpending\u003e     9080:30260/TCP   3s\n----\n\n[role=\"no_copy\"]\n----\nNAME                TYPE           CLUSTER-IP    EXTERNAL-IP     PORT(S)          AGE\nsystem-deployment   LoadBalancer   10.0.162.69   135.237.37.69   9080:32480/TCP   16s\n----\n\nView the information of the `inventory` service to see its `EXTERNAL-IP` address:\n\n[role='command']\n```\nkubectl get service/inventory-deployment\n```\n\nYou will need to wait a while for the `EXTERNAL-IP` to change from `\u003cpending\u003e` to an IP address.\n\n[role=\"no_copy\"]\n----\nNAME                   TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE\ninventory-deployment   LoadBalancer   10.0.96.147   \u003cpending\u003e     9081:30431/TCP   2s\n----\n\n[role=\"no_copy\"]\n----\nNAME                   TYPE           CLUSTER-IP    EXTERNAL-IP      PORT(S)          AGE\ninventory-deployment   LoadBalancer   10.0.96.147   135.237.38.19    9081:30431/TCP   74s\n----\n\nTo access your microservices, point your browser to the following URLs, substituting the appropriate `EXTERNAL-IP` hostnames\nfor the `system` and `inventory` services:\n\n* `{system-api}`\n* `{inventory-api}`\n\nIn the first URL, you see a result in JSON format with the system properties of the container JVM.\nThe second URL returns an empty list, which is expected because no system properties are stored in the inventory yet. \n\nPoint your browser to the `{inventory-api}/[system-EXTERNAL-IP]` URL. When you visit this URL, these system\nproperties are automatically stored in the inventory. Go back to `{inventory-api}` and\nyou see a new entry for `[system-EXTERNAL-IP]`.\n\n// =================================================================================================\n// Testing the microservices\n// =================================================================================================\n\n== Testing the microservices\n\nA few tests are included for you to test the basic functionality of the microservices. \nIf a test failure occurs, then you might have introduced a bug into the code. \nTo run the tests, wait for all pods to be in the ready state before you proceed further.\n\npom.xml\n[source, xml, linenums, role='code_column']\n----\ninclude::finish/inventory/pom.xml[]\n----\n\nThe default properties that are defined in the [hotspot file=0]`pom.xml` file are:\n\n[cols=\"15, 100\", options=\"header\"]\n|===\n| *Property*                      | *Description*\n| [hotspot=sysKubeService file=0]`system.ip` | Name of the {kube} Service wrapping the `system` pods, `system-service` by default.\n| [hotspot=invKubeService file=0]`inventory.ip` | Name of the {kube} Service wrapping the `inventory` pods, `inventory-service` by default.\n| [hotspot=sysHttpPort file=0]`sys.http.port`    | The HTTP port for the {kube} Service `system-service`, 9080 by default.\n| [hotspot=invHttpPort file=0]`inv.http.port`    | The HTTP port of the {kube} Service `inventory-service`, 9081 by default.\n|===\n\n\n=== Running the tests\n\nRun the Maven `failsafe:integration-test` goal to test your microservices by replacing `[system-EXTERNAL-IP]` and `[inventory-EXTERNAL-IP]`\nwith the values that were determined in the previous section.\n\ninclude::{common-includes}/os-tabs.adoc[]\n\n[.tab_content.windows_section]\n--\n[role='command']\n```\nmvnw.cmd failsafe:integration-test -Dsystem.ip=[system-EXTERNAL-IP] -Dinventory.ip=[inventory-EXTERNAL-IP]\n```\n--\n\n[.tab_content.mac_section]\n--\n[role='command']\n```\n./mvnw failsafe:integration-test -Dsystem.ip=[system-EXTERNAL-IP] -Dinventory.ip=[inventory-EXTERNAL-IP]\n```\n--\n\n[.tab_content.linux_section]\n--\n[role='command']\n```\n./mvnw failsafe:integration-test -Dsystem.ip=[system-EXTERNAL-IP] -Dinventory.ip=[inventory-EXTERNAL-IP]\n```\n--\n\nIf the tests pass, you will see an output similar to the following for each service:\n\n[role=\"no_copy\"]\n----\n-------------------------------------------------------\n T E S T S\n-------------------------------------------------------\nRunning it.io.openliberty.guides.system.SystemEndpointIT\nTests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.673 sec - in it.io.openliberty.guides.system.SystemEndpointIT\n\nResults:\n\nTests run: 1, Failures: 0, Errors: 0, Skipped: 0\n----\n\n[role=\"no_copy\"]\n----\n-------------------------------------------------------\n T E S T S\n-------------------------------------------------------\nRunning it.io.openliberty.guides.inventory.InventoryEndpointIT\nTests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.222 sec - in it.io.openliberty.guides.inventory.InventoryEndpointIT\n\nResults:\n\nTests run: 4, Failures: 0, Errors: 0, Skipped: 0\n----\n\n// =================================================================================================\n// Tearing down the environment\n// =================================================================================================\n\n== Tearing down the environment\n\nIt is important to clean up your resources when you are finished with the guide so that you do not incur extra charges for ongoing usage.\n\nWhen you no longer need your deployed microservices, you can delete all {kube} resources \nby running the `kubectl delete` command:\n\n[role='command']\n```\nkubectl delete -f deploy.yaml\n```\n\nBecause you are done testing your cluster, clean up all of its related sources using the `az group delete` command.\nThis command removes the resource group, container service, and all related resources:\n\n[role='command']\n```\naz group delete -g guideGroup --yes --no-wait\n```\n\n// =================================================================================================\n// finish\n// =================================================================================================\n\n== Great work! You're done!\n\nYou have just deployed two microservices running in Open Liberty to Azure Kubernetes Service (AKS). You also \nlearned how to use `kubectl` to deploy your microservices on a {kube} cluster.\n\n// Multipane\ninclude::{common-includes}/attribution.adoc[subs=\"attributes\"]\n\n// DO NO CREATE ANYMORE SECTIONS AT THIS POINT\n// Related guides will be added in automatically here if you included them in \":page-related-guides\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenliberty%2Fguide-cloud-azure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenliberty%2Fguide-cloud-azure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenliberty%2Fguide-cloud-azure/lists"}