Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Helm doc updates #470

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection><employee><id>1</id><name>Penny</name></employee><employee><id>2</id><name>Sheldon</name></employee><employee><id>3</id><name>Amy</name></employee><employee><id>4</id><name>Leonard</name></employee><employee><id>5</id><name>Bernadette</name></employee><employee><id>6</id><name>Raj</name></employee><employee><id>7</id><name>Howard</name></employee><employee><id>8</id><name>Priya</name></employee></collection>
Expand Down