Creating a Project
You can create a project using OKS CLI.
Once you have created your first project, you can then start Managing Your Clusters.
Creating a Project Using OKS CLI
Before you begin: Install and configure OKS CLI. For more information, see Installing and Configuring OKS CLI. |
The project create command allows you to create a project:
$ oks-cli project create \
--project-name NAME_OF_PROJECT \
--description "DESCRIPTION_OF_PROJECT" \
--cidr "RANGE_OF_IP_ADDRESSES" \
--tags "tag1=this,tag2=that"
This command contains the following options that you need to specify:
-
project-name: The name of the project, with a maximum length of 40 alphanumeric characters and dashes (-). This name must start with a lowercase letter and must not end with a dash. -
(optional)
description: A description for the project. -
(optional)
cidr: A range of IP addresses in CIDR notation that will be used in VPC Subnets for all VMs on which the cluster will run. By default,10.50.0.0/16.Once a project is created, you cannot change its CIDR.
-
CIDR should be a private block within the RFC 1918 ranges. For more information, see the RFC 1918 documentation.
-
The minimum accepted CIDR size is
/23, and the maximum accepted CIDR size is/16. For more information, see About Nets. -
The
172.31.0.0/16CIDR must not be used, as it is reserved for internal usage.
-
-
(optional)
output: The output format for the response (json|yaml). By default, the response format is JSON. -
(optional)
tags: One or more tags associated with the project. -
disable-api-termination: The ability to delete the project through the API. Iftrue, project deletion is disabled. Iffalse, it is enabled. -
(optional)
quirk: Advanced keys and parameters to pass to the control panel of the project. This option is required for feature requests. -
(optional)
filename: The name of the definition file that you want to create the project from.
The project create command returns the following elements:
-
id: The unique identifier of the project. -
name: The name of the project. -
description: The description of the project. -
cidr: The CIDR block allocated for VPC subnets where cluster VMs will run. -
region: The Region where the project is deployed. -
status: The current state of the project (pending|ready|deploying|updating|upgrading|failed|deleting). -
tags: One or more tags associated with the project. -
created_at: The date and time, in UTC format, at which the project was created. -
updated_at: The date and time, in UTC format, at which the project was last updated. -
deleted_at: The date and time, in UTC format, at which the project was deleted (nullif the project is still active). -
(optional)
disable-api-termination: The ability to delete the project through the API. Iftrue, project deletion is disabled. Iffalse, it is enabled.
{
"id": "12ca0d38-2927-4cf1-93de-049135f88f00",
"name": "NAME_OF_PROJECT",
"description": "DESCRIPTION_OF_PROJECT",
"cidr": "10.50.0.0/16",
"region": "eu-west-2",
"status": "pending",
"tags": {
"tag1": "this",
"tag2": "that"
},
"disable_api_termination": false,
"created_at": "2025-01-01T12:10:00.000000Z",
"updated_at": "2025-01-01T12:12:10.000000Z",
"deleted_at": null
}
Related Pages
Corresponding API Method