In this lab, you will build ( x,y,x ).
< Lab specific Images here, in the /media sub-folder >
NGINX aaS | Docker |
---|---|
By the end of the lab you will be able to:
- Introduction to
xx
- Build an
yyy
Nginx configuration - Test access to your lab enviroment with Curl and Chrome
- Investigate
zzz
- You must have
aaaa
installed and running - You must have
bbbbb
installed - See
Lab0
for instructions on setting up your system for this Workshop - Familiarity with basic Linux commands and commandline tools
- Familiarity with basic Docker concepts and commands
- Familiarity with basic HTTP protocol
-
Create a container registry using the
az acr create
command. The registry name must be unique within Azure, and contain 5-50 alphanumeric charactersMY_RESOURCEGROUP=s.dutta MY_ACR=acrshouvik az acr create \ --resource-group $MY_RESOURCEGROUP \ --name $MY_ACR \ --sku Basic
-
From the output of the
az acr create
command, make a note of theloginServer
. The value ofloginServer
key is the fully qualified registry name. In our example the registry name isacrshouvik
and the login server name isacrshouvik.azurecr.io
. -
Login to the registry using below command. Make sure your local Docker daemon is up and running.
MY_ACR=acrshouvik az acr login --name $MY_ACR
At the end of the output you should see
Login Succeeded
!
We can quickly test the ability to push images to our Private ACR from our client machine.
-
If you do not have a test container image to push to ACR, you can use a simple container for testing, e.g.nginxinc/ingress-demo. You will use this same container for the lab exercises.
az acr import --name $MY_ACR --source docker.io/nginxinc/ingress-demo:latest --image nginxinc/ingress-demo:v1
The above command pulls the
nginxinc/ingress-demo
image from docker hub and pushes it to Azure ACR. -
Check if the image was successfully pushed to ACR using the azure cli command below:
MY_ACR=acrshouvik az acr repository list --name $MY_ACR --output table
###Sample Output### Result --------------------- nginxinc/ingress-demo
-
You will attach the newly created ACR to both AKS clusters. This will enable you to pull private images within AKS clusters directly from your ACR. Run below command to attach ACR to 1st AKS cluster:
MY_RESOURCEGROUP=s.dutta MY_AKS=aks-shouvik # first cluster MY_ACR=acrshouvik az aks update -n $MY_AKS -g $MY_RESOURCEGROUP --attach-acr $MY_ACR
-
Change the $MY_AKS environment variable, so you can attach your ACR to your second Cluster:
MY_RESOURCEGROUP=s.dutta MY_AKS=aks2-shouvik # change to second cluster MY_ACR=acrshouvik az aks update -n $MY_AKS -g $MY_RESOURCEGROUP --attach-acr $MY_ACR
NOTE: You need the Owner, Azure account administrator, or Azure co-administrator role on your Azure subscription. To avoid needing one of these roles, you can instead use an existing managed identity to authenticate ACR from AKS. See references for more details.
Nginx Rate Limiting here
This completes LabX.
- NGINX As A Service for Azure
- NGINX Plus Product Page
- NGINX Ingress Controller
- NGINX on Docker
- NGINX Directives Index
- NGINX Variables Index
- NGINX Technical Specs
- NGINX - Join Community Slack
- NGINX - HTTP Request Limits
- Chris Akker - Solutions Architect - Community and Alliances @ F5, Inc.
- Shouvik Dutta - Solutions Architect - Community and Alliances @ F5, Inc.
- Adam Currier - Solutions Architect - Community and Alliances @ F5, Inc.
Navigate to (Lab Guide)