# Lab 0

This section is broken up into the following steps:

1. [Access the Cloud Shell](#1-access-the-cloud-shell)
2. [Install Helm Version 3](#2-install-helm-version-3)
3. [Configure Kubectl](#3-configure-kubectl)
4. [Log into OpenShift](#4-log-into-openshift)

## 1. Access the Cloud Shell

From the [IBM Cloud Home Page](https://cloud.ibm.com), select the terminal icon in the upper lefthand menu.

![Terminal Button](https://3686722056-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Bh2a26msY5M4vW3R9%2Fsync%2F4e3ef8a0e00a226609704936c4ea8ef92ca906ca.png?generation=1591054953731762\&alt=media)

## 2. Install Helm Version 3

Run the following commands to install Helm Version 3

```bash
wget https://get.helm.sh/helm-v3.2.0-linux-amd64.tar.gz
```

```bash
tar -zxvf helm-v3.2.0-linux-amd64.tar.gz
```

```bash
ls -al
```

```bash
echo 'export PATH=$HOME/linux-amd64:$PATH' > .bash_profile
```

```bash
source .bash_profile
```

```bash
helm version --short
```

The result is that you should have Helm Version 3 installed.

```bash
$ helm version --short
v3.2.0+ge11b7ce
```

## 3. Configure Kubectl

Run the `ibmcloud ks clusters` command to verify the terminal and setup for access to the cluster

```
ibmcloud ks clusters
```

Configure the `kubectl` cli available within the terminal for access to your cluster.

```
ibmcloud ks cluster config --cluster [cluster name]
```

Verify access to the Kubernetes API.

```
kubectl get namespace
```

You should see output similar to the following, if so, then your're ready to continue.

```
NAME              STATUS   AGE
default           Active   125m
ibm-cert-store    Active   121m
ibm-system        Active   124m
kube-node-lease   Active   125m
kube-public       Active   125m
kube-system       Active   125m
```

## 4. Log into OpenShift

Optionally, if you would like to use OpenShift for this lab, then you will need to authenticate with the OpenShift console before continuing.

From the [IBM Cloud Home Page](https://cloud.ibm.com), make sure you are in the IBM Cloud account where your cluster is located. Select from the dropdown menu in the upper right.

![correct account](https://3686722056-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Bh2a26msY5M4vW3R9%2Fsync%2F6e8f88d5a9eebafb6dca95506065fcb86362db90.png?generation=1591059514797428\&alt=media)

Next, find your clusters by navigating to **Kubernetes->Clusters** in the upper lefthand menu

![Kubernetes Menu](https://3686722056-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Bh2a26msY5M4vW3R9%2Fsync%2Ff355295f270717ed5bef42cc394c3a8bc0e4b9ac.png?generation=1591059515701437\&alt=media)

Select your cluster to get to the cluster home page. Then, select the **OpenShift Web Console** Button

![cluster homepage](https://3686722056-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Bh2a26msY5M4vW3R9%2Fsync%2Fd6a3f30e7890f833e309cfd11b5a61bd5f148f1b.png?generation=1591059517980195\&alt=media)

From the OpenShift console, in the upper righthand menu, select **Copy Login Command**

![copy login command](https://3686722056-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Bh2a26msY5M4vW3R9%2Fsync%2F4105df377d3778a04e039cebe589be7ea61b6e49.png?generation=1591059516634204\&alt=media)

Follow the instructions including logging in using your IBM ID to get the command to login. Run the command in your IBM Cloud Shell environment

```
oc login --token=... --server=...
```
