How to create, manage, and delete a Containers namespace
This page shows you how to create and manage a Serverless Containers namespace. Namespaces allow you to group your containers and share environment variables between them.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
Creating a Serverless Containers namespace
- Click Containers in the Serverless section of the side menu. The list of your containers namespaces displays.
- Click Create namespace. If you have no existing Serverless Containers resources in your current Project, click Deploy container.
- Complete the following steps in the wizard:
- Enter a name or use the automatically generated one. The name must only contain alphanumeric characters and dashes.
- Enter an optional description and tags.
- Choose a region, which is the geographical location in which your namespace will be deployed.
- Tick the Enable VPC support if you want to create containers within this namespace that you can attach to a Private Network.
- Enter any environment variables required for your namespace. Environment variables configured in a namespace will be available in all containers/apps within the same namespace. For each environment variable, click + Add new variable and enter the key / value pair.
- Set secret environment variables (optional). Secrets are environment variables that are injected into your container and stored securely, but not displayed in the console after initial validation. Add a key and a value.
- Verify the estimated cost.
- Click Create namespace only to finish, or click Create namespace and add container if you want to deploy a container next.
Managing a Serverless Containers namespace
Generating and managing access tokens
The Scaleway console allows you to generate authentication tokens to grant users and applications access to the containers present in your namespace.
-
Click Containers in the Serverless section of the side menu. The containers page displays.
-
Click the containers namespace you want to manage.
-
Click the Namespace settings tab. Information about the region, registry endpoint and description of your namespace display.
-
Click + Generate token to create an access token for this namespace.
Private containers present in your namespace now require the authentication token to be executed, as shown below:
curl -H "X-Auth-Token: <YOUR_NAMESPACE_TOKEN>" <YOUR_CONTAINER_ENDPOINT>
Adding and managing environment variables and secrets
The Scaleway console allows you to define environment variables and secrets at the namespace-level to pass to the containers present in the namespace.
-
Click Containers in the Serverless section of the side menu. The containers page displays.
-
Click the containers namespace you want to manage.
-
Click the Namespace settings tab. Information about the region, registry endpoint and description of your namespace display.
-
Add environment variables by clicking the edit icon icon, + Add variable, entering the key/value pair, and clicking validate icon.
-
Add secrets by clicking the edit icon icon, + Add secret, entering the key/value pair, and clicking validate icon.
The environment variables and secrets defined will now be passed to your containers. Every container in a ready state is redeployed to take the change into account.
Deleting a Serverless Containers namespace
-
Click Containers in the Serverless section of the side menu. The containers page displays.
-
Click the more icon icon next to the namespace you want to delete, and select Delete from the drop-down menu.
-
Type DELETE in the pop-up that asks you to confirm the action, then click Delete namespace.