Skip to content

Latest commit

 

History

History
183 lines (121 loc) · 6.67 KB

File metadata and controls

183 lines (121 loc) · 6.67 KB

Lab: Helm Setup and Deploy Application

In this lab we will setup Helm in our AKS cluster and deploy our application with Helm charts.

Prerequisites

Instructions

Note: The following lab assumes Helm version 3. Run the following to confirm your Helm version:

helm version

# Example Output:
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
  1. Review the Helm Chart components

    In this repo, there is a folder for charts with a sub-folder for each specific app chart. In our case each application has its own chart.

    The values.yaml file has the parameters that allow you to customize release. This file has the defaults, but they can be overridden on the command line.

    The templates folder holds the yaml files for the specific kubernetes resources for our application. Here you will see how Helm inserts the parameters into resources with this bracketed notation: eg - {{.Values.deploy.image}}

  2. Customize Chart Parameters

    In each chart we will need to update the values file with our specific Azure Container Registry.

  3. Deploy Charts

    Ensure namespace was created earlier:

    kubectl get ns hackfest
    
    NAME       STATUS    AGE
    hackfest   Active    4m

    Install each chart as below:

    # Application charts
    
    helm upgrade --install data-api charts/data-api --namespace hackfest
    helm upgrade --install quakes-api charts/quakes-api --namespace hackfest
    helm upgrade --install weather-api charts/weather-api --namespace hackfest
    helm upgrade --install flights-api charts/flights-api --namespace hackfest
    helm upgrade --install service-tracker-ui charts/service-tracker-ui --namespace hackfest
  4. Initialize application

    • First check to see if pods and services are working correctly
    kubectl get pod,svc -n hackfest
    
    NAME                                     READY   STATUS    RESTARTS   AGE
    pod/data-api-5bdc5c94b4-8xfq2            1/1     Running   3          5d3h
    pod/flights-api-77f77464df-n7jb4         1/1     Running   4          5d15h
    pod/quakes-api-7c8b96b594-vm5qd          1/1     Running   4          5d15h
    pod/service-tracker-ui-c4476d778-hpn5q   1/1     Running   3          5d6h
    pod/weather-api-56d6c57b89-cds8v         1/1     Running   4          5d15h
    
    NAME                         TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
    service/data-api             ClusterIP      10.0.179.206   <none>        3009/TCP         7d4h
    service/flights-api          ClusterIP      10.0.255.59    <none>        3003/TCP         7d4h
    service/quakes-api           ClusterIP      10.0.122.46    <none>        3012/TCP         7d4h
    service/service-tracker-ui   LoadBalancer   10.0.24.184    40.71.20.1    8080:30757/TCP   5d6h
    service/weather-api          ClusterIP      10.0.124.80    <none>        3015/TCP         7d4h
    • Browse to the web UI
    kubectl get service service-tracker-ui -n hackfest
    
    NAME                 TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE
    service-tracker-ui   LoadBalancer   10.0.24.184   40.71.20.1    8080:30757/TCP   5d6h

    Open the browser to http://40.71.20.1:8080 (your IP will be different #obvious)

    • You will need to click "REFRESH DATA" for each service to load the data sets.

      Service Tracker UI

    • Browse each map view and have some fun.

Troubleshooting / Debugging

  • Make sure Helm version on the client and server are the same to ensure compatibility.

Docs / References