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.
Portal Alternative
Section titled “Portal Alternative”This tutorial uses a kubectl with manifest driven workflow to create your first project. Alternatively, you can create your first project via the Datum Cloud Portal.
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
.
Note that generateName
is used here, which will result in a name with the prefix of
intro-project-
and a random suffix.
apiVersion: resourcemanager.miloapis.com/v1alpha1kind: Projectmetadata: generateName: intro-project-spec:
Create the project
kubectl create -f intro-project.yaml
The output is similar to:
project.resourcemanager.miloapis.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.
Note: If you created your project via Datum Cloud Portal, you’ll want to copy/paste the same project name into the command below.
datumctl auth update-kubeconfig --project PROJECT_NAME
Confirm that the project’s control plane is accessible:
kubectl explain httpproxy.spec
GROUP: networking.datumapis.comKIND: HTTPProxyVERSION: v1alpha
FIELD: spec <Object>
DESCRIPTION: Spec defines the desired state of an HTTPProxy.
FIELDS: hostnames <[]string> Hostnames defines a set of hostnames that should match against the HTTP Host header to select a HTTPProxy used to process the request.
... continued