Knative Tutorial

This tutorial assumes that you have prior knowledge of:

The following checks ensures that each chapter exercises are done with right environment settings.

  • Make sure the minikube clock is set to right timezone; this is required when using API’s that are time sensitive e.g. AWS s3 cli API that we will use in this tutorial demos

  • minikube

  • minishift

minikube ssh -- docker run -i --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i hwclock -s

If you are a mac user then the following setup might help:

brew install sleepwatcher
brew services start sleepwatcher
echo "PATH=$PATH:/usr/local/bin \n
minikube ssh -- docker run -i --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i hwclock -s" > ~/.wakeup
chmod +x ~/.wakeup
  • Make sure to be connected to minikube docker daemon

eval $(minikube docker-env)

  • Make sure right Kubernetes is used, it should be v1.12+

kubectl version

  • Make sure to be on knativetutorial namespace or use you night need to use --namespace knativetutorial in all commands

If you are on minikube then kubens utility can be used to switch to kubernetes namespace like:

kubens knativetutorial

minishift stop && \
minishift start --timezone 'Asia/Kolkata' (1)

1 Set it to your local timezone
  • Make sure to be connected to minishift docker daemon

eval $(minishift docker-env) && eval $(minishift oc-env)

  • Make sure right OpenShift client is used, it should be v3.11+ kubernetes v1.11.0+ or above

oc version

  • Make sure to be on knativetutorial OpenShift project

oc project -q

If you are not on knativetutorial project, use the following command to change to knativetutorial project

oc project knativetutorial

  • Make sure right kamel version, preferred is 0.3.3 or above

kamel version

  • Make sure AWS CLI is installed and has the right version, at the time of doing this tutorial it was aws-cli/1.16.50 Python/3.7.1 Darwin/18.2.0 botocore/1.12.40

$ aws --version

  • Make sure right maven version is used (only for Java exercises), recommended maven version is 3.6.0+

./mvnw --version