run end-to-end tests

this will run some nice automated cluster tests

requirements

# install jq
> sudo apt install -y jq

install go on master

# get go
> wget https://dl.google.com/go/go1.15.linux-amd64.tar.gz

# extract go to /usr/local
> sudo tar -C /usr/local -xzf go1.15.linux-amd64.tar.gz

# set go path env
> export GOPATH="/home/vagrant/go"

# add go to path env
> export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

build and install kubetest

# clone repo
> git clone https://github.com/kubernetes/test-infra.git

# change dir
> cd test-infra/

# build binary
> GO111MODULE=on go install ./kubetest

use the version specific to the cluster

# set k8s version env
> K8S_VERSION=$(kubectl version -o json | jq -r '.serverVersion.gitVersion')

# set kubetest env
> export KUBERNETES_CONFORMANCE_TEST=y \
  && export KUBECONFIG="$HOME/.kube/config"

# run kubetest
> kubetest --provider=skeleton --test \
  --test_args=”--ginkgo.focus=\[Conformance\]\
  --extract ${K8S_VERSION} | tee test.out

— copyleft —

all commands shown on this page are from mmumshad’s fork of “kubernetes-the-hard-way” by kelseyhightower on github