Skip to content

Latest commit

 

History

History
88 lines (58 loc) · 2.46 KB

README.md

File metadata and controls

88 lines (58 loc) · 2.46 KB

Deploy Tomcat

aks/tomcat/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure Container Registry
  3. Push a Tomcat Docker image to Azure Container Registry
  4. Deploy an Azure Kubernetes Service cluster
  5. Create a Kube config for your Azure Kubernetes Service cluster (using admin access keys)
  6. Update your AKS cluster to use your Azure Container Registry

Deploying Tomcat

First open the deployment.yml file in an editor and replace ACR with the name of your registry OR execute the command line below:

  sed -i "s/ACR/$ACR_NAME/g" deployment.yml

Then execute the command below to deploy to the AKS cluster.

kubectl apply -f deployment.yml

Note in a production environment you should use an Ingress controller instead of directly exposing the IP address

To get the public IP address use the following command.

kubectl get service/tomcat

If the EXTERNAL-IP column has no IP address yet keep repeating the command as it might take a while before AKS has assigned a public IP.

Once the EXTERNAL-IP shows up open your browser to http://EXTERNAL-IP.

It should tell you:

And this is served by a custom Tomcat using a Docker image coming from our 
own Azure Container Registry.

Cleanup

Do NOT forget to remove the resources once you are done running the example.

1m