Create a project
Create a project to organize landscapes, vector templates, and promotion configurations in a dedicated namespace. You can assign a project to a team and grant its members access through project roles.
The creation steps use cluster-level Kubernetes permissions. After creation, role bindings control access through the Konfidence API; they do not grant Kubernetes permissions.
Prerequisites
Before you begin, make sure you have:
- Access to the Konfidence cluster through
kubectlwith permission to createProjectresources. Projects are cluster-scoped. - A project name that is a valid DNS label. Konfidence derives the namespace name from it.
Manage the namespace lifecycle
Two fields control how Konfidence manages the project namespace.
spec.namespacePolicy controls whether Konfidence creates or adopts the namespace:
Create(default) creates the namespace and reports an error if one with that name already exists and isn't managed by the project.Adoptadds Konfidence's management labels to an existing namespace. Konfidence does not adopt a namespace managed by another project or landscape. If the namespace doesn't exist yet, the project isn't ready and Konfidence retries.
Adopt requires spec.namespace, which names the namespace to adopt. Konfidence rejects a project that sets Adopt without it. The following manifest defines a project that adopts the ecommerce-platform namespace:
apiVersion: konfidence.cloud/v1alpha1
kind: Project
metadata:
name: ecommerce-platform
spec:
displayName: E-Commerce Platform
namespace: ecommerce-platform
namespacePolicy: Adoptspec.deletionPolicy controls what happens to the namespace when you delete the project:
Orphan(default) keeps the namespace and its contents and removes only thekonfidence.cloud/*management labels.Deletedeletes the namespace and everything in it, including the project'sLandscaperesources. Each landscape's namespace follows that landscape'sspec.deletionPolicy. The default,Orphan, keeps the landscape namespace. To remove the landscape namespaces as well, setdeletionPolicy: Deleteon each landscape.
Set deletionPolicy: Delete before deleting the project if you want the namespace removed with it.
Create the project
Save the following manifest as project.yaml:
apiVersion: konfidence.cloud/v1alpha1
kind: Project
metadata:
name: ecommerce-platform
spec:
displayName: E-Commerce PlatformApply it:
kubectl apply -f project.yamlThe command prints project.konfidence.cloud/ecommerce-platform created.
Verify the namespace
Konfidence creates the namespace kden-p-ecommerce-platform and reports it in the project's Ready condition:
kubectl get project ecommerce-platform \
--output=jsonpath='{.status.conditions[?(@.type=="Ready")].status}{"\n"}'The command prints True. Confirm the namespace exists:
kubectl get namespace kden-p-ecommerce-platformGrant access
A new project has no role bindings, so nobody can use it through the Konfidence API. Add them in spec.roleBindings as described in Grant teams access to a project.
For the full field list, see the Project CRD reference.
Next steps
- Grant teams access to a project binds project roles to the groups that use it.
- Grant CI pipelines access gives automation a project role through its workload identity.
- Create a landscape prepares the first delivery environment inside the project using Kubernetes permissions.