Why can't I add a namespace in Container Registry?
Setting up a namespace fails in IBM Cloud® Container Registry.
When you run ibmcloud cr namespace-add, you are unable to set your entered value as the namespace.
The following alternatives are possible causes:
- Scenario A. You used invalid characters in the namespace value.
- Scenario B. You entered a namespace value that is already being used by another IBM Cloud organization.
- Scenario C. A namespace was recently deleted and you're reusing its name. If the namespace that was deleted contained many resources, the deletion might not yet be fully processed by Container Registry.
- Scenario D. You might not have the correct permissions for creating a namespace.
- Scenario E. Your request could not be completed because it is forbidden to create an IBM Cloud Container Registry instance in your account.
You can fix these problems in the following ways:
Follow any instructions that are in the returned error message. If that is not successful, or no instructions are provided, try the following options:
- Scenario A. Check that you entered a valid namespace:
- Your namespace must be unique across all IBM Cloud accounts in the same region.
- Your namespace must be 4 - 30 characters long.
- Your namespace must start and end with a letter or number.
- Your namespace must contain lowercase letters, numbers, hyphens (-), and underscores (_) only.
- Scenario B. Choose a different value for your namespace.
- Scenario C. If you're re-creating a namespace that was deleted, and it contained many images, try again later.
- Scenario D. - Ensure that you have the Manager role in the Container Registry service at the account level for adding, assigning, and removing namespaces. See Why aren't I authorized to access a specified resource in Container Registry? for assistance.
- Scenario E. You must ensure that Container Registry is allowed when a namespace is being created. See Why am I forbidden to create a Container Registry instance in my account? for assistance.
For more information about namespaces, see Planning namespaces.