Check out https://github.com/gardener/garden-setup for a more detailed instruction and additional information. To install Gardener in your base cluster, a command line tool sow is used. Use the provided Docker image that already contains sow
and all required tools. To execute sow
you call a wrapper script which starts sow
in a Docker container (Docker will download the image from eu.gcr.io/gardener-project/sow if it is not available locally yet). Docker executes the sow command with the given arguments, and mounts parts of your file system into that container so that sow
can read configuration files for the installation of Gardener components, and can persist the state of your installation. After sow
's execution Docker removes the container again.
-
Clone the
sow
repository and add the path to our wrapper script to yourPATH
variable so you can callsow
on the command line.# setup for calling sow via the wrapper git clone "https://github.com/gardener/sow" cd sow export PATH=$PATH:$PWD/docker/bin
-
Create a directory
landscape
for your Gardener landscape and clone this repository into a subdirectory calledcrop
:cd .. mkdir landscape cd landscape git clone "https://github.com/gardener/garden-setup" crop
-
If you don't have your
kubekonfig
stored locally somewhere yet, download it. For example, for GKE you would use the following command:gcloud container clusters get-credentials --zone --project
-
Save your
kubeconfig
somewhere in yourlandscape
directory. For the remaining steps we will assume that you saved it using file pathlandscape/kubeconfig
. -
In your
landscape
directory, create a configuration file calledacre.yaml
. The structure of the configuration file is described below. Note that the relative file path./kubeconfig
file must be specified in fieldlandscape.cluster.kubeconfig
in the configuration file. Checkout configuration file acre for configuration details.Do not use file
acre.yaml
in directorycrop
. This file is used internally by the installation tool. -
If you created the base cluster using GKE convert your
kubeconfig
file to one that uses basic authentication with Google-specific configuration parameters:sow convertkubeconfig
When asked for credentials, enter the ones that the GKE dashboard shows when clicking on
show credentials
.sow
will replace the file specified inlandscape.cluster.kubeconfig
of youracre.yaml
file by a kubeconfig file that uses basic authentication. -
In your first terminal window, use the following command to check in which order the components will be installed. Nothing will be deployed yet and you can test this way if your syntax in
acre.yaml
is correct:sow order -A
-
If there are no error messages, use the following command to deploy Gardener on your base cluster:
sow deploy -A
-
sow
now starts to install Gardener in your base cluster. The installation can take about 30 minutes.sow
prints out status messages to the terminal window so that you can check the status of the installation. The other terminal window will show the newly created Kubernetes resources after a while and if their deployment was successful. Wait until the last component is deployed and all created Kubernetes resources are in statusRunning
. -
Use the following command to find out the URL of the Gardener dashboard.
sow url
Login to SAP Gardener Dashboard to create a Kubernetes Clusters on Amazon Web Services, Microsoft Azure, Google Cloud Platform, Alibaba Cloud, or OpenStack cloud provider.
Set the KUBECONFIG
as path to the kubeconfig file of your newly created cluster (you can find the kubeconfig e.g. in the Gardener dashboard). Follow the instructions below to run the Kubernetes e2e conformance tests. Adjust values for arguments k8sVersion
and cloudprovider
respective to your new cluster.
#first set KUBECONFIG to your cluster
docker run -ti -e --rm -v $KUBECONFIG:/mye2e/shoot.config golang:1.13 bash
# run all commands below within container
go get github.com/gardener/test-infra; cd /go/src/github.com/gardener/test-infra
export GO111MODULE=on; export E2E_EXPORT_PATH=/tmp/export; export KUBECONFIG=/mye2e/shoot.config; export GINKGO_PARALLEL=false
go run -mod=vendor ./integration-tests/e2e --k8sVersion=1.15.6 --cloudprovider=alicloud --testcasegroup="conformance"