This tutorial shows how to set up a cluster in different environments.
For the control-plane mode, with Kyma Control Plane (KCP) and Kyma runtime (SKR), create two separate clusters following the instructions below.
-
Create a
k3d
cluster:k3d cluster create op-kcp --registry-create op-kcp-registry.localhost:8888 # also add for the in-cluster mode only k3d cluster create op-skr --registry-create op-skr-registry.localhost:8888
-
Configure the local
k3d
registry. To reach the registries usinglocalhost
, add the following code to your/etc/hosts
file:# Added for Operator Registries 127.0.0.1 op-kcp-registry.localhost # also add for the in-cluster mode only 127.0.0.1 op-skr-registry.localhost
-
Set the
IMG
environment variable for thedocker-build
anddocker-push
commands, to make sure images are accessible by local k3d clusters.-
For the single-cluster mode:
# pointing to KCP registry in dual cluster mode export IMG=op-kcp-registry.localhost:8888/unsigned/operator-images
-
For the control-plane mode:
# pointing to SKR registry in dual cluster mode export IMG=op-skr-registry.localhost:8888/unsigned/operator-images
-
-
Once you pushed your image, verify the content. For browsing through the content of the local container registry, use, for example,
http://op-kcp-registry.localhost:8888/v2/_catalog?n=100
.
Learn how to use a Gardener cluster for testing.
-
Go to the Gardener account and download your
Access Kubeconfig
. -
Provision a compliant remote cluster using Kyma CLI:
# gardener_project - Gardener project name # gcp_secret - Cloud provider secret name (e.g. GCP) # gardener_account_kubeconfig - path to Access Kubeconfig from Step 1 kyma provision gardener gcp --name op-kcpskr --project ${gardener_project} -s ${gcp_secret} -c ${gardener_account_kubeconfig}
For example, this could look like
kyma provision gardener gcp --name op-kcpskr --project jellyfish -s gcp-jellyfish-secret -c .kube/kubeconfig-garden-jellyfish.yaml
. -
Create an external registry.
When using an external registry, make sure that the Gardener cluster (
op-kcpskr
) can reach your registry.You can follow the guide to set up a GCP-hosted artifact registry (GCR).
CAUTION: For private registries, you may have to configure additional settings not covered in this tutorial.
-
Set the
IMG
environment variable for thedocker-build
anddocker-push
commands.# this an example # sap-kyma-jellyfish-dev is the GCP project # operator-test is the artifact registry export IMG=europe-west3-docker.pkg.dev/sap-kyma-jellyfish-dev/operator-test