Create a Project
Before you begin
Section titled “Before you begin”This tutorial assumes you have already registered an account and have installed and configured the necessary tools to interact with Datum.
Confirm your kubeconfig context
Section titled “Confirm your kubeconfig context”Ensure that your kubectl tool is configured to use the correct context to interact with your organization by running the following command:
kubectl config current-context
The output is similar to:
datum-organization-pp4zn7tiw5be3beygm2d6mbcfe
Create a project
Section titled “Create a project”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/v1alphakind: Projectmetadata: generateName: intro-project-spec:
Create the project
kubectl create -f intro-project.yaml
The output is similar to:
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
.
kubectl get projects -w
The output is similar to:
NAME AGE CONTROL PLANE STATUSintro-project-zj6wx 2s APIServerProvisioningintro-project-zj6wx 22s ControllerManagerProvisioningintro-project-zj6wx 43s NetworkServicesOperatorProvisioningintro-project-zj6wx 64s WorkloadOperatorProvisioningintro-project-zj6wx 106s InfraProviderGCPProvisioningintro-project-zj6wx 2m3s Ready
Add a kubeconfig context for your project
Section titled “Add a kubeconfig context for your project”Create a kubeconfig context to access your project’s resources by executing
following command, replacing PROJECT_NAME
with your project’s name:
datumctl auth update-kubeconfig --project PROJECT_NAME
Confirm that the control plane is accessible:
kubectl explain locations.spec
GROUP: networking.datumapis.comKIND: LocationVERSION: v1alpha
FIELD: spec <Object>
DESCRIPTION: LocationSpec defines the desired state of Location.
... continued