Skip to content

Create a Project

This tutorial assumes you have already registered an account and have installed and configured the necessary tools to interact with Datum.

Ensure that your kubectl tool is configured to use the correct context to interact with your organization by running the following command:

Terminal window
kubectl config current-context

The output is similar to:

Terminal window
datum-organization-pp4zn7tiw5be3beygm2d6mbcfe

Write the following project manifest to intro-project.yaml, replacing RESOURCE_ID with your organization’s resource id.

Note that generateName is used here, which will result in a name with the prefix of intro-project- and a random suffix.

apiVersion: resourcemanager.datumapis.com/v1alpha
kind: Project
metadata:
generateName: intro-project-
spec:

Create the project

Terminal window
kubectl create -f intro-project.yaml

The output is similar to:

Terminal window
project.resourcemanager.datumapis.com/intro-project-zj6wx created

Copy the generated project name, in this example it is intro-project-zj6wx.

Wait for the project’s control plane to become ready, which can take up to two minutes. Exit the command once the control plane status is Ready.

Terminal window
kubectl get projects -w

The output is similar to:

Terminal window
NAME AGE CONTROL PLANE STATUS
intro-project-zj6wx 2s APIServerProvisioning
intro-project-zj6wx 22s ControllerManagerProvisioning
intro-project-zj6wx 43s NetworkServicesOperatorProvisioning
intro-project-zj6wx 64s WorkloadOperatorProvisioning
intro-project-zj6wx 106s InfraProviderGCPProvisioning
intro-project-zj6wx 2m3s Ready

Create a kubeconfig context to access your project’s resources by executing following command, replacing PROJECT_NAME with your project’s name:

Terminal window
datumctl auth update-kubeconfig --project PROJECT_NAME

Confirm that the control plane is accessible:

Terminal window
kubectl explain locations.spec
Terminal window
GROUP: networking.datumapis.com
KIND: Location
VERSION: v1alpha
FIELD: spec <Object>
DESCRIPTION:
LocationSpec defines the desired state of Location.
... continued