Workshop

We will make use of Cloud Shell for this workshop.

This saves the local setup.

Although you probably setup you local system at some point anyway but we will save some time now by using the cloud shell.

Cloud Shell

Passcode: kube101

You can login using your IBM Cloud Login

Click on the terminal icon to start a terminal session. This terminal has all the tools we need for the workshop preinstalled.

If you want to setup you local machine as well follow these steps:

Install IBM Cloud CLI

You use the IBM Cloud CLI installer or the OS-specific shell installers below.

  • MacOS

    curl -fsSL https://clis.ng.bluemix.net/install/osx | sh
  • Linux

    curl -fsSL https://clis.ng.bluemix.net/install/linux | sh
  • Windows Powershell (Run as Administrator)

    iex(New-Object Net.WebClient).DownloadString('https://clis.ng.bluemix.net/install/powershell')

Install IBM CLI Plugins

For the lab we will need a few plugins.

  • container-service

    ibmcloud plugin install container-service

Install kubectl tooling

Install kubectl to enable access to your cluster.

  • MacOS

    • Homebrew

      brew install kubernetes-cli
    • MacPorts

      sudo port selfupdate
      sudo port install kubectl
  • Linux

    • Ubuntu, Debian or HypriotOS

      sudo apt-get update && sudo apt-get install -y apt-transport-https
      curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
      echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
      sudo apt-get update
      sudo apt-get install -y kubectl
    • CentOS, RHEL or Fedora

      cat <<EOF > /etc/yum.repos.d/kubernetes.repo
      [kubernetes]
      name=Kubernetes
      baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
      enabled=1
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
      EOF
      yum install -y kubectl
    • Snap

      sudo snap install helm --classic
  • Windows

    • Powershell

      Install-Script -Name install-kubectl -Scope CurrentUser -Force
      install-kubectl.ps1 [-DownloadLocation <path>]

      Note If you do not specify a `DownloadLocation`, `kubectl` will be installed in the user's temp Directory.

    • Chocolatey

      choco install kubernetes-helm

You can also install using curl.

Once Kubernetes is installed, test that the CLI works.

kubectl version

Docker Install

Install Docker For your OS