diff --git a/03-path-application-development/306-app-management-with-helm/readme.adoc b/03-path-application-development/306-app-management-with-helm/readme.adoc index b8082c33..48d96e40 100644 --- a/03-path-application-development/306-app-management-with-helm/readme.adoc +++ b/03-path-application-development/306-app-management-with-helm/readme.adoc @@ -10,7 +10,9 @@ https://github.com/kubernetes/helm[Helm] is a tool for managing https://github.c This chapter uses a cluster with 3 master nodes and 5 worker nodes as described here: link:../cluster-install#multi-master-multi-node-multi-az-gossip-based-cluster[multi-master, multi-node gossip based cluster]. -All configuration files for this chapter are in the `helm` directory. Make sure you change to that directory before giving any commands in this chapter. +All configuration files for this chapter are in the `helm` directory. Make sure you change to that directory before giving any commands in this chapter. If you are working in Cloud9: + + cd ~/environment/aws-workshop-for-kubernetes/03-path-application-development/306-app-management-with-helm/ == Install Helm @@ -26,6 +28,12 @@ Install on Mac OSX: brew install kubernetes-helm +In Cloud9 or similar Linux environments: + + curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh + chmod 700 get_helm.sh + ./get_helm.sh + https://docs.helm.sh/using_helm/#installing-helm[Installing Helm] provides complete set of options to install the client. === Install Helm server @@ -57,6 +65,10 @@ This will install `tiller` in the `kube-system` namespace. It can be installed i https://docs.helm.sh/using_helm/#installing-tiller[Installing Tiller] provides complete set of options to install the server. +As of kubernetes 1.9, you also need to create a cluster role binding for Helm: + + kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default + == Install Helm chart A Helm chart can be installed using the `helm install` command. @@ -109,8 +121,10 @@ db: - containerPort: 8080 ``` -Finally, install the chart: +Finally, clean up any old deployments and install the chart: + kubectl delete svc webapp + kubectl delete deployment webapp helm install --name sample sample This shows output: @@ -157,11 +171,13 @@ Start a proxy. Since the webapp service does not expose a public endpoint, proxy kubectl proxy --address 0.0.0.0 --accept-hosts '.*' --port 8080 -Access the application using: +In order to access the application, run this command: - curl -k https://ENVIRONMENT_ID.vfs.cloud9.REGION_ID.amazonaws.com/api/v1/proxy/namespaces/default/services/webapp/resources/employees + curl -k http://localhost:8080/api/v1/proxy/namespaces/default/services/webapp/resources/employees + +Alternatively, start Cloud9's browser preview using the `Preview -> Preview Running Application` menu item. When the browser opens in a new tab in the IDE, click the `Pop out into new window` button. This button will open a new browser window pointing to the Cloud9 environment. In that tab, append `/api/v1/proxy/namespaces/default/services/webapp/resources/employees` to the URL. -This shows the output: +Either of these methods shows the output: ``` 1Penny2Sheldon3Amy4Leonard5Bernadette6Raj7Howard8Priya