< Previous Solution - Home - Next Solution >
app-languages-helm-chart
helm chart provided in the Coach Solutions folder for Challenge 9 as one that can be demoed during the lecture.helm install
easily.First let’s install our new chart and make sure it is in the releases as well as check that everything is deployed in Kubernetes
NOTE: Take special note of the helm install
command and how we are telling it to create a new namespace. Because we did NOT put a namespace in the yaml file templates in our Chart, those resources will go into the namespace we pass into the -n
parameter, in our case mynamespace
. We’re also using the --create-namespace
option so that mynamespace
will be created if it doesn’t already exist.
# install Helm chart
helm install --create-namespace -n mynamespace --set appData.imageVersion=v2 langfacts-release2 langfacts
# check that the helm chart shows installed and working
helm list -A
# check that all the resources we expect in our new namespace are present
kubectl get all -n mynamespace
Next we’ll lay out all the commands needed to create the chart using the app-languages-helm-chart
folder in the Coach Solutions for Challenge 9 and get it pushed up to your Azure Container Registry
First of all we need to allow admin access and authenticate ourselves with the ACR and add it as a helm repository on our local system
# enable admin user on ACR
az acr update -n myacr -g myrg --admin-enabled true
# get credentials for Admin user on ACR (save these values)
az acr credential show -n myacr -g myrg
# login Helm to ACR using admin credentials (use values from above for -u and -p)
export HELM_EXPERIMENTAL_OCI=1
helm registry login myacr.azurecr.io -u myuser -p mypass
# Add ACR as Helm Repo and confirm it is in the list
az acr helm repo add --name myacr
helm repo list
app-languages-helm-chart
chart and push it to our ACR helm repo
Chart.yaml
# package Helm chart
helm package app-languages-helm-chart
# push Helm Chart to ACR
az acr helm push -n myacr langfacts-0.1.0.tgz
Now let’s update our local repo’s index and search to see if the langfacts
chart is available
# update Helm repo
helm repo update
# search for the langfacts chart to make sure it got uploaded
helm search repo lang
helm install
command and how we are telling it to create a new namespace. Because we did NOT put a namespace in the yaml file templates in our Chart, those resources will go into the namespace we pass into the -n
parameter, in our case mynamespace
. We’re also using the --create-namespace
option so that mynamespace
will be created if it doesn’t already exist.# install Helm chart
helm install --create-namespace -n mynamespace --set appData.imageVersion=v2 langfacts-release2 myacr/langfacts
# check that the helm chart shows installed and working
helm list -A
# check that all the resources we expect in our new namespace are present
kubectl get all -n mynamespace