Konfidence is pre-release software. Concepts and APIs are unstable and subject to change.
Skip to content

Create a landscape ​

Create a landscape to establish an operational boundary for stages and their deployment resources. Konfidence manages a dedicated namespace for each landscape.

Use Kubernetes access to create and maintain the landscape. Once its namespace is ready, configure deployment targets, registry credentials, and landscape services before creating stages.

For guidance on choosing landscape boundaries, see Landscapes and stages. To understand how a landscape connects artifacts to infrastructure, see the Deployment model.

Prerequisites ​

Before you begin, make sure you have:

  • A project in which to create the landscape.
  • Kubernetes permission to create and read Landscape resources in the namespace of the project. The update and delete sections also require the corresponding Kubernetes permissions.
  • Access to the Konfidence cluster through kubectl.

Create a landscape ​

Save the following manifest as landscape.yaml. It defines a Landscape resource in the namespace managed by its project:

yaml
apiVersion: konfidence.cloud/v1alpha1
kind: Landscape
metadata:
  name: prod-eu
  namespace: kden-p-ecommerce-platform
spec:
  displayName: Production - EU Region

Apply the manifest:

bash
kubectl apply -f landscape.yaml

Konfidence creates and manages a namespace for the landscape. By default, its name starts with kden-l- and includes the landscape name and a stable suffix.

Use a specific namespace name

Konfidence normally generates a collision-resistant namespace name. If an integration requires a predetermined name, set spec.namespace when creating the landscape:

yaml
apiVersion: konfidence.cloud/v1alpha1
kind: Landscape
metadata:
  name: prod-eu
  namespace: kden-p-ecommerce-platform
spec:
  displayName: Production - EU Region
  namespace: ecommerce-prod-eu

The namespace setting is immutable. Decide whether an override is necessary before creating the landscape.

Adopt an existing namespace

By default (spec.namespacePolicy: Create), Konfidence creates the namespace and reports an error if a namespace with that name already exists and isn't managed by the landscape.

To manage an existing namespace, set spec.namespacePolicy to Adopt. Adopt requires spec.namespace, which names the namespace to adopt. Konfidence rejects a landscape that sets Adopt without it. The following manifest defines a landscape that adopts the ecommerce-prod-eu namespace:

yaml
apiVersion: konfidence.cloud/v1alpha1
kind: Landscape
metadata:
  name: prod-eu
  namespace: kden-p-ecommerce-platform
spec:
  displayName: Production - EU Region
  namespace: ecommerce-prod-eu
  namespacePolicy: Adopt

Konfidence adds its management labels to the namespace. It does not adopt a namespace managed by another project or landscape. If the namespace doesn't exist, the landscape isn't ready and Konfidence retries until the namespace exists.

Verify the landscape ​

Inspect the landscape to find its managed namespace:

bash
kubectl get landscape prod-eu -n kden-p-ecommerce-platform

The output includes the managed namespace and the landscape's readiness status:

text
NAME      DISPLAY NAME             PROJECT              NAMESPACE                READY   AGE
prod-eu   Production - EU Region   ecommerce-platform   kden-l-prod-eu-5w54scz7   True    46h

When the landscape is ready, the READY column shows True and the NAMESPACE column shows its managed namespace.

Update the display name ​

You can change the display name without changing the resource or namespace name:

bash
kubectl patch landscape prod-eu \
  --namespace=kden-p-ecommerce-platform \
  --type=merge \
  --patch='{"spec":{"displayName":"Production - European Union"}}'

Delete a landscape ​

spec.deletionPolicy controls what happens to the managed namespace when you delete a landscape:

PolicyBehavior
Orphan (default)Konfidence keeps the namespace and its contents and removes only the konfidence.cloud/* management labels.
DeleteKonfidence deletes the namespace and everything in it, including stages and deployed artifacts.

Confirm that the landscape is no longer needed, then delete it:

bash
kubectl delete landscape prod-eu \
  --namespace=kden-p-ecommerce-platform

With Delete, Konfidence keeps the landscape in a terminating state until its managed namespace and all associated resources have been removed.

Next steps ​

EU and German government funding logos

Funded by the European Union – NextGenerationEU.

The views and opinions expressed are solely those of the author(s) and do not necessarily reflect the views of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.