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.
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 | shLinux
curl -fsSL https://clis.ng.bluemix.net/install/linux | shWindows 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-cliMacPorts
sudo port selfupdatesudo port install kubectl
Linux
Ubuntu, Debian or HypriotOS
sudo apt-get update && sudo apt-get install -y apt-transport-httpscurl -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.listsudo apt-get updatesudo apt-get install -y kubectlCentOS, RHEL or Fedora
cat <<EOF > /etc/yum.repos.d/kubernetes.repo[kubernetes]name=Kubernetesbaseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64enabled=1gpgcheck=1repo_gpgcheck=1gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpgEOFyum install -y kubectlSnap
sudo snap install helm --classic
Windows
Powershell
Install-Script -Name install-kubectl -Scope CurrentUser -Forceinstall-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.