Setup

The text like Hello %USER% your password is %PASSWORD%, gets replaced as:

Hello %USER% your password is %PASSWORD%

Here is a User specific link with a role OpenShift Console

Prerequisite CLI tools

The following CLI tools are required for running the exercises in this tutorial. Please have them installed and configured before you get started with any of the tutorial chapters.

Tool macOS Fedora windows

Git

Download

Download

Download

Docker

Docker for Mac

dnf install docker

Docker for Windows

VirtualBox

Download

Download

Download

Minikube v1.12.1

Download

Download

Download

kubectl v1.18.0

Download

Download

Download

stern

brew install stern

Download

Download

Apache Maven 3.6.3

Download

Download

Download

The following CLI tools are optional for running the exercises in this tutorial. Although they are used in the tutorial, you could use others without any problem.

Tool macOS Fedora windows

yq v2.4.1

Download

Download

Download

jq v1.6.0

Download

Download

Download

httpie

brew install httpie

dnf install httpie

https://httpie.org/doc#windows-etc

watch

brew install watch

dnf install procps-ng

kubectx and kubens

brew install kubectx

https://github.com/ahmetb/kubectx

hey

brew install hey

Download

Download

Setup Kubernetes

The profile my_profile is created to run the tutorial:

  • Minikube

  • OpenShift

Having minikube installed and in your PATH, then run:

minikube start --memory=8192 --cpus=3 --kubernetes-version=v1.18.0 --vm-driver=virtualbox -p my_profile

And the output must be something similar like:

❌  profile "my_profile" not found
βœ…  Created a new profile : my_profile
βœ…  minikube profile was successfully set to my_profile
πŸ˜„  [default] minikube v1.12.1 on Darwin 10.15.2
✨  Selecting 'virtualbox' driver from user configuration (alternates: [hyperkit])
πŸ”₯  Creating virtualbox VM (CPUs=2, Memory=8192MB, Disk=50000MB) ...
🐳  Preparing Kubernetes v1.18.0 on Docker '19.03.5' ...
    β–ͺ apiserver.enable-admission-plugins=LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook
🚜  Pulling images ...
πŸš€  Launching Kubernetes ...
βŒ›  Waiting for cluster to come online ...
πŸ„  Done! kubectl is now configured to use "my_profile"

Finally configure to use minikube internal docker as docker host:

eval $(minikube docker-env -p my_profile)

To run OpenShift4, you need to have one provisioned using try.openshift.com or can use any existing OpenShift4 cluster. Once you have your cluster, you can download the latest OpenShift client(oc) from here and add to your path.

oc version

You can check the OpenShift version using:

oc version

The output should show oc version >=4.2:

Client Version: openshift-clients-4.3.0-201910250623-88-g6a937dfe
Kubernetes Version: v1.18.0

Then login into the cluster and run:

oc new-project my_profile

And then you are ready for start using Kubernetes:

kubelogo

Get tutorial sources

Before we start setting up the environment, let’s clone the tutorial sources and set the TUTORIAL_HOME environment variable to point to the root directory of the tutorial:

export TUTORIAL_HOME="$(pwd)/my_folder"
cd $TUTORIAL_HOME