Installing Helm 2.x

Let's perform the following steps to configure the prerequisites and install Helm:

  1. Create a ServiceAccount by using the following command:
$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
EOF
  1. Create a ClusterRoleBinding by using the following command:
$ cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
EOF

  1. Download the Helm installation script. This install-helm.sh script will detect the architecture of your system and get the latest correct binaries to install Helm:
$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh
  1. Run the script to install Helm. The following command will install the two important binaries, Helm and Tiller, required to run Helm:

$ chmod u+x install-helm.sh && ./install-helm.sh
  1. Run the init parameter to configure Helm with the service account we created in step 1. The --history-max parameter is used to purge and limit the Helm history, since without this setting the history can grow indefinitely and cause problems:
$ helm init --service-account tiller --history-max 200

This process with install the Helm server-side component Tiller in your cluster.

If you get a message complaining that Tiller is already installed in the cluster., you can run the same command by adding the --upgrade parameter to the end of the command and force-upgrading the existing version.
  1. Confirm the Helm version by running the following command:
$ helm version --short

At the time of writing this recipe, the latest stable version of Helm was v2.15.1 and the next version, Helm 3, was still in beta. In the following chapters and recipes, we will base our instruction on the Helm 2.x version.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.237.29