This example assumes you have previously completed the following examples:
- Create an Azure Resource Group
- Create an Azure Container Registry
- Push a GraalVM Docker image to Azure Container Registry
- Create settings.xml using admin access keys
- Deploy an Azure Kubernetes Service cluster
- Create a Kube config for your Azure Kubernetes Service cluster (using admin access keys)
- Update your AKS cluster to use your Azure Container Registry
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/graalvm
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/helloworld
.
It should tell you:
Hello
Do NOT forget to remove the resources once you are done running the example.
- Commands to manage Azure Kubernetes Services
- Azure Kubernetes Service Documentation
- kubectl
- GraalVM documentation
1m